mirror of
https://github.com/slsdetectorgroup/aare.git
synced 2026-01-22 15:01:58 +01:00
- automatically run python tests - automatically run test using data files on local runner from gitea - fixed some of the workflows --------- Co-authored-by: Erik Fröjdh <erik.frojdh@psi.ch>
47 lines
1.3 KiB
YAML
47 lines
1.3 KiB
YAML
name: Build on RHEL8
|
|
|
|
on:
|
|
push:
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: "ubuntu-latest"
|
|
container:
|
|
image: gitea.psi.ch/detectors/rhel8-detectors-dev
|
|
steps:
|
|
# workaround until actions/checkout@v4 is available for RH8
|
|
# - uses: actions/checkout@v4
|
|
- name: Clone repository
|
|
run: |
|
|
echo Cloning ${{ github.ref_name }}
|
|
git clone https://${{secrets.GITHUB_TOKEN}}@gitea.psi.ch/${{ github.repository }}.git --branch=${{ github.ref_name }} .
|
|
|
|
|
|
- name: Install Python dependencies
|
|
run: |
|
|
python3.12 -m pip install --upgrade pip
|
|
python3.12 -m pip install pytest
|
|
python3.12 -m pip install numpy
|
|
python3.12 -m pip install pytest-check
|
|
python3.12 -m pip install matplotlib
|
|
python3.12 -m pip install boost-histogram
|
|
|
|
|
|
- name: Build library
|
|
run: |
|
|
mkdir build && cd build
|
|
cmake .. -DAARE_PYTHON_BINDINGS=ON -DAARE_TESTS=ON -DPython_FIND_VIRTUALENV=FIRST
|
|
make -j 2
|
|
|
|
- name: C++ unit tests
|
|
working-directory: ${{gitea.workspace}}/build
|
|
run: ctest
|
|
|
|
- name: Python unit tests
|
|
working-directory: ${{gitea.workspace}}/build
|
|
run: |
|
|
python3.12 -m pytest ${{gitea.workspace}}/python/tests/ |