Files
trigdx/.github/workflows/test.yml
Bram Veenboer 112baf447b Update the test workflow (#26)
- Upgrade to v1.2 of slurm-action
- Add extra element to matrix to test this new action
- Add cleanup step
- Simplify handling of artefacts
- Execute tests directly (not with ctest)
2025-08-21 09:06:42 +02:00

85 lines
2.4 KiB
YAML

name: test
on:
push:
jobs:
build:
runs-on: [slurm]
strategy:
matrix: &matrix
include:
- name: GNU, NVIDIA A4000
partition: defq
gres: gpu:A4000
cmake_flags: "-DTRIGDX_USE_MKL=1 -DTRIGDX_USE_GPU=1 -DTRIGDX_USE_MKL=1 -DTRIGDX_USE_XSIMD=1 -DCMAKE_CUDA_ARCHITECTURES=86"
environment_modules: "spack/20250403 intel-oneapi-mkl cuda python"
- name: NVIDIA GH200
partition: ghq
gres: gpu:GH200
cmake_flags: "-DTRIGDX_USE_GPU=1 -DTRIGDX_USE_XSIMD=1 -DCMAKE_CUDA_ARCHITECTURES=90a -DCMAKE_CUDA_COMPILER=/usr/local/cuda/bin/nvcc"
env:
DEVICE_NAME: ${{ matrix.name }}
PARTITION_NAME: ${{ matrix.partition }}
CMAKE_FLAGS: ${{ matrix.cmake_flags }}
ENVIRONMENT_MODULES: ${{ matrix.environment_modules }}
steps:
- &cleanup
name: "Remove old workspace"
run: |
rm -rf $GITHUB_WORKSPACE/*
mkdir -p $GITHUB_WORKSPACE
- uses: actions/checkout@v4
- uses: astron-rd/slurm-action@v1.2
with:
partition: ${{ matrix.partition }}
gres: ${{ matrix.gres }}
commands: |
module load ${ENVIRONMENT_MODULES}
cmake -S . -B build ${CMAKE_FLAGS}
make -C build -j
- name: Upload build
uses: actions/upload-artifact@v4
with:
name: build-${{ matrix.name }}
path: build
test:
runs-on: [slurm]
needs: build
strategy:
matrix: *matrix
env:
DEVICE_NAME: ${{ matrix.name }}
PARTITION_NAME: ${{ matrix.partition }}
steps:
- *cleanup
- uses: actions/download-artifact@v4
with:
name: build-${{ matrix.name }}
- uses: astron-rd/slurm-action@v1.2
with:
partition: ${{ matrix.partition }}
gres: ${{ matrix.gres }}
commands: |
find tests -type f -executable -exec {} \;
benchmark:
runs-on: [slurm]
needs: build
strategy:
matrix: *matrix
env:
DEVICE_NAME: ${{ matrix.name }}
PARTITION_NAME: ${{ matrix.partition }}
steps:
- *cleanup
- uses: actions/download-artifact@v4
with:
name: build-${{ matrix.name }}
- uses: astron-rd/slurm-action@v1.2
with:
partition: ${{ matrix.partition }}
gres: ${{ matrix.gres }}
commands: |
find benchmarks -type f -executable -exec {} \;