|
31 | 31 | jobs: |
32 | 32 | build: |
33 | 33 | name: ${{ matrix.name }} |
34 | | - runs-on: ${{ fromJSON('["' + join(matrix.tags, '","') + '"]') }} |
| 34 | + runs-on: |
| 35 | + - self-hosted |
| 36 | + - ${{ matrix.runner_label }} |
35 | 37 |
|
36 | 38 | # Job-level env (includes per-runner image/container tags) |
37 | 39 | env: |
38 | 40 | DEVITO_ARCH: ${{ matrix.arch }} |
39 | 41 | DEVITO_PLATFORM: ${{ matrix.platform }} |
40 | 42 | DEVITO_LANGUAGE: ${{ matrix.language }} |
41 | 43 | 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 }} |
46 | 44 |
|
47 | 45 | strategy: |
48 | 46 | fail-fast: false |
|
58 | 56 | - name: pytest-gpu-acc-nvidia |
59 | 57 | test_files: "tests/test_adjoint.py tests/test_gpu_common.py tests/test_gpu_openacc.py" |
60 | 58 | base: "devitocodes/bases:nvidia-nvc" |
61 | | - tags: ["self-hosted", "nvidiagpu"] |
| 59 | + runner_label: nvidiagpu |
62 | 60 | test_drive_cmd: "nvidia-smi" |
63 | 61 | # Respect CUDA_VISIBLE_DEVICES and also hard-limit Docker to that device. |
64 | 62 | # NOTE: CUDA_VISIBLE_DEVICES must be set by the runner (systemd drop-in etc.). |
|
71 | 69 | # -------------------- AMD job ----------------------- |
72 | 70 | - name: pytest-gpu-omp-amd |
73 | 71 | 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 |
75 | 73 | base: "devitocodes/bases:amd" |
76 | 74 | test_drive_cmd: "rocm-smi" |
77 | 75 | # Unchanged, still passes through required /dev nodes etc. |
|
88 | 86 | - name: Checkout devito |
89 | 87 | uses: actions/checkout@v4 |
90 | 88 |
|
| 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 | +
|
91 | 95 | - name: Build docker image |
92 | 96 | run: | |
93 | 97 | docker build . \ |
|
0 commit comments