Skip to content

Use the SUBPAR_USES_OPENMP macro when choosing the lock method. #103

Use the SUBPAR_USES_OPENMP macro when choosing the lock method.

Use the SUBPAR_USES_OPENMP macro when choosing the lock method. #103

Workflow file for this run

on:
push:
branches:
- master
pull_request:
name: Run unit tests
jobs:
test:
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- {
name: "Ubuntu Latest GCC, coverage enabled",
os: ubuntu-latest,
cov: true
}
- {
name: "macOS Latest Clang",
os: macos-latest
}
steps:
- uses: actions/checkout@v3
- name: Get latest CMake
uses: lukka/get-cmake@latest
- name: Configure the build (Ubuntu)
if: ${{ matrix.config.os == 'ubuntu-latest' }}
run: |
sudo apt-get install libhdf5-dev
cmake -S . -B build -DCODE_COVERAGE=ON
- name: Configure the build (Mac)
if: ${{ matrix.config.os == 'macos-latest' }}
run: |
brew install hdf5
cmake -S . -B build
- name: Run the build
run: cmake --build build
- name: Run the tests
run: |
cd build/tests
# Avoid using ctest because it's so slow; it starts a
# new process for each individual test, which is crazy.
for exe in $(ctest --show-only=json-v1 | jq -r ".tests[] | .command | .[0]" | sort | uniq)
do
echo "#### RUNNING ${exe} ####"
echo
${exe} --gtest_brief=1
echo
done
- name: Generate code coverage
if: ${{ matrix.config.cov }}
run: |
cd build/tests/CMakeFiles/
find -type f -name "*.gcno" -execdir gcov -abcfu {} +
- name: Upload to Codecov
if: ${{ matrix.config.cov }}
uses: codecov/codecov-action@v3
with:
directory: build/tests/CMakeFiles/