File tree Expand file tree Collapse file tree 8 files changed +71
-188
lines changed
Expand file tree Collapse file tree 8 files changed +71
-188
lines changed Original file line number Diff line number Diff line change @@ -61,19 +61,15 @@ jobs:
6161 sudo apt install graphviz -y
6262 ~/.elan/bin/lake exe graph website/file_deps.pdf
6363
64- - name : Cache dependencies docs
65- uses : actions/cache@v3
64+ - name : Cache documentation
65+ uses : actions/cache@v4
6666 with :
67- path : docbuild/.lake/build/doc
67+ path : docs/docs
6868 key : MathlibDoc-${{ hashFiles('lake-manifest.json') }}
69- restore-keys : |
70- MathlibDoc-
69+ restore-keys : MathlibDoc-
7170
7271 - name : Build documentation
73- working-directory : docbuild
74- run : |
75- ~/.elan/bin/lake exe cache get || true
76- ~/.elan/bin/lake build LeanCamCombi:docs
72+ run : scripts/build_docs.sh
7773
7874 # - name: Build blueprint and copy to `website/blueprint`
7975 # uses: xu-cheng/texlive-action@v2
9187 # inv all
9288
9389 - name : Copy documentation to `website/docs`
94- run : |
95- mv docbuild/.lake/build/doc website/docs
90+ run : mv docs/build website/docs
9691
9792 - name : Bundle dependencies
9893 uses : ruby/setup-ruby@v1
Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ name = " LeanCamCombi"
2+ defaultTargets = [" LeanCamCombi" ]
3+
4+ [leanOptions ]
5+ autoImplicit = false # Prevent typos to be interpreted as new free variables
6+ relaxedAutoImplicit = false
7+ pp.unicode.fun = true # Pretty-print lambdas as `fun a ↦ b`
8+ pp.proofs.withType = false # Elide the types of proofs in terms
9+
10+ [[require ]]
11+ name = " mathlib"
12+ git = " https://github.com/leanprover-community/mathlib4.git"
13+
14+ [[lean_lib ]]
15+ name = " LeanCamCombi"
Original file line number Diff line number Diff line change 1+ # Build HTML documentation for add-combi
2+ # The output will be located in docs/build
3+
4+ # Template lakefile.toml
5+ template () {
6+ cat << EOF
7+ name = "docbuild"
8+ reservoir = false
9+ version = "0.1.0"
10+ packagesDir = "../.lake/packages"
11+
12+ [[require]]
13+ name = "LeanCamCombi"
14+ path = "../"
15+
16+ [[require]]
17+ scope = "leanprover"
18+ name = "doc-gen4"
19+ rev = "TOOLCHAIN"
20+ EOF
21+ }
22+
23+ # Create a temporary docbuild folder
24+ mkdir -p docbuild
25+
26+ # Equip docbuild with the template lakefile.toml
27+ template > docbuild/lakefile.toml
28+
29+ # Substitute the toolchain from lean-toolchain into docbuild/lakefile.toml
30+ sed -i s/TOOLCHAIN/` grep -oP ' v4\..*' lean-toolchain` / docbuild/lakefile.toml
31+
32+ # Fetch the docs cache if it exists
33+ mkdir -p docs/docs
34+ mv docs/docs docbuild/.lake/build/doc
35+
36+ # Initialise docbuild as a Lean project
37+ cd docbuild
38+ MATHLIB_NO_CACHE_ON_UPDATE=1 # Disable an error message due to a non-blocking bug. See Zulip
39+ ~ /.elan/bin/lake update LeanCamCombi
40+ ~ /.elan/bin/lake exe cache get
41+
42+ # Build the docs
43+ ~ /.elan/bin/lake build LeanCamCombi:docs
44+
45+ # Move them out of docbuild
46+ cd ../
47+ mv docbuild/.lake/build/doc docs/build
48+
49+ # Clean up after ourselves
50+ rm -rf docbuild
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments