-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (58 loc) · 1.67 KB
/
ci.yml
File metadata and controls
68 lines (58 loc) · 1.67 KB
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
name: ci
on:
pull_request:
push:
branches:
- main
- master
paths-ignore:
- '**/*.md'
- '**/LICENSE'
- '**/.clang-*'
- '**/.gitignore'
jobs:
Test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-22.04
compiler:
- gcc
generator:
- 'Ninja Multi-Config'
build_type:
- Release
- Debug
include:
- compiler: gcc
gcov_executable: gcov
steps:
- uses: actions/checkout@v2
- name: Setup Cpp
uses: aminya/setup-cpp@v1
with:
compiler: ${{ matrix.compiler }}
vcvarsall: ${{ contains(matrix.os, 'windows' )}}
cmake: true
ninja: true
ccache: true
gcovr: true
- name: Configure CMake
run: |
cmake -S . -B ./build -G "${{matrix.generator}}" -DCMAKE_BUILD_TYPE:STRING=${{matrix.build_type}} -DCPPUTILS_ENABLE_TESTING=ON -DCPPUTILS_ENABLE_COVERAGE:BOOL=${{ matrix.build_type == 'Debug' }}
- name: Build
run: |
cmake --build ./build --config ${{matrix.build_type}}
- name: Unix - Test and coverage
working-directory: ./build
run: |
ctest -C ${{matrix.build_type}}
# gcovr -j ${{env.nproc}} -e "_deps/*" --delete --root ../ --print-summary --xml-pretty --xml coverage.xml . --gcov-executable '${{ matrix.gcov_executable }}'
# - name: Publish to codecov
# uses: codecov/codecov-action@v2
# with:
# flags: ${{ runner.os }}
# name: ${{ runner.os }}-coverage
# files: ./build/coverage.xml