-
Notifications
You must be signed in to change notification settings - Fork 42
51 lines (44 loc) · 1.37 KB
/
coverage.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
name: Coverage
on: [push, pull_request]
jobs:
Coverage:
runs-on: [self-hosted, linux, gpu]
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y cmake git lcov
- name: Install Catch2
run: |
git clone https://github.com/catchorg/Catch2.git
cd Catch2
cmake -Bbuild -H. -DBUILD_TESTING=OFF
sudo cmake --build build/ --target install --config Debug
- name: Configure NiftyReg
run: |
mkdir build
cd build
cmake -DCMAKE_C_COMPILER=gcc \
-DCMAKE_CXX_COMPILER=g++ \
-DCMAKE_BUILD_TYPE=Debug \
-DBUILD_ALL_DEP=ON \
-DUSE_CUDA=ON \
-DUSE_OPENCL=OFF \
-DUSE_SSE=OFF \
-DUSE_OPENMP=OFF \
-DBUILD_TESTING=ON \
-DWITH_COVERAGE=ON \
..
- name: Build NiftyReg
run: cmake --build build --config Debug
- name: Run tests
working-directory: build
run: ctest -V
- name: Coverage
working-directory: build
run: make coverage
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
directory: build
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}