Skip to content

Commit 0b92cde

Browse files
committed
setup workflow to run CI
1 parent 06f48bf commit 0b92cde

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

.github/workflows/ci.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- master
8+
workflow_dispatch:
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: checkout
15+
uses: actions/checkout@v4
16+
17+
- name: install elan
18+
run: |
19+
curl https://raw.githubusercontent.com/leanprover/elan/master/elan-init.sh -sSf | sh -s -- -y --default-toolchain $(cat lean-toolchain)
20+
echo "$HOME/.elan/bin" >> $GITHUB_PATH
21+
22+
- name: Cache dependencies
23+
uses: actions/cache@v3
24+
with:
25+
path: .lake
26+
key: deps-${{ runner.os }}-${{ hashFiles('lean-toolchain') }}-${{ hashFiles('lake-manifest.json') }}
27+
restore-keys: |
28+
deps-${{ runner.os }}-${{ hashFiles('lean-toolchain') }}
29+
30+
- name: lake build
31+
run: lake build --quiet

lakefile.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ open Lake DSL
44
package «lean4-metaprogramming-book» where
55
srcDir := "lean"
66

7+
@[default_target]
78
lean_lib «lean4-metaprogramming-book» where
89
roots := #[`cover, `extra, `main, `solutions]
910
globs := #[Glob.one `cover, Glob.submodules `extra, Glob.submodules `main, Glob.submodules `solutions]

0 commit comments

Comments
 (0)