Typecheck / agda (push) Successful in 1m54s
Specification/ (moved up from SubjectReduction/) holds only definitions. Metatheory/ holds the proofs about it: Substitution (was Composition), Levels/ (Equality, NormalForm, Decision), Confluence/ (Parallel, Modulo, Conversion) and Typing/ (Inversion, Substitution, SubjectReduction, Progress). Decidability/ groups SN/ (Inductive, Properties, Strong) and LogRel/ (Core, Lift, LevelValue, Universes). Theorems.agda re-exports the main results. Examples/ keeps the hand-written examples apart from the generated Tests/ (NatExample renamed to Tests/Nat). Module names, docs and the CI postulate check follow the new paths; no proof changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q7dfaHQ3dYSfqcxR7V5UrJ
64 lines
2.5 KiB
YAML
64 lines
2.5 KiB
YAML
name: Typecheck
|
|
|
|
on:
|
|
push:
|
|
pull_request:
|
|
|
|
jobs:
|
|
agda:
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
AGDA_VERSION: v2.7.0.1
|
|
STDLIB_VERSION: v2.2
|
|
steps:
|
|
# The modules are named `univTypes.…` and there is no .agda-lib,
|
|
# so the checkout directory must be called `univTypes`.
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
path: univTypes
|
|
|
|
- name: Cache Agda and stdlib (incl. its interface files)
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: |
|
|
~/agda-bin
|
|
~/stdlib
|
|
key: agda-${{ env.AGDA_VERSION }}-stdlib-${{ env.STDLIB_VERSION }}
|
|
|
|
- name: Install Agda and stdlib
|
|
run: |
|
|
# The release tarball contains Agda-<version>/{bin,data}.
|
|
if [ ! -x ~/agda-bin/bin/agda ]; then
|
|
mkdir -p ~/agda-bin
|
|
curl -fsSL "https://github.com/agda/agda/releases/download/${AGDA_VERSION}/Agda-${AGDA_VERSION}-linux.tar.xz" \
|
|
| tar xJ -C ~/agda-bin --strip-components=1
|
|
fi
|
|
if [ ! -d ~/stdlib ]; then
|
|
git -c advice.detachedHead=false clone --depth 1 --branch "${STDLIB_VERSION}" https://github.com/agda/agda-stdlib ~/stdlib
|
|
fi
|
|
echo "$HOME/agda-bin/bin" >> "$GITHUB_PATH"
|
|
echo "Agda_datadir=$HOME/agda-bin/data" >> "$GITHUB_ENV"
|
|
mkdir -p ~/.config/agda
|
|
echo "$HOME/stdlib/standard-library.agda-lib" > ~/.config/agda/libraries
|
|
echo "standard-library" > ~/.config/agda/defaults
|
|
Agda_datadir=~/agda-bin/data ~/agda-bin/bin/agda --version
|
|
|
|
- name: Check that Everything.agda imports every module
|
|
working-directory: univTypes
|
|
run: |
|
|
find . -name '*.agda' -not -path './.git/*' -not -name Everything.agda \
|
|
| sed 's|^\./||; s|\.agda$||; s|/|.|g; s|^|univTypes.|' | LC_ALL=C sort > expected
|
|
sed -n 's/^import //p' Everything.agda | LC_ALL=C sort > actual
|
|
diff -u expected actual || { echo "Everything.agda is out of date"; exit 1; }
|
|
|
|
- name: Check that Axioms.agda contains the only postulates
|
|
working-directory: univTypes
|
|
run: |
|
|
bad=$(grep -rlE '^\s*postulate|TERMINATING|NO_POSITIVITY_CHECK|NO_UNIVERSE_CHECK|trustMe' \
|
|
--include='*.agda' . | grep -v 'Specification/Axioms\.agda$' || true)
|
|
if [ -n "$bad" ]; then echo "Unsafe constructs found in:"; echo "$bad"; exit 1; fi
|
|
|
|
# Run from the parent directory: Agda resolves `univTypes.…` relative to it.
|
|
- name: Typecheck
|
|
run: agda univTypes/Everything.agda
|