Skip to content

Commit c646244

Browse files
authored
[CI] Cleanup AMD worker at the end of a job (#5391)
The AMD runner persists changes to the file system between jobs, so the caches need to be manually cleaned up. Closes #5384
1 parent f5d541c commit c646244

File tree

2 files changed

+8
-11
lines changed

2 files changed

+8
-11
lines changed

.github/workflows/integration-tests.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -408,10 +408,6 @@ jobs:
408408
cd python
409409
ccache --zero-stats
410410
pip install -v -e '.[tests]'
411-
- name: Clean up after an unsuccessful build
412-
if: ${{ !success() && steps.amd-install-triton.outcome != 'success' }}
413-
run: |
414-
rm -rf ~/.triton
415411
- name: CCache Stats
416412
run: ccache --print-stats
417413
- name: Run lit tests
@@ -477,8 +473,11 @@ jobs:
477473
~/.ccache
478474
key: triton-artifacts-${{ runner.os }}-${{ runner.arch }}-${{ env.RUNNER_TYPE }}-llvm-${{ steps.cache-key.outputs.llvm }}-${{ steps.cache-key.outputs.datetime }}
479475
- name: Clean up caches
476+
# Always cleanup the worker, even if builds or tests failed
477+
if: always()
480478
run: |
481-
rm -rf ~/.triton/cache
479+
rm -rf ~/.triton
480+
rm -rf ~/.ccache
482481
Build-Tests:
483482
needs: Runner-Preparation
484483
if: needs.Runner-Preparation.outputs.matrix-MACOS != ''

.github/workflows/integration-tests.yml.in

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -402,11 +402,6 @@ jobs:
402402
ccache --zero-stats
403403
pip install -v -e '.[tests]'
404404

405-
- name: Clean up after an unsuccessful build
406-
if: ${{ !success() && steps.amd-install-triton.outcome != 'success' }}
407-
run: |
408-
rm -rf ~/.triton
409-
410405
- *print-ccache-stats
411406
- *run-lit-tests-step
412407

@@ -442,8 +437,11 @@ jobs:
442437
- *save-build-artifacts-step
443438

444439
- name: Clean up caches
440+
# Always cleanup the worker, even if builds or tests failed
441+
if: always()
445442
run: |
446-
rm -rf ~/.triton/cache
443+
rm -rf ~/.triton
444+
rm -rf ~/.ccache
447445

448446
Build-Tests:
449447
needs: Runner-Preparation

0 commit comments

Comments
 (0)