Run catch2 tests in CI (#253)
Some checks failed
Build on RHEL9 / build (push) Failing after 0s
Build on RHEL8 / build (push) Successful in 3m28s

- Build and run tests in CI
- Added macOS builds (and tests)
- Renamed workflow to build_with_docs.yml
This commit is contained in:
2025-11-27 08:58:24 +01:00
committed by GitHub
3 changed files with 15 additions and 5 deletions

View File

@@ -10,7 +10,7 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
platform: [ubuntu-latest, ] # macos-12, windows-2019] platform: [ubuntu-latest] # macos-12, windows-2019]
python-version: ["3.12",] python-version: ["3.12",]
runs-on: ${{ matrix.platform }} runs-on: ${{ matrix.platform }}

View File

@@ -2,11 +2,15 @@ name: Build the package using cmake then documentation
on: on:
workflow_dispatch: workflow_dispatch:
push:
pull_request: pull_request:
release: release:
types: types:
- published - published
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Debug
permissions: permissions:
contents: read contents: read
@@ -18,7 +22,7 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
platform: [ubuntu-latest, ] platform: [ubuntu-latest, macos-latest]
python-version: ["3.12",] python-version: ["3.12",]
runs-on: ${{ matrix.platform }} runs-on: ${{ matrix.platform }}
@@ -39,15 +43,20 @@ jobs:
channels: conda-forge channels: conda-forge
conda-remove-defaults: "true" conda-remove-defaults: "true"
- name: Build library - name: Build library and docs
run: | run: |
mkdir build mkdir build
cd build cd build
cmake .. -DAARE_SYSTEM_LIBRARIES=ON -DAARE_PYTHON_BINDINGS=ON -DAARE_DOCS=ON cmake .. -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DAARE_SYSTEM_LIBRARIES=ON -DAARE_PYTHON_BINDINGS=ON -DAARE_DOCS=ON -DAARE_TESTS=ON
make -j 2 make -j 4
make docs make docs
- name: C++ unit tests
working-directory: ${{github.workspace}}/build
run: ctest -C ${{env.BUILD_TYPE}} -j4
- name: Upload static files as artifact - name: Upload static files as artifact
if: matrix.platform == 'ubuntu-latest'
id: deployment id: deployment
uses: actions/upload-pages-artifact@v3 uses: actions/upload-pages-artifact@v3
with: with:

View File

@@ -3,6 +3,7 @@ channels:
- conda-forge - conda-forge
dependencies: dependencies:
- anaconda-client - anaconda-client
- catch2
- conda-build - conda-build
- doxygen - doxygen
- sphinx - sphinx