Skip to content

Remove unnecessary struct DerivedParameters #195

Remove unnecessary struct DerivedParameters

Remove unnecessary struct DerivedParameters #195

Workflow file for this run

name: C++ tests
on:
push:
branches: [main, dev]
pull_request:
branches: [main]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v6
- name: Cache Catch2 build
id: catch2-cache
uses: actions/cache@v5
with:
path: |
~/.local/catch2
key: ${{ runner.os }}-catch2
- name: Build Catch2
if: steps.catch2-cache.outputs.cache-hit != 'true'
run: |
git clone https://github.com/catchorg/Catch2.git
cd Catch2
git checkout "v3.13.0"
mkdir build && cd build
cmake .. \
-DCMAKE_INSTALL_PREFIX=$HOME/.local/catch2 \
-DBUILD_TESTING=Off
cmake --build . \
--config Release --
cmake --install .
- name: Configure CMake Prefix
run: echo "$HOME/.local/catch2/lib/cmake/Catch2" >> $GITHUB_PATH
- name: Configure for release tests
if: runner.os == 'macOS'
run: |
cmake -S. -Bbuild \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_MEX=False \
-DBUILD_TESTS=True
- name: Configure for coverage tests
if: runner.os == 'Linux'
run: |
cmake -S. -Bbuild \
-DCMAKE_BUILD_TYPE=Debug \
-DBUILD_MEX=False \
-DBUILD_TESTS=True
- name: Build
run: |
cmake --build build -j$(nproc)
- name: Run tests
working-directory: ./build
run: |
ctest --output-on-failure --verbose
- name: Install lcov
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y lcov
- name: Generate coverage report
if: runner.os == 'Linux'
run: |
lcov --capture \
--directory . \
--output-file coverage.info
- name: Upload coverage report to Codecov
uses: codecov/codecov-action@v6
if: runner.os == 'Linux'
with:
files: coverage.info
disable_search: true
verbose: true
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}