Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion .github/scripts/audit_axioms.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
#!/usr/bin/env bash
set -euo pipefail
root="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
if (( $# > 1 )); then
echo "usage: $0 [lake-workspace]" >&2
exit 2
fi
workspace="${1:-$root}"
if [[ ! -d "$workspace" ]]; then
echo "Lake workspace does not exist: $workspace" >&2
exit 2
fi
workspace="$(cd "$workspace" && pwd)"
cd "$root"
if command -v lake >/dev/null 2>&1; then
lake_cmd="$(command -v lake)"
Expand All @@ -10,7 +20,9 @@ else
echo "lake is not available" >&2
exit 127
fi
if ! output="$($lake_cmd env lean .github/scripts/audit_axioms.lean 2>&1)"; then
if ! output="$(
"$lake_cmd" -d="$workspace" env lean "$root/.github/scripts/audit_axioms.lean" 2>&1
)"; then
printf '%s\n' "$output" >&2
exit 1
fi
Expand Down
19 changes: 18 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,15 @@ jobs:
use-mathlib-cache: true
use-github-cache: false

- name: Restore CryptBoolean build cache
id: cryptboolean-cache
uses: actions/cache/restore@v6
with:
path: .lake/build
key: cryptboolean-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('lean-toolchain', 'lake-manifest.json', 'lakefile.lean', 'CryptBoolean.lean', 'CryptBoolean/**/*.lean') }}
restore-keys: |
cryptboolean-${{ runner.os }}-${{ runner.arch }}-

- name: Build release library as a dependency
env:
GH_TOKEN: ${{ github.token }}
Expand All @@ -97,7 +106,15 @@ jobs:
- name: Audit release proofs
run: |
./.github/scripts/forbidden_tokens.sh
./.github/scripts/audit_axioms.sh
./.github/scripts/audit_axioms.sh \
"$RUNNER_TEMP/cryptboolean-release-builder"

- name: Save CryptBoolean build cache
if: steps.cryptboolean-cache.outputs.cache-hit != 'true'
uses: actions/cache/save@v6
with:
path: .lake/build
key: ${{ steps.cryptboolean-cache.outputs.cache-primary-key }}

- name: Pack Lake release archive
run: |
Expand Down