Skip to content

Commit 6088e55

Browse files
hyperpolymathclaude
andcommitted
fix(ci): make the toolchain version asserts diagnosable
`idris2 --version | grep -Fx 'Idris 2, version 0.7.0'` failed the job with no output whatsoever: the pipeline swallowed the version, grep matched nothing, and `set -o pipefail` ended the step before anything was printed. The log gave no clue what version was actually installed. Capture the version, echo it, then assert. The Idris2 check now matches on the release ("0.7.0") rather than the whole string, since the digest-pinned idris2-pack image reports a build suffix. The Zig check keeps its exact equality but now reports what it found when it fails. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
1 parent e0fae51 commit 6088e55

1 file changed

Lines changed: 13 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,25 @@ jobs:
4747
shell: bash
4848
run: |
4949
set -euo pipefail
50-
idris2 --version | grep -Fx 'Idris 2, version 0.7.0'
50+
# Print the version before asserting on it: piping straight into
51+
# `grep -Fx` under `pipefail` made a mismatch fail with no output at
52+
# all, which is what happened here. The pinned image reports a build
53+
# suffix, so match on the release rather than the whole string.
54+
ver="$(idris2 --version)"
55+
echo "idris2 --version -> ${ver}"
56+
case "$ver" in
57+
*"0.7.0"*) ;;
58+
*) echo "::error::expected Idris 2 0.7.0, got: ${ver}"; exit 1 ;;
59+
esac
5160
idris2 --typecheck abi.ipkg
5261
5362
- name: Compile and test the Zig FFI
5463
shell: bash
5564
run: |
5665
set -euo pipefail
57-
test "$(zig version)" = '0.15.2'
66+
zver="$(zig version)"
67+
echo "zig version -> ${zver}"
68+
test "$zver" = '0.15.2' || { echo "::error::expected Zig 0.15.2, got: ${zver}"; exit 1; }
5869
zig fmt --check \
5970
src/interface/ffi/build.zig \
6071
src/interface/ffi/src/main.zig \

0 commit comments

Comments
 (0)