Skip to content

Commit b57aa00

Browse files
Merge pull request #2684 from devitocodes/parallel-runners-v100
ci: Set CONTAINER_NAME within a step.
2 parents a487058 + 3e55058 commit b57aa00

2 files changed

Lines changed: 9 additions & 4 deletions

File tree

.github/workflows/docker-devito.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ jobs:
1313
env:
1414
# Use buildkit https://docs.docker.com/develop/develop-images/build_enhancements/ for better build
1515
DOCKER_BUILDKIT: "1"
16-
# Unique container name to avoid clashes across concurrent self-hosted runners
17-
CONTAINER_NAME: testrun-${{ matrix.tag }}-${{ runner.name }}
1816

1917

2018
strategy:
@@ -55,6 +53,10 @@ jobs:
5553
- name: Checkout devito
5654
uses: actions/checkout@v4
5755

56+
- name: Set per‑runner variables
57+
run: |
58+
echo "CONTAINER_NAME=testrun-${{ matrix.tag }}-$RUNNER_NAME" >> $GITHUB_ENV
59+
5860
- name: Check event name
5961
run: echo ${{ github.event_name }}
6062

.github/workflows/pytest-gpu.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,13 +103,16 @@ jobs:
103103
- name: Export CODECOV token
104104
run: echo "CODECOV_TOKEN=${{ secrets.CODECOV_TOKEN }}" >> "$GITHUB_ENV"
105105

106+
- name: Probe gpu
107+
run: |
108+
# Run a simple driver cmd first (nvidia-smi / rocm-smi)
109+
docker run ${{ matrix.flags }} "${DOCKER_IMAGE}" ${{ matrix.test_drive_cmd }}
110+
106111
- name: Test with pytest
107112
run: |
108113
# Run a simple driver cmd first (nvidia-smi / rocm-smi)
109114
ci_env=$(bash <(curl -s https://codecov.io/env))
110115
111-
docker run ${{ matrix.flags }} "${DOCKER_IMAGE}" ${{ matrix.test_drive_cmd }}
112-
113116
docker run ${{ matrix.flags }} $ci_env -e CI=true "${DOCKER_IMAGE}" \
114117
pytest --cov --cov-config=.coveragerc --cov-report=xml ${{ matrix.test_files }}
115118

0 commit comments

Comments
 (0)