Skip to content

Commit 2acfc89

Browse files
ci: add reliable Agda job (version-matched agda-stdlib via git) (#106)
Gets Agda into CI **for real**, validated locally before pushing. Root cause of the four earlier failures: Ubuntu's `agda-stdlib` apt package ships sources with no usable library manifest. Fix: install just the Agda binary via apt, then `git clone` **agda-stdlib v1.7.3** (matches Agda 2.6.3) at a pinned tag, align its manifest `name:` to `standard-library` (what the repo's `absolute-zero.agda-lib` depends on), register, and type-check. Locally confirmed: `CNO.agda` and `OND.agda` both type-check (exit 0) with this exact toolchain. Coq + Z3 unchanged (already green). `timeout-minutes: 25` guards the first-run stdlib compile. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent bf6f1e0 commit 2acfc89

1 file changed

Lines changed: 29 additions & 8 deletions

File tree

.github/workflows/proofs.yml

Lines changed: 29 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,35 @@ jobs:
4848
make -f Makefile.all -j"$(nproc)"
4949
echo "✓ Coq: 14/14 theories compiled (CNO + OND)"
5050
51-
# NOTE: an Agda job was attempted but removed. Ubuntu's `agda-stdlib` package
52-
# ships the sources without a usable library manifest, and the apt Agda/stdlib
53-
# pairing on the runner would not resolve `standard-library` reliably across
54-
# four different setups (register / -i include path / synthesized .agda-lib).
55-
# Rather than ship a flaky red job, Agda is verified via the local/container
56-
# gate `proofs/verify-all-provers.sh` (which type-checks CNO.agda + OND.agda).
57-
# To re-add it, a pinned Agda toolchain (e.g. a Nix/setup-agda action with a
58-
# matching agda-stdlib) is the reliable route — not apt.
51+
agda:
52+
name: Agda — CNO + OND
53+
runs-on: ubuntu-24.04
54+
timeout-minutes: 25
55+
steps:
56+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v4
57+
- name: Install Agda (binary only)
58+
# Install just the `agda` binary (2.6.3 on 24.04). NOT `agda-stdlib` —
59+
# the Ubuntu stdlib package ships no usable library manifest; we fetch a
60+
# version-matched stdlib from git instead (validated locally).
61+
run: sudo apt-get update && sudo apt-get install -y agda
62+
- name: Fetch + register agda-stdlib v1.7.3 (matches Agda 2.6.3)
63+
run: |
64+
git clone -q --depth 1 --branch v1.7.3 \
65+
https://github.com/agda/agda-stdlib.git "$HOME/agda-stdlib"
66+
# The upstream manifest is named `standard-library-1.7.3`; the repo's
67+
# absolute-zero.agda-lib depends on `standard-library`, so align it.
68+
sed -i 's/^name: .*/name: standard-library/' \
69+
"$HOME/agda-stdlib/standard-library.agda-lib"
70+
mkdir -p "$HOME/.agda"
71+
echo "$HOME/agda-stdlib/standard-library.agda-lib" > "$HOME/.agda/libraries"
72+
echo "standard-library" > "$HOME/.agda/defaults"
73+
- name: Type-check CNO + OND (--safe --without-K)
74+
working-directory: proofs/agda
75+
run: |
76+
agda --version
77+
agda --safe --without-K CNO.agda
78+
agda --safe --without-K OND.agda
79+
echo "✓ Agda: CNO + OND type-check"
5980
6081
z3:
6182
name: Z3 — CNO + OND bounded checks

0 commit comments

Comments
 (0)