release tag #34
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
runs-on: self-hosted | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build | |
run: | | |
module load BuildEnv/gcc-12.2.0.lua; | |
mkdir build && cd build; | |
cmake -DCMAKE_CXX_FLAGS=" --coverage -fno-inline -fno-inline-small-functions -fno-default-inline -fprofile-arcs -ftest-coverage " ..; | |
make -j 8; | |
- name: Test | |
env: | |
HDF5_USE_FILE_LOCKING: 'FALSE' | |
run: | | |
module load BuildEnv/gcc-12.2.0.lua; | |
cd build; | |
export OMP_NUM_THREADS=1; | |
ctest -j 1 | |
# TODO: add project specific tests | |
- name: Run coverage | |
run: | | |
module load BuildEnv/gcc-12.2.0.lua; | |
cd build; | |
lcov --capture --directory . --output-file coverage.info; | |
lcov --remove coverage.info '/usr/*' --output-file coverage.info | |
lcov --remove coverage.info '/opt/ohpc/pub/compiler/*' --output-file coverage.info | |
lcov --remove coverage.info '*_deps*' --output-file coverage.info | |
lcov --remove coverage.info '*libs*' --output-file coverage.info | |
lcov --list coverage.info | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
flags: unittests | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |