Skip to content

Commit 6f43072

Browse files
authored
Merge pull request #22 from PatrickMassot/main
Test new CI
2 parents e022c63 + 558728b commit 6f43072

File tree

1 file changed

+27
-12
lines changed

1 file changed

+27
-12
lines changed

.github/workflows/push.yml

+27-12
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@ jobs:
3737
run: curl https://raw.githubusercontent.com/leanprover/elan/master/elan-init.sh -sSf | sh -s -- -y --default-toolchain none
3838

3939
- name: Get cache
40-
run: ~/.elan/bin/lake -Kenv=dev exe cache get || true
40+
run: ~/.elan/bin/lake exe cache get || true
4141

4242
- name: Build project
43-
run: ~/.elan/bin/lake -Kenv=dev build FLT
43+
run: ~/.elan/bin/lake build FLT
4444

4545
- name: Cache mathlib docs
4646
uses: actions/cache@v3
@@ -52,33 +52,43 @@ jobs:
5252
.lake/build/doc/Std
5353
.lake/build/doc/Mathlib
5454
.lake/build/doc/declarations
55+
!.lake/build/doc/declarations/declaration-data-FLT*
5556
key: MathlibDoc-${{ hashFiles('lake-manifest.json') }}
5657
restore-keys: |
5758
MathlibDoc-
5859
5960
- name: Build documentation
60-
run: ~/.elan/bin/lake -Kenv=dev build FLT:docs
61+
run: ~/.elan/bin/lake -R -Kenv=dev build FLT:docs
6162

6263
- name: Build blueprint
6364
uses: xu-cheng/texlive-action@v2
6465
with:
6566
docker_image: ghcr.io/xu-cheng/texlive-full:20231201
6667
run: |
67-
export PIP_BREAK_SYSTEM_PACKAGES=1
6868
apk update
6969
apk add --update make py3-pip git pkgconfig graphviz graphviz-dev gcc musl-dev
7070
git config --global --add safe.directory $GITHUB_WORKSPACE
7171
git config --global --add safe.directory `pwd`
72-
python3 -m pip install --upgrade pip requests wheel
73-
python3 -m pip install pygraphviz --global-option=build_ext --global-option="-L/usr/lib/graphviz/" --global-option="-R/usr/lib/graphviz/"
74-
pip install -r blueprint/requirements.txt
75-
python3 -m pip install invoke
76-
inv all
77-
78-
- name: Copy Lean documentation to `docs/docs`
72+
python3 -m venv env
73+
source env/bin/activate
74+
pip install --upgrade pip requests wheel
75+
pip install pygraphviz --global-option=build_ext --global-option="-L/usr/lib/graphviz/" --global-option="-R/usr/lib/graphviz/"
76+
pip install leanblueprint
77+
leanblueprint pdf
78+
mkdir -p docs
79+
cp blueprint/print/print.pdf docs/blueprint.pdf
80+
leanblueprint web
81+
cp -r blueprint/web docs/blueprint
82+
83+
- name: Check declarations
7984
run: |
80-
mv .lake/build/doc docs/docs
85+
~/.elan/bin/lake exe checkdecls blueprint/lean_decls
8186
87+
- name: Move documentation to `docs/docs`
88+
run: |
89+
sudo chown -R runner docs
90+
cp -r .lake/build/doc docs/docs
91+
8292
- name: Bundle dependencies
8393
uses: ruby/setup-ruby@v1
8494
with:
@@ -90,6 +100,11 @@ jobs:
90100
working-directory: docs
91101
run: JEKYLL_ENV=production bundle exec jekyll build
92102

103+
- name: Upload docs & blueprint artifact
104+
uses: actions/upload-pages-artifact@v1
105+
with:
106+
path: docs/
107+
93108
- name: Upload docs & blueprint artifact
94109
uses: actions/upload-pages-artifact@v1
95110
with:

0 commit comments

Comments
 (0)