Skip to content

Commit

Permalink
Fix lean build setup and add CI
Browse files Browse the repository at this point in the history
  • Loading branch information
eric-wieser committed Jul 18, 2024
1 parent 84beb3b commit 4817f3e
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 3 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/lean.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
on:
push:
pull_request:

name: build lean

jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: install elan
run: |
set -o pipefail
curl -sSfL https://github.com/leanprover/elan/releases/download/v3.1.1/elan-x86_64-unknown-linux-gnu.tar.gz | tar xz
./elan-init -y --default-toolchain none
echo "$HOME/.elan/bin" >> $GITHUB_PATH
- uses: actions/checkout@v3
- name: Set up olean cache
uses: actions/cache@v3
with:
path: ~/.cache
key: oleans

- name: Configure
run: |
lake exe cache get
- name: Build
run: |
lake build
- name: Save olean cache
run: |
lake exe cache pack
6 changes: 3 additions & 3 deletions lean4/lakefile.lean
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ open Lake DSL

package «putnam» where
-- add package configuration options here
require mathlib from git "https://github.com/leanprover-community/mathlib4" @ "v4.7.0-rc2"
require mathlib from git "https://github.com/leanprover-community/mathlib4" @ "v4.7.0-rc2"

@[default_target]
lean_lib «putnam» {
}
lean_lib «putnam» where
globs := #[.submodules `src]

0 comments on commit 4817f3e

Please sign in to comment.