Skip to content

Commit adf3dd1

Browse files
ggormanmloubout
authored andcommitted
ci: Remove dangling layers from CI docker builds.
1 parent 5f399da commit adf3dd1

2 files changed

Lines changed: 9 additions & 10 deletions

File tree

.github/workflows/docker-devito.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,6 @@ jobs:
109109
build-args: base=devitocodes/${{ matrix.base }}
110110

111111
- name: Remove dangling layers
112-
if: ${{ !contains(matrix.runner, 'nvidiagpu') }}
113112
run: docker system prune -f
114113

115114
- name: Run tests

.github/workflows/pytest-gpu.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,6 @@ jobs:
3535
- self-hosted
3636
- ${{ matrix.runner_label }}
3737

38-
# Job-level env (includes per-runner image/container tags)
39-
env:
40-
DEVITO_ARCH: ${{ matrix.arch }}
41-
DEVITO_PLATFORM: ${{ matrix.platform }}
42-
DEVITO_LANGUAGE: ${{ matrix.language }}
43-
OMPI_CC: ${{ matrix.arch }}
44-
4538
strategy:
4639
fail-fast: false
4740
matrix:
@@ -110,11 +103,11 @@ jobs:
110103
111104
- name: Test with pytest
112105
run: |
113-
# Run a simple driver cmd first (nvidia-smi / rocm-smi)
114106
ci_env=$(bash <(curl -s https://codecov.io/env))
115107
116108
docker run ${{ matrix.flags }} $ci_env -e CI=true "${DOCKER_IMAGE}" \
117-
pytest --cov --cov-config=.coveragerc --cov-report=xml ${{ matrix.test_files }}
109+
pytest -vv -ra -l -s --full-trace --maxfail=1 \
110+
--cov --cov-config=.coveragerc --cov-report=xml ${{ matrix.test_files }}
118111
119112
- name: Test examples
120113
run: |
@@ -124,3 +117,10 @@ jobs:
124117
run: |
125118
docker run ${{ matrix.flags }} --env DEVITO_MPI=1 "${DOCKER_IMAGE}" \
126119
mpiexec -n 2 pytest ${{ matrix.test_examples }}
120+
121+
- name: Clean up test image
122+
if: always()
123+
run: |
124+
docker rmi -f "${DOCKER_IMAGE}" || true # remove the image
125+
docker system prune -f # free dangling layers
126+

0 commit comments

Comments
 (0)