Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Speed up CI #34

Merged
merged 43 commits into from
Jul 8, 2024
Merged
Show file tree
Hide file tree
Changes from 41 commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
de5da0f
Update push.yml
pitmonticone Jul 6, 2024
9e340db
Update push.yml
pitmonticone Jul 6, 2024
97ea6df
Update push.yml
pitmonticone Jul 6, 2024
baf36f9
Update push.yml
pitmonticone Jul 6, 2024
80240b3
Update push.yml
pitmonticone Jul 6, 2024
7fc5903
Exclude directories requiring special permissions
pitmonticone Jul 6, 2024
42db139
Update push.yml
pitmonticone Jul 6, 2024
dedbc9e
Update push.yml
pitmonticone Jul 6, 2024
a550192
Update push.yml
pitmonticone Jul 6, 2024
cea3053
Update push.yml
pitmonticone Jul 6, 2024
967c9e4
Update push.yml
pitmonticone Jul 6, 2024
0fc58f3
Update push.yml
pitmonticone Jul 6, 2024
9c78d44
Add useful comments
pitmonticone Jul 6, 2024
b21f806
Use `cache-apt-pkgs-action`
pitmonticone Jul 6, 2024
40a900f
Minimal dependencies
pitmonticone Jul 6, 2024
b942750
Test cache + minimal imports
pitmonticone Jul 6, 2024
9a5aacc
Update push.yml
pitmonticone Jul 6, 2024
415d58e
Update push.yml
pitmonticone Jul 6, 2024
864e5a3
Update push.yml
pitmonticone Jul 6, 2024
c3654ff
Update push.yml
pitmonticone Jul 6, 2024
81ca0ec
run `tlmgr ` in admin mode
pitmonticone Jul 6, 2024
3c1839b
Merge branch 'gh-actions' of https://github.com/fpvandoorn/BonnAnalys…
pitmonticone Jul 6, 2024
1b8437a
Update push.yml
pitmonticone Jul 6, 2024
6ca7d14
Use `texlive-full`
pitmonticone Jul 6, 2024
3ba439c
Update push.yml
pitmonticone Jul 6, 2024
c603320
Update push.yml
pitmonticone Jul 6, 2024
b0716d3
Cache and install blueprint apt dependencies
pitmonticone Jul 6, 2024
fe7556c
Remove unnecessary comments
pitmonticone Jul 6, 2024
ed6cb5a
Reduced apt dependencies
pitmonticone Jul 6, 2024
14718a0
Add effective dependencies
pitmonticone Jul 6, 2024
839e815
Generate XeLaTeX format
pitmonticone Jul 6, 2024
444da32
Update push.yml
pitmonticone Jul 6, 2024
7d66160
Update push.yml
pitmonticone Jul 6, 2024
fd63c99
Update push.yml
pitmonticone Jul 6, 2024
992d58f
Bump doc-gen4
pitmonticone Jul 7, 2024
0497e93
Bump
pitmonticone Jul 7, 2024
1d27ace
Bump
pitmonticone Jul 7, 2024
f1afc15
Remove lake files from documentation
pitmonticone Jul 7, 2024
6a1486d
Update push.yml
pitmonticone Jul 7, 2024
2477ed7
Add `restore-keys`
pitmonticone Jul 8, 2024
289c227
Fix manifest
pitmonticone Jul 8, 2024
c3cb053
Revert manifest + update doc-gen
pitmonticone Jul 8, 2024
9317860
Update doc-gen
pitmonticone Jul 8, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 39 additions & 29 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ on:
push:
branches:
- master
- gh-actions
pitmonticone marked this conversation as resolved.
Show resolved Hide resolved

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
Expand All @@ -14,6 +15,7 @@ jobs:
name: Lint style
runs-on: ubuntu-latest
steps:
# Check for long lines in .lean files and report if any lines exceed 100 characters
- name: Check for long lines
if: always()
run: |
Expand All @@ -29,19 +31,18 @@ jobs:
fetch-depth: 0

- name: Install elan
run: |
curl https://raw.githubusercontent.com/leanprover/elan/master/elan-init.sh -sSf | sh -s -- -y --default-toolchain leanprover/lean4:4.0.0 # Install Lean 4
run: curl https://raw.githubusercontent.com/leanprover/elan/master/elan-init.sh -sSf | sh -s -- -y --default-toolchain none

- name: Update docgen4
run: ~/.elan/bin/lake -R -Kenv=dev update «doc-gen4»
# - name: Update doc-gen4
# run: ~/.elan/bin/lake -R -Kenv=dev update «doc-gen4»

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

- name: Build project
run: ~/.elan/bin/lake -Kenv=dev build BonnAnalysis

- name: Cache mathlib docs
- name: Cache mathlib documentation
uses: actions/cache@v3
with:
path: |
Expand All @@ -53,29 +54,30 @@ jobs:
.lake/build/doc/declarations
!.lake/build/doc/declarations/declaration-data-BonnAnalysis*
key: MathlibDoc-${{ hashFiles('lake-manifest.json') }}
restore-keys: |
MathlibDoc- # Cache Mathlib documentation to save rebuild time

- name: Build documentation
run: ~/.elan/bin/lake -Kenv=dev build BonnAnalysis:docs # Build project documentation

- name: Install Python
uses: actions/setup-python@v4
with:
python-version: '3.9'
cache: 'pip'

- name: Install blueprint apt dependencies
run: |
sudo apt-get update
sudo apt-get install -y graphviz libgraphviz-dev pdf2svg dvisvgm texlive-full # Install necessary system packages for blueprint
restore-keys: MathlibDoc-

- name: Install blueprint dependencies
run: |
cd blueprint && pip install -r requirements.txt # Install Python dependencies for blueprint
- name: Build project documentation
run: ~/.elan/bin/lake -Kenv=dev build BonnAnalysis:docs

- name: Build blueprint and copy to `docs/blueprint`
run: inv all
uses: xu-cheng/texlive-action@v2
with:
docker_image: ghcr.io/xu-cheng/texlive-full:20231201
run: |
export PIP_BREAK_SYSTEM_PACKAGES=1
apk update
apk add --update make py3-pip git pkgconfig graphviz graphviz-dev gcc musl-dev
git config --global --add safe.directory $GITHUB_WORKSPACE
git config --global --add safe.directory `pwd`
python3 -m venv env
source env/bin/activate
pip install --upgrade pip requests wheel
pip install pygraphviz --global-option=build_ext --global-option="-L/usr/lib/graphviz/" --global-option="-R/usr/lib/graphviz/"
pip install leanblueprint
leanblueprint pdf
cp blueprint/print/print.pdf docs/blueprint.pdf
leanblueprint web
cp -r blueprint/web docs/blueprint

- name: Remove lake files from documentation
run: |
Expand All @@ -85,7 +87,7 @@ jobs:
- name: Copy documentation to `docs/docs`
run: |
sudo chown -R runner docs
cp -r .lake/build/doc docs/docs # Copy the built documentation to the correct directory
cp -r .lake/build/doc docs/docs

- name: Bundle dependencies
uses: ruby/setup-ruby@v1
Expand All @@ -96,13 +98,21 @@ jobs:

- name: Bundle website
working-directory: docs
run: JEKYLL_ENV=production bundle exec jekyll build # Build the Jekyll site for production
run: JEKYLL_ENV=production bundle exec jekyll build

- name: Upload docs & blueprint artifact
# - name: Upload docs & blueprint artifact to `docs/`
# uses: actions/upload-pages-artifact@v1
# with:
# path: docs/

- name: Upload docs & blueprint artifact to `docs/_site`
uses: actions/upload-pages-artifact@v1
with:
path: docs/_site

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
uses: actions/deploy-pages@v1

- name: Make sure the cache works
run: mv docs/docs .lake/build/doc
68 changes: 34 additions & 34 deletions lake-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"type": "git",
"subDir": null,
"scope": "leanprover-community",
"rev": "26b4e42e8e9c45c3ded44a4d161161bef430d446",
"rev": "deb5bd446a108da8aa8c1a1b62dd50722b961b73",
"name": "aesop",
"manifestFile": "lake-manifest.json",
"inputRev": "master",
Expand Down Expand Up @@ -55,7 +55,7 @@
"type": "git",
"subDir": null,
"scope": "leanprover-community",
"rev": "d366a602cc4a325a6f9db3a3991dfa6d6cf409c5",
"rev": "68b518c9b352fbee16e6d632adcb7a6d0760e2b7",
"name": "importGraph",
"manifestFile": "lake-manifest.json",
"inputRev": "main",
Expand All @@ -71,35 +71,35 @@
"inputRev": null,
"inherited": false,
"configFile": "lakefile.lean"},
{"url": "https://github.com/acmepjz/md4lean",
"type": "git",
"subDir": null,
"scope": "",
"rev": "9148a0a7506099963925cf239c491fcda5ed0044",
"name": "MD4Lean",
"manifestFile": "lake-manifest.json",
"inputRev": "main",
"inherited": true,
"configFile": "lakefile.lean"},
{"url": "https://github.com/fgdorais/lean4-unicode-basic",
"type": "git",
"subDir": null,
"scope": "",
"rev": "c74a052aebee847780e165611099854de050adf7",
"name": "UnicodeBasic",
"manifestFile": "lake-manifest.json",
"inputRev": "main",
"inherited": true,
"configFile": "lakefile.lean"},
{"url": "https://github.com/leanprover/doc-gen4",
"type": "git",
"subDir": null,
"scope": "",
"rev": "5cf3352cd6090e58c5ee878c786af8b87e8bdd65",
"name": "«doc-gen4»",
"manifestFile": "lake-manifest.json",
"inputRev": "main",
"inherited": false,
pitmonticone marked this conversation as resolved.
Show resolved Hide resolved
"configFile": "lakefile.lean"}],
"name": "bonnAnalysis",
"lakeDir": ".lake"}
{"url": "https://github.com/acmepjz/md4lean",
"type": "git",
"subDir": null,
"scope": "",
"rev": "9148a0a7506099963925cf239c491fcda5ed0044",
"name": "MD4Lean",
"manifestFile": "lake-manifest.json",
"inputRev": "main",
"inherited": true,
"configFile": "lakefile.lean"},
{"url": "https://github.com/fgdorais/lean4-unicode-basic",
"type": "git",
"subDir": null,
"scope": "",
"rev": "c74a052aebee847780e165611099854de050adf7",
"name": "UnicodeBasic",
"manifestFile": "lake-manifest.json",
"inputRev": "main",
"inherited": true,
"configFile": "lakefile.lean"},
{"url": "https://github.com/leanprover/doc-gen4",
"type": "git",
"subDir": null,
"scope": "",
"rev": "d1be57c7fbd80ac20584ed0a86a2165c62cd993b",
"name": "«doc-gen4»",
"manifestFile": "lake-manifest.json",
"inputRev": "main",
"inherited": false,
"configFile": "lakefile.lean"}],
"name": "bonnAnalysis",
"lakeDir": ".lake"}
pitmonticone marked this conversation as resolved.
Show resolved Hide resolved
Loading