diff --git a/.gitea/workflows/build_and_test.yml b/.gitea/workflows/build_and_test.yml index be1b7c42..056ba51c 100644 --- a/.gitea/workflows/build_and_test.yml +++ b/.gitea/workflows/build_and_test.yml @@ -16,6 +16,41 @@ on: default: false jobs: + unit-tests: + name: Unit tests + runs-on: jfjoch_rocky8 + if: github.ref_type != 'tag' && github.ref_type != 'workflow_dispatch' + container: + image: gitea.psi.ch/leonarski_f/jfjoch_rocky8:2511 + options: --gpus all + timeout-minutes: 90 + env: + CTEST_OUTPUT_ON_FAILURE: '1' + steps: + - uses: actions/checkout@v4 + - name: Build tests + shell: bash + run: | + mkdir -p build + cd build + cmake -G Ninja -DCMAKE_BUILD_TYPE=Release .. + ninja -j48 jfjoch_test jfjoch_hdf5_test jfjoch_hdf5_enospc_test enospc_shim + - name: Run unit tests + shell: bash + run: | + cd build/tests + ./jfjoch_test + - name: HDF5 ENOSPC test + shell: bash + run: | + cd build/tests + LD_PRELOAD=./enospc_shim.so ./jfjoch_hdf5_enospc_test HDF5File_enospc + LD_PRELOAD=./enospc_shim.so ./jfjoch_hdf5_enospc_test FileWriter_enospc + - name: Run hdf5 test + shell: bash + run: | + cd build/tools + ./jfjoch_hdf5_test ../../tests/test_data/compression_benchmark.h5 build-rpm: name: build:rpm (${{ matrix.distro }}) if: github.ref_type != 'workflow_dispatch' @@ -296,43 +331,6 @@ jobs: git add . git commit -m "Deploy site" git push -f https://${{secrets.GITHUB_TOKEN}}@gitea.psi.ch/${{ github.repository }}.git gitea-pages - unit-tests: - name: Unit tests - runs-on: jfjoch_rocky8 - if: github.ref_type != 'tag' && github.ref_type != 'workflow_dispatch' - container: - image: gitea.psi.ch/leonarski_f/jfjoch_rocky8:2511 - options: --gpus all - timeout-minutes: 90 - env: - CTEST_OUTPUT_ON_FAILURE: '1' - steps: - - uses: actions/checkout@v4 - - name: Build tests - shell: bash - run: | - mkdir -p build - cd build - cmake -G Ninja -DCMAKE_BUILD_TYPE=Release .. - ninja -j48 jfjoch_test jfjoch_hdf5_test jfjoch_hdf5_enospc_test enospc_shim - - name: ENOSPC test - shell: bash - run: | - cd build/tests - ls -ltr *.so - ldd enospc_shim.so - LD_PRELOAD=./enospc_shim.so ./jfjoch_hdf5_enospc_test HDF5File_enospc - LD_PRELOAD=./enospc_shim.so ./jfjoch_hdf5_enospc_test FileWriter_enospc - - name: Run unit tests - shell: bash - run: | - cd build/tests - ./jfjoch_test - - name: Run hdf5 test - shell: bash - run: | - cd build/tools - ./jfjoch_hdf5_test ../../tests/test_data/compression_benchmark.h5 create-release: name: Create release runs-on: jfjoch_rocky8