@@ -16,49 +16,41 @@ jobs:
1616 name : Lint style
1717 runs-on : ubuntu-latest
1818 steps :
19- - name : Check for long lines
20- if : always()
21- run : |
22- ! (find LeanCamCombi -name "*.lean" -type f -exec grep -E -H -n '^.{101,}$' {} \; | grep -v -E 'https?://')
19+ - name : Checkout project
20+ uses : actions/checkout@v4
21+ with :
22+ fetch-depth : 0
2323
2424 - name : Don't 'import Mathlib', use precise imports
2525 if : always()
2626 run : |
2727 ! (find LeanCamCombi -name "*.lean" -type f -print0 | xargs -0 grep -E -n '^import Mathlib$')
2828
29+ - name : Files in LeanCamCombi.Mathlib can't import LeanCamCombi files outside LeanCamCombi.Mathlib
30+ run : |
31+ ! (find LeanCamCombi/Mathlib -name "*.lean" -type f -print0 | xargs -0 grep -E -n '^import LeanCamCombi.(?!Mathlib)')
32+
2933 build_project :
3034 runs-on : ubuntu-latest
3135 name : Build project
3236 steps :
33- - name : Checkout project
34- uses : actions/checkout@v4
35-
36- - name : Copy README.md to website/index.md
37- run : cp README.md website/index.md
3837
39- - name : Check LeanCamCombi.Mathlib only imports from Mathlib or LeanCamCombi.Mathlib
40- run : python3 scripts/check_mathlib_imports.py
38+ # The following actions make sure the project builds properly.
4139
42- - name : Upstreaming dashboard
43- run : |
44- mkdir -p website/_includes
45- python3 scripts/upstreaming_dashboard.py
40+ - name : Checkout project
41+ uses : actions/checkout@v4
42+ with :
43+ fetch-depth : 0
4644
4745 - name : Install elan
48- run : curl https://raw.githubusercontent.com/leanprover/elan/master/elan-init.sh -sSf | sh -s -- -y --default-toolchain leanprover/lean4:4.15 .0
46+ run : curl https://raw.githubusercontent.com/leanprover/elan/master/elan-init.sh -sSf | sh -s -- -y --default-toolchain leanprover/lean4:4.18 .0
4947
5048 - name : Get cache
5149 run : ~/.elan/bin/lake exe cache get || true
5250
5351 - name : Build project
5452 run : ~/.elan/bin/lake build LeanCamCombi
5553
56- - name : File dependencies
57- run : |
58- sudo apt-get update
59- sudo apt install graphviz -y
60- ~/.elan/bin/lake exe graph website/file_deps.pdf
61-
6254 - name : Cache documentation
6355 uses : actions/cache@v4
6456 with :
@@ -69,25 +61,47 @@ jobs:
6961 - name : Build documentation
7062 run : scripts/build_docs.sh
7163
72- # - name: Build blueprint and copy to `website/blueprint`
64+ # - name: Build blueprint
7365 # uses: xu-cheng/texlive-action@v2
7466 # with:
75- # scheme: full
67+ # docker_image: ghcr.io/xu-cheng/texlive- full:20231201
7668 # run: |
69+ # # Install necessary dependencies and build the blueprint
7770 # apk update
7871 # apk add --update make py3-pip git pkgconfig graphviz graphviz-dev gcc musl-dev
7972 # git config --global --add safe.directory $GITHUB_WORKSPACE
8073 # git config --global --add safe.directory `pwd`
81- # python3 -m pip install --upgrade pip requests wheel
82- # python3 -m pip install pygraphviz --global-option=build_ext --global-option="-L/usr/lib/graphviz/" --global-option="-R/usr/lib/graphviz/"
83- # pip install -r blueprint/requirements.txt
84- # python3 -m pip install invoke
85- # inv all
74+ # python3 -m venv env
75+ # source env/bin/activate
76+ # pip install --upgrade pip requests wheel
77+ # pip install pygraphviz --global-option=build_ext --global-option="-L/usr/lib/graphviz/" --global-option="-R/usr/lib/graphviz/"
78+ # pip install leanblueprint
79+ # leanblueprint pdf
80+ # leanblueprint web
8681
87- - name : Copy documentation to `website/docs`
82+ # The following actions create and deploy the website.
83+
84+ - name : Copy documentation to website/docs
85+ run : mv docs/build/* website/docs
86+
87+ - name : Copy blueprint to website/blueprint
8888 run : |
89- mkdir -p website/docs
90- mv docs/build website/docs
89+ cp blueprint/print/print.pdf website/blueprint.pdf
90+ cp -r blueprint/web website/blueprint
91+
92+ - name : Copy README.md to website/index.md
93+ run : cp README.md website/index.md
94+
95+ - name : Upstreaming dashboard
96+ run : |
97+ mkdir -p website/_includes
98+ python3 scripts/upstreaming_dashboard.py
99+
100+ - name : File dependencies
101+ run : |
102+ sudo apt-get update
103+ sudo apt install graphviz -y
104+ ~/.elan/bin/lake exe graph website/file_deps.pdf
91105
92106 - name : Bundle dependencies
93107 uses : ruby/setup-ruby@v1
@@ -108,8 +122,3 @@ jobs:
108122 - name : Deploy to GitHub Pages
109123 id : deployment
110124 uses : actions/deploy-pages@v4
111-
112- - name : Make sure the cache works
113- run : |
114- mkdir -p docbuild/.lake/build/doc
115- mv website/docs docbuild/.lake/build/doc
0 commit comments