diff --git a/.gitea/workflows/rh8-native.yml b/.gitea/workflows/docker-rh8-build-test.yml similarity index 56% rename from .gitea/workflows/rh8-native.yml rename to .gitea/workflows/docker-rh8-build-test.yml index 7aae3be69..ed569282d 100644 --- a/.gitea/workflows/rh8-native.yml +++ b/.gitea/workflows/docker-rh8-build-test.yml @@ -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 \ No newline at end of file + 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 \ No newline at end of file diff --git a/.gitea/workflows/docker-rh9-build-test.yml b/.gitea/workflows/docker-rh9-build-test.yml new file mode 100644 index 000000000..9c2e392fd --- /dev/null +++ b/.gitea/workflows/docker-rh9-build-test.yml @@ -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 \ No newline at end of file diff --git a/.gitea/workflows/rh8-local.yml b/.gitea/workflows/rh8-local-build-deploy.yml similarity index 87% rename from .gitea/workflows/rh8-local.yml rename to .gitea/workflows/rh8-local-build-deploy.yml index 128d3176c..120605dac 100644 --- a/.gitea/workflows/rh8-local.yml +++ b/.gitea/workflows/rh8-local-build-deploy.yml @@ -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 diff --git a/.gitea/workflows/rh8-local-tests.yml b/.gitea/workflows/rh8-local-tests.yml index 8865e43ce..7c0a379fb 100644 --- a/.gitea/workflows/rh8-local-tests.yml +++ b/.gitea/workflows/rh8-local-tests.yml @@ -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.) diff --git a/.gitea/workflows/rh9-local.yml b/.gitea/workflows/rh9-local-build-deploy.yml similarity index 87% rename from .gitea/workflows/rh9-local.yml rename to .gitea/workflows/rh9-local-build-deploy.yml index 58de1cb88..94db2a2ec 100644 --- a/.gitea/workflows/rh9-local.yml +++ b/.gitea/workflows/rh9-local-build-deploy.yml @@ -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 diff --git a/.gitea/workflows/rh9-local-tests.yml b/.gitea/workflows/rh9-local-tests.yml index 4aa1a9f98..5efc5569f 100644 --- a/.gitea/workflows/rh9-local-tests.yml +++ b/.gitea/workflows/rh9-local-tests.yml @@ -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.) diff --git a/.gitea/workflows/rh9-native.yml b/.gitea/workflows/rh9-native.yml deleted file mode 100644 index a019074ef..000000000 --- a/.gitea/workflows/rh9-native.yml +++ /dev/null @@ -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 \ No newline at end of file