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

Build both PDF and web in texlive-action (failed) #7

Merged
merged 2 commits into from
Dec 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
24 changes: 5 additions & 19 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,34 +65,20 @@ jobs:
python-version: '3.9'
cache: 'pip' # caching pip dependencies

- name: Install blueprint apt deps with cache
uses: awalsh128/cache-apt-pkgs-action@latest
with:
# texlive-binaries is for kpsewhich, which is a dependency of plastex/blueprint
packages: graphviz libgraphviz-dev pdf2svg dvisvgm texlive-binaries
version: 1.0

- name: Install blueprint dependencies
run: |
pip install -r blueprint/requirements.txt

- name: Build blueprint PDF
- name: Build blueprint
uses: xu-cheng/texlive-action@v2
with:
scheme: full
run: |
apk update
apk add --update make py3-pip git
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 pip install --upgrade pip requests wheel
python3 -m pip install pygraphviz --global-option=build_ext --global-option="-L/usr/lib/graphviz/" --global-option="-R/usr/lib/graphviz/"
pip install -r requirements.txt
python3 -m pip install invoke
inv bp

- name: Build blueprint website and copy blueprint to `docs/blueprint`
run: |
inv web
inv copy
inv all

- name: Copy Lean documentation to `docs/docs`
run: |
Expand Down
3 changes: 2 additions & 1 deletion blueprint/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
invoke==1.7.1
# https://github.com/pyinvoke/invoke/issues/891
invoke==2.2.0
plasTeX @ git+https://github.com/plastex/plastex.git
leanblueprint @ git+https://github.com/utensil/leanblueprint.git@lean4-only-dev
watchfiles==0.16.1
8 changes: 2 additions & 6 deletions tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,12 @@
ROOT = Path(__file__).parent
BP_DIR = ROOT/'blueprint'

@task
def copy(ctx):
@task(bp, web)
def all(ctx):
shutil.rmtree(ROOT/'docs'/'blueprint', ignore_errors=True)
shutil.copytree(ROOT/'blueprint'/'web', ROOT/'docs'/'blueprint')
shutil.copy2(ROOT/'blueprint'/'print'/'print.pdf', ROOT/'docs'/'blueprint.pdf')

@task(bp, web, copy)
def all(ctx):
pass

@task(web)
def html(ctx):
shutil.rmtree(ROOT/'docs'/'blueprint', ignore_errors=True)
Expand Down
Loading