Skip to content

Commit 0a39803

Browse files
sbryngelsonclaude
andcommitted
ci: fix heredoc pwd expansion, backtick substitution, combine bench log steps
- submit-job.sh: escape $(pwd) in heredoc so it expands on the compute node after cd $SLURM_SUBMIT_DIR, not on the login node at sbatch time - submit-job.sh: replace backtick command substitution with $() for job_slug (modern bash style, consistent with rest of script) - bench.yml: combine 'Print Per-Case Failure Logs' and 'Print Per-Case Success Logs' into a single 'Print Per-Case Logs' step that labels each output as [PASSED] or [FAILED] inline Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 1c81fc0 commit 0a39803

2 files changed

Lines changed: 6 additions & 16 deletions

File tree

.github/workflows/bench.yml

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -145,28 +145,18 @@ jobs:
145145
cat pr/bench-${{ matrix.device }}-${{ matrix.interface }}.* 2>/dev/null || true
146146
cat master/bench-${{ matrix.device }}-${{ matrix.interface }}.* 2>/dev/null || true
147147
148-
- name: Print Per-Case Failure Logs
149-
if: always()
150-
run: |
151-
for out in pr/build/benchmarks/*/*.out master/build/benchmarks/*/*.out; do
152-
[ -f "$out" ] || continue
153-
yaml="${out%.out}.yaml"
154-
if [ ! -f "$yaml" ]; then
155-
echo "=== [FAILED] $out ==="
156-
cat "$out"
157-
fi
158-
done
159-
160-
- name: Print Per-Case Success Logs
148+
- name: Print Per-Case Logs
161149
if: always()
162150
run: |
163151
for out in pr/build/benchmarks/*/*.out master/build/benchmarks/*/*.out; do
164152
[ -f "$out" ] || continue
165153
yaml="${out%.out}.yaml"
166154
if [ -f "$yaml" ]; then
167155
echo "=== [PASSED] $out ==="
168-
cat "$out"
156+
else
157+
echo "=== [FAILED] $out ==="
169158
fi
159+
cat "$out"
170160
done
171161
172162
# All other runners (non-Phoenix) just run without special env

.github/workflows/phoenix/submit-job.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ else
6161
exit 1
6262
fi
6363

64-
job_slug="`basename "$1" | sed 's/\.sh$//' | sed 's/[^a-zA-Z0-9]/-/g'`-$2-$3"
64+
job_slug="$(basename "$1" | sed 's/\.sh$//' | sed 's/[^a-zA-Z0-9]/-/g')-$2-$3"
6565
output_file="$job_slug.out"
6666
id_file="${job_slug}.slurm_job_id"
6767

@@ -98,7 +98,7 @@ set -e
9898
set -x
9999
100100
cd "\$SLURM_SUBMIT_DIR"
101-
echo "Running in $(pwd):"
101+
echo "Running in \$(pwd):"
102102
103103
job_slug="$job_slug"
104104
job_device="$2"

0 commit comments

Comments
 (0)