13
13
tests :
14
14
runs-on : macos-latest
15
15
16
- # strategy:
17
- # matrix:
18
- # build_type: [Release, Debug]
16
+ strategy :
17
+ matrix :
18
+ build_type : [Release, Debug]
19
19
20
20
steps :
21
21
- name : Checkout
@@ -40,39 +40,32 @@ jobs:
40
40
- name : Add LLVM Path
41
41
run : echo "/usr/local/opt/llvm/bin" >> $GITHUB_PATH
42
42
43
- - name : Build Debug
43
+ - name : Build ${{ matrix.build_type }}
44
44
run : |
45
- cmake -B build_debug -S . -DARGO_TESTS_ENABLE=true -GNinja -DCMAKE_BUILD_TYPE=Debug -DARGO_CLANG_TIDY_ENABLE=ON
46
- cmake --build build_debug
45
+ cmake -B build -S . -DARGO_TESTS_ENABLE=true -GNinja -DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
46
+ cmake --build build
47
47
env :
48
48
CC : /usr/local/opt/llvm/bin/clang
49
49
CXX : /usr/local/opt/llvm/bin/clang++
50
50
LDFLAGS : -L/usr/local/opt/llvm/lib -L/usr/local/opt/llvm/lib/c++ -Wl,-rpath,/usr/local/opt/llvm/lib/c++
51
51
CPPFLAGS : -I/usr/local/opt/llvm/include
52
52
53
- - name : Build Release
53
+ - name : Test ${{ matrix.build_type }}
54
+ if : matrix.build_type == 'Release'
54
55
run : |
55
- cmake -B build_release -S . -DARGO_TESTS_ENABLE=true -GNinja -DCMAKE_BUILD_TYPE=Release
56
- cmake --build build_release
57
- env :
58
- CC : /usr/local/opt/llvm/bin/clang
59
- CXX : /usr/local/opt/llvm/bin/clang++
60
- LDFLAGS : -L/usr/local/opt/llvm/lib -L/usr/local/opt/llvm/lib/c++ -Wl,-rpath,/usr/local/opt/llvm/lib/c++
61
- CPPFLAGS : -I/usr/local/opt/llvm/include
62
-
63
- - name : Test Release
64
- run : |
65
- cmake --build build_release --target test
56
+ cmake --build build --target test
66
57
67
58
- name : Test Debug with codecov
59
+ if : matrix.build_type == 'Debug'
68
60
run : |
69
- LLVM_PROFILE_FILE=./build_debug /test-argo.profraw ./build_debug /test-argo
70
- /usr/local/opt/llvm/bin/llvm-profdata merge -sparse ./build_debug /test-argo.profraw -o ./build_debug /coverage.profdata
71
- /usr/local/opt/llvm/bin/llvm-cov show ./build_debug /test-argo -instr-profile=./build_debug /coverage.profdata -ignore-filename-regex="tests*" -ignore-filename-regex="Argo/ArgoExceptions.cc" > ./build_debug /coverage.txt
61
+ LLVM_PROFILE_FILE=./build /test-argo.profraw ./build /test-argo
62
+ /usr/local/opt/llvm/bin/llvm-profdata merge -sparse ./build /test-argo.profraw -o ./build /coverage.profdata
63
+ /usr/local/opt/llvm/bin/llvm-cov show ./build /test-argo -instr-profile=./build /coverage.profdata -ignore-filename-regex="tests*" -ignore-filename-regex="Argo/ArgoExceptions.cc" > ./build /coverage.txt
72
64
73
65
- name : Upload coverage reports to Codecov
74
66
uses : codecov/codecov-action@v3
67
+ if : matrix.build_type == 'Debug'
75
68
with :
76
- files : ./build_debug /coverage.txt
69
+ files : ./build /coverage.txt
77
70
env :
78
71
CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
0 commit comments