Skip to content

Commit 7b86c57

Browse files
committed
Fix formatting v2.
1 parent bd54c08 commit 7b86c57

1 file changed

Lines changed: 11 additions & 7 deletions

File tree

.github/workflows/pytest-gpu.yml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,18 +31,16 @@ on:
3131
jobs:
3232
build:
3333
name: ${{ matrix.name }}
34-
runs-on: ${{ fromJSON('["' + join(matrix.tags, '","') + '"]') }}
34+
runs-on:
35+
- self-hosted
36+
- ${{ matrix.runner_label }}
3537

3638
# Job-level env (includes per-runner image/container tags)
3739
env:
3840
DEVITO_ARCH: ${{ matrix.arch }}
3941
DEVITO_PLATFORM: ${{ matrix.platform }}
4042
DEVITO_LANGUAGE: ${{ matrix.language }}
4143
OMPI_CC: ${{ matrix.arch }}
42-
# Unique image tag per *runner*, so caches are reused on that runner but isolated across runners
43-
DOCKER_IMAGE: ${{ matrix.name }}-${{ runner.name }}
44-
# Base name for containers started in this job
45-
CONTAINER_BASENAME: testrun-${{ matrix.name }}-${{ runner.name }}
4644

4745
strategy:
4846
fail-fast: false
@@ -58,7 +56,7 @@ jobs:
5856
- name: pytest-gpu-acc-nvidia
5957
test_files: "tests/test_adjoint.py tests/test_gpu_common.py tests/test_gpu_openacc.py"
6058
base: "devitocodes/bases:nvidia-nvc"
61-
tags: ["self-hosted", "nvidiagpu"]
59+
runner_label: nvidiagpu
6260
test_drive_cmd: "nvidia-smi"
6361
# Respect CUDA_VISIBLE_DEVICES and also hard-limit Docker to that device.
6462
# NOTE: CUDA_VISIBLE_DEVICES must be set by the runner (systemd drop-in etc.).
@@ -71,7 +69,7 @@ jobs:
7169
# -------------------- AMD job -----------------------
7270
- name: pytest-gpu-omp-amd
7371
test_files: "tests/test_adjoint.py tests/test_gpu_common.py tests/test_gpu_openmp.py"
74-
tags: ["self-hosted", "amdgpu"]
72+
runner_label: amdgpu
7573
base: "devitocodes/bases:amd"
7674
test_drive_cmd: "rocm-smi"
7775
# Unchanged, still passes through required /dev nodes etc.
@@ -88,6 +86,12 @@ jobs:
8886
- name: Checkout devito
8987
uses: actions/checkout@v4
9088

89+
- name: Set per-runner tags
90+
run: |
91+
echo "RUNNER_NAME=$RUNNER_NAME" >> $GITHUB_ENV
92+
echo "DOCKER_IMAGE=${{ matrix.name }}-$RUNNER_NAME" >> $GITHUB_ENV
93+
echo "CONTAINER_BASENAME=testrun-${{ matrix.name }}-$RUNNER_NAME" >> $GITHUB_ENV
94+
9195
- name: Build docker image
9296
run: |
9397
docker build . \

0 commit comments

Comments
 (0)