Skip to content

Commit

Permalink
Coverage Test 1
Browse files Browse the repository at this point in the history
  • Loading branch information
onurulgen committed Feb 8, 2024
1 parent 2da094f commit 852ebed
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 1 deletion.
51 changes: 51 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Coverage
on: [push, pull_request]
jobs:
Coverage:
runs-on: [self-hosted, linux, gpu]
steps:
- uses: actions/checkout@v3

- 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: Install lcov
run: sudo apt-get install lcov

- 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=ON \
-DUSE_SSE=ON \
-DUSE_OPENMP=ON \
-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 }}
2 changes: 1 addition & 1 deletion niftyreg_build_version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
406
407

0 comments on commit 852ebed

Please sign in to comment.