From b71418aa97c601c4049439b978e8de38eb41c34f Mon Sep 17 00:00:00 2001 From: Spencer Bryngelson Date: Fri, 13 Mar 2026 20:26:10 -0400 Subject: [PATCH] ci: clean stale .out files after checkout to prevent misleading logs When a multi-step CI job (like case-optimization) fails at an early step, the 'Print Logs' step (if: always) would cat output files from a previous successful run, making it appear the current run succeeded. Delete stale .out files after checkout so logs only show output from the current workflow run. Co-Authored-By: Claude Opus 4.6 (1M context) --- .github/workflows/test.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a52a5967d1..53066b1fba 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -234,6 +234,9 @@ jobs: # submit-slurm-job.sh can detect and cancel stale SLURM jobs on retry. clean: false + - name: Clean stale output files + run: rm -f *.out + - name: Build (login node) if: matrix.cluster != 'phoenix' timeout-minutes: 60 @@ -317,6 +320,9 @@ jobs: with: clean: false + - name: Clean stale output files + run: rm -f *.out + - name: Pre-Build (SLURM) if: matrix.cluster == 'phoenix' run: bash .github/scripts/submit-slurm-job.sh .github/scripts/prebuild-case-optimization.sh cpu ${{ matrix.interface }} ${{ matrix.cluster }}