-
Notifications
You must be signed in to change notification settings - Fork 40
66 lines (52 loc) · 1.73 KB
/
cmake.yml
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
name: CMake
on:
push:
branches: [master]
jobs:
Build:
runs-on: ubuntu-latest
strategy:
matrix:
cxx: [g++-12, clang++-14]
build_type: [Debug, Release]
steps:
- uses: actions/checkout@v3
- name: Install Deps
run: |
sudo apt-get update
sudo apt-get -y upgrade
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y tzdata
sudo apt-get -y install libvtk9-dev python3-vtk9 python3-pytest
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{matrix.build_type}}
env:
CXX: ${{matrix.cxx}}
CXXFLAGS: ${{matrix.cxxflags}}
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{matrix.build_type}}
- name: Test
working-directory: ${{github.workspace}}/build
run: ctest --output-on-failure -C ${{matrix.build_type}}
Coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Deps
run: |
sudo apt-get update
sudo apt-get -y upgrade
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y tzdata
sudo apt-get -y install libvtk9-dev python3-vtk9 python3-pytest gcovr
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=Profile -DVTKBOOL_COVERAGE=ON
- name: Build
run: cmake --build ${{github.workspace}}/build
- name: Test
working-directory: ${{github.workspace}}/build
run: |
ctest --output-on-failure
gcovr -r .. . --exclude-throw-branches --xml -o coverage.xml
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{secrets.CODECOV_TOKEN}}