-
Notifications
You must be signed in to change notification settings - Fork 23
80 lines (59 loc) · 2 KB
/
tinf-ci-workflow.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: tinf CI
on: [push, pull_request]
jobs:
windows:
name: Windows ${{ matrix.config.name }}
runs-on: windows-latest
strategy:
matrix:
config:
- name: MSVC x64
generator: Visual Studio 16 2019
cmake-flags: -A x64
steps:
- uses: actions/checkout@v2
- name: Configure
run: cmake -G "${{ matrix.config.generator }}" ${{ matrix.config.cmake-flags }} -B build
- name: Build
run: cd build && cmake --build . --config Debug
- name: Test
run: cd build && ctest -V --output-on-failure --interactive-debug-mode 0 -C Debug
linux:
name: Linux ${{ matrix.config.name }}
runs-on: ubuntu-latest
env:
CC: ${{ matrix.config.cc }}
strategy:
matrix:
config:
- name: Clang UBSan
cc: clang
cmake-flags: -DCMAKE_C_FLAGS_DEBUG='-g -fsanitize=undefined'
- name: Clang ASan
cc: clang
cmake-flags: -DCMAKE_C_FLAGS_DEBUG='-O1 -g -fsanitize=address -fno-omit-frame-pointer'
steps:
- uses: actions/checkout@v2
- name: Configure
run: cmake ${{ matrix.config.cmake-flags }} -DCMAKE_BUILD_TYPE=Debug -B build
- name: Build
run: cd build && make VERBOSE=1
- name: Test
run: cd build && ctest -V --output-on-failure --interactive-debug-mode 0
coverage:
name: Linux Coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Configure
run: cmake -DCMAKE_C_FLAGS_DEBUG='-g -O0 --coverage' -DCMAKE_BUILD_TYPE=Debug -B build
- name: Build
run: cd build && make VERBOSE=1
- name: Test
run: cd build && ctest -V --output-on-failure --interactive-debug-mode 0
- name: Generate coverage
run: cd build && gcov -abcfu CMakeFiles/tinf.dir/src/*.c.gcno -o CMakeFiles/tinf.dir/src
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
with:
directory: ./build/