mirror of
https://github.com/slsdetectorgroup/aare.git
synced 2026-02-19 15:48:43 +01:00
Run catch2 tests in CI (#253)
- Build and run tests in CI - Added macOS builds (and tests) - Renamed workflow to build_with_docs.yml
This commit is contained in:
2
.github/workflows/build_and_deploy_conda.yml
vendored
2
.github/workflows/build_and_deploy_conda.yml
vendored
@@ -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 }}
|
||||||
|
|||||||
@@ -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:
|
||||||
@@ -3,6 +3,7 @@ channels:
|
|||||||
- conda-forge
|
- conda-forge
|
||||||
dependencies:
|
dependencies:
|
||||||
- anaconda-client
|
- anaconda-client
|
||||||
|
- catch2
|
||||||
- conda-build
|
- conda-build
|
||||||
- doxygen
|
- doxygen
|
||||||
- sphinx
|
- sphinx
|
||||||
|
|||||||
Reference in New Issue
Block a user