-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrade blueprint to support Lean 4 (#2)
Per our discussion on [zulip](https://leanprover.zulipchat.com/#narrow/stream/113488-general/topic/Lean.204.20project.20blueprint/near/397963523), this PR upgrades blueprint to support Lean 4. CI passed and blueprint and doc are published to https://utensil.github.io/LeanAPAP/. Links to [Blueprint](https://utensil.github.io/LeanAPAP/blueprint/) or [Documentation](https://utensil.github.io/LeanAPAP/docs/) are working, and jumping from blueprint/depgragh to doc is also working (for theorems, because their names are all in lower case, unchanged from Lean 3 to Lean 4).
- Loading branch information
Showing
8 changed files
with
89 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,12 @@ on: | |
branches: | ||
- master | ||
|
||
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | ||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
jobs: | ||
build_project: | ||
runs-on: ubuntu-latest | ||
|
@@ -11,6 +17,22 @@ jobs: | |
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
steps: | ||
- name: Free Disk Space (Ubuntu) | ||
uses: jlumbroso/free-disk-space@main | ||
with: | ||
# this might remove tools that are actually needed, | ||
# if set to "true" but frees about 6 GB | ||
tool-cache: false | ||
|
||
# all of these default to true, but feel free to set to | ||
# "false" if necessary for your workflow | ||
android: true | ||
dotnet: true | ||
haskell: true | ||
large-packages: true | ||
docker-images: true | ||
swap-storage: true | ||
|
||
- name: Checkout project | ||
uses: actions/checkout@v2 | ||
with: | ||
|
@@ -25,15 +47,47 @@ jobs: | |
- name: Build project | ||
run: ~/.elan/bin/lake -Kenv=dev build LeanAPAP | ||
|
||
- uses: actions/cache@v3 | ||
name: Mathlib doc Cache | ||
with: | ||
path: build/doc/Mathlib | ||
key: DocGen4-${{ hashFiles('lake-manifest.json') }} | ||
restore-keys: | | ||
DocGen4- | ||
- name: Build documentation | ||
run: ~/.elan/bin/lake -Kenv=dev build LeanAPAP:docs | ||
|
||
- name: Copy documentation | ||
run: cp -R build/doc docs/ | ||
- name: Install Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.9' | ||
cache: 'pip' # caching pip dependencies | ||
|
||
- name: Install blueprint apt deps | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y graphviz libgraphviz-dev pdf2svg dvisvgm texlive-full | ||
- name: Install blueprint deps | ||
run: | | ||
cd blueprint && pip install -r requirements.txt | ||
- name: Build blueprint and copy to `docs/blueprint` | ||
run: | | ||
inv all | ||
- name: Copy documentation to `docs/docs` | ||
run: | | ||
mv build/doc docs/docs | ||
- name: Remove .gitignore for gh-pages | ||
run: rm docs/.gitignore | ||
|
||
- name: Count sorries | ||
run: | | ||
python scripts/count_sorry.py | ||
- name: Bundle dependencies | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
|
@@ -45,9 +99,11 @@ jobs: | |
working-directory: docs | ||
run: JEKYLL_ENV=production bundle exec jekyll build | ||
|
||
- name: Deploy | ||
uses: JamesIves/github-pages-[email protected] | ||
- name: Upload doc & blueprint artifact | ||
uses: actions/upload-pages-artifact@v1 | ||
with: | ||
SINGLE_COMMIT: true | ||
BRANCH: gh-pages # The branch the action should deploy to. | ||
FOLDER: docs/_site | ||
path: docs/_site | ||
|
||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,3 +13,4 @@ src/list_decls.lean | |
src/.noisy_files | ||
/build | ||
/lake-packages/* | ||
docs/_includes/sorries.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
invoke==1.7.1 | ||
plasTeX @ git+https://github.com/plastex/plastex.git | ||
leanblueprint @ git+https://github.com/utensil/leanblueprint.git@lean4-only | ||
watchfiles==0.16.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters