72 lines
2.0 KiB
YAML
72 lines
2.0 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"
|
|
PARTITION_NAME: ${{ matrix.partition }}
|
|
CMAKE_FLAGS: ${{ matrix.cmake_flags }}
|
|
ENVIRONMENT_MODULES: ${{ matrix.environment_modules }}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: astron-rd/slurm-action@v1
|
|
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:
|
|
- uses: actions/download-artifact@v4
|
|
with:
|
|
name: build-${{ matrix.name }}
|
|
- uses: astron-rd/slurm-action@v1
|
|
with:
|
|
partition: ${{ matrix.partition }}
|
|
gres: ${{ matrix.gres }}
|
|
commands: |
|
|
ctest --test-dir build --output-on-failure
|
|
|
|
benchmark:
|
|
runs-on: [slurm]
|
|
needs: build
|
|
strategy:
|
|
matrix: *matrix
|
|
env:
|
|
DEVICE_NAME: ${{ matrix.name }}
|
|
PARTITION_NAME: ${{ matrix.partition }}
|
|
steps:
|
|
- uses: actions/download-artifact@v4
|
|
with:
|
|
name: build-${{ matrix.name }}
|
|
- uses: astron-rd/slurm-action@v1
|
|
with:
|
|
partition: ${{ matrix.partition }}
|
|
gres: ${{ matrix.gres }}
|
|
commands: |
|
|
find build/benchmarks -type f -executable -exec {} \;
|