Dev/update workflows (#1406)
All checks were successful
Build and Deploy on local RHEL9 / build (push) Successful in 2m3s
Build on RHEL9 docker image / build (push) Successful in 3m32s
Build on RHEL8 docker image / build (push) Successful in 4m48s
Build and Deploy on local RHEL8 / build (push) Successful in 4m58s
Run Simulator Tests on local RHEL9 / build (push) Successful in 14m38s
Run Simulator Tests on local RHEL8 / build (push) Successful in 17m4s

* 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
This commit is contained in:
2026-03-02 14:30:27 +01:00
committed by GitHub
parent 60f5db1224
commit 6e090dbba2
7 changed files with 61 additions and 43 deletions

View File

@@ -1,4 +1,4 @@
name: Build on RHEL8
name: Build on RHEL8 docker image
on:
push:
@@ -26,4 +26,17 @@ jobs:
- name: C++ unit tests
working-directory: ${{gitea.workspace}}/build
run: ctest -j1 --rerun-failed --output-on-failure
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

View File

@@ -0,0 +1,40 @@
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

View File

@@ -1,4 +1,4 @@
name: Build on local RHEL8
name: Build and Deploy on local RHEL8
on:
push:
@@ -21,7 +21,7 @@ jobs:
conda activate det
mkdir build && cd build
conda activate det
cmake .. -DSLS_USE_PYTHON=ON
cmake .. -DSLS_USE_PYTHON=ON -DSLS_USE_SIMULATOR=ON -DSLS_USE_GUI=ON
make -j 2
- name: Deploy to NFS update server

View File

@@ -2,11 +2,7 @@ name: Run Simulator Tests on local RHEL8
on:
push:
branches:
- developer
- main
- 'dev/*'
- '*.*.*.rc'
workflow_dispatch:
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)

View File

@@ -1,4 +1,4 @@
name: Build on local RHEL9
name: Build and Deploy on local RHEL9
on:
push:
@@ -18,7 +18,7 @@ jobs:
- name: Build library
run: |
mkdir build && cd build
cmake -DSLS_USE_PYTHON=ON -DPython_EXECUTABLE=/usr/bin/python3.13 -DPython_INCLUDE_DIR=/usr/include/python3.13 -DPython_LIBRARY=/usr/lib64/libpython3.13.so ..
cmake -DSLS_USE_PYTHON=ON -DPython_EXECUTABLE=/usr/bin/python3.13 -DPython_INCLUDE_DIR=/usr/include/python3.13 -DPython_LIBRARY=/usr/lib64/libpython3.13.so -DSLS_USE_SIMULATOR=ON -DSLS_USE_GUI=ON ..
make -j 2
- name: Deploy to NFS update server

View File

@@ -2,11 +2,7 @@ name: Run Simulator Tests on local RHEL9
on:
push:
branches:
- developer
- main
- 'dev/*'
- '*.*.*.rc'
workflow_dispatch:
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)

View File

@@ -1,27 +0,0 @@
name: Build on RHEL9
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