Files
univTypes/.gitea/workflows/typecheck.yml
T
JKFandClaude Opus 5.5 808e661c10
Typecheck / agda (push) Failing after 54s
Add Gitea Actions typecheck workflow
Typechecks Everything.agda (which imports every module) with Agda 2.7.0.1
and stdlib v2.2, checks that Everything.agda is complete and that
Axioms.agda contains the only postulates. Adds a status badge to the README.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 19:09:01 +01:00

62 lines
2.3 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: |
if [ ! -x ~/agda-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
fi
if [ ! -d ~/stdlib ]; then
git clone --depth 1 --branch "${STDLIB_VERSION}" https://github.com/agda/agda-stdlib ~/stdlib
fi
echo "$HOME/agda-bin" >> "$GITHUB_PATH"
mkdir -p ~/.config/agda
echo "$HOME/stdlib/standard-library.agda-lib" > ~/.config/agda/libraries
echo "standard-library" > ~/.config/agda/defaults
~/agda-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 'SubjectReduction/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