Skip to content

Commit 0e96ba6

Browse files
authored
Use lean-action in Lean CI job (#1319)
Use the official Lean GitHub action. This simplifies the workflow and fixes the recent installation issue that has come up in CI for Lean.
1 parent 09ba2ef commit 0e96ba6

File tree

1 file changed

+2
-26
lines changed

1 file changed

+2
-26
lines changed

.github/workflows/compile-lean.yml

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -30,37 +30,13 @@ jobs:
3030
with:
3131
sail-version: "latest"
3232

33-
- name: Install Lean
34-
run: |
35-
wget -q https://raw.githubusercontent.com/leanprover-community/mathlib4/master/scripts/install_debian.sh
36-
bash install_debian.sh ; rm -f install_debian.sh
37-
3833
- name: Build the Sail RISCV Model for Lean
3934
run: |
4035
eval $(opam config env)
4136
cmake -S . -B build -DCMAKE_BUILD_TYPE=RelWithDebInfo -G Ninja
4237
cmake --build build/ --target generated_lean_rv64d generated_lean_executable_rv64d
4338
44-
- name: Restore cached .lake directory
45-
id: cache-lake-restore
46-
uses: actions/cache/restore@v4
47-
with:
48-
path: |
49-
build/model/Lean_RV64D/.lake
50-
build/model/Lean_RV64D_executable/.lake
51-
key: ${{ matrix.os }}-lake
52-
5339
- name: Use Lean to build the model and report errors
54-
run: |
55-
source ~/.profile
56-
cd build/model/Lean_RV64D/
57-
lake build
58-
59-
- name: Save cached .lake directory
60-
id: cache-lake-save
61-
uses: actions/cache/save@v4
40+
uses: leanprover/lean-action@v1
6241
with:
63-
path: |
64-
build/model/Lean_RV64D/.lake
65-
build/model/Lean_RV64D_executable/.lake
66-
key: ${{ steps.cache-lake-restore.outputs.cache-primary-key }}
42+
lake-package-directory: "build/model/Lean_RV64D/"

0 commit comments

Comments
 (0)