Skip to content

Commit cbcee72

Browse files
fix(ci): make the toolchain version asserts diagnosable (#30)
`CI / required` failed on #28 at **`Typecheck the Idris2 ABI`** with *no output at all*: ```bash idris2 --version | grep -Fx 'Idris 2, version 0.7.0' ``` The pipeline swallowed the version, `grep -Fx` matched nothing, and `set -o pipefail` ended the step before anything reached the log — so the failure was undiagnosable from CI alone. ## Fix Capture the version, echo it, *then* assert: - **Idris2** now matches on the release (`*"0.7.0"*`) rather than the entire string. The digest-pinned `idris2-pack` image reports a build suffix, so exact-string equality could never have matched. The version pin is still enforced. - **Zig** keeps exact equality (`0.15.2`) but now reports what it actually found. Both print their version on success too, so the log records which toolchain ran. Follow-on from #28, which fixed the earlier failure in the same job (the image ships no `xz`, so `setup-zig` could not unpack its `.tar.xz`). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
1 parent e0fae51 commit cbcee72

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)