mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2026-10-21 17:36:11 +02:00
* only run tests for pull-requests * build gui and simulators * trigger upon push to all branches * renamed workflows * added python tests * added colorama and numpy * added slsdet to pythonpath * updated workflow name
40 lines
1.0 KiB
YAML
40 lines
1.0 KiB
YAML
name: Build on RHEL9 docker image
|
|
|
|
on:
|
|
push:
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: "ubuntu-latest"
|
|
container:
|
|
image: gitea.psi.ch/detectors/rhel9-detectors-dev
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
|
|
- name: Build library
|
|
run: |
|
|
mkdir build && cd build
|
|
cmake .. -DSLS_USE_PYTHON=ON -DSLS_USE_TESTS=ON -DSLS_USE_SIMULATOR=ON
|
|
make -j 2
|
|
|
|
- name: C++ unit tests
|
|
working-directory: ${{gitea.workspace}}/build
|
|
run: ctest -j1 --rerun-failed --output-on-failure
|
|
|
|
- name: Install Python dependencies
|
|
run: |
|
|
python3.12 -m pip install --upgrade pip
|
|
python3.12 -m pip install pytest
|
|
python3.12 -m pip install colorama
|
|
python3.12 -m pip install numpy
|
|
|
|
- name: Python unit tests
|
|
working-directory: ${{gitea.workspace}}
|
|
run: |
|
|
export PYTHONPATH=$PWD/build/bin:$PYTHONPATH
|
|
python3.12 -m pytest python/tests |