use caches to speed up compilation
This commit is contained in:
parent
9225c03547
commit
92dc505b06
1 changed files with 32 additions and 6 deletions
|
@ -33,22 +33,48 @@ jobs:
|
||||||
.ci/deploy_to_build_repo.sh
|
.ci/deploy_to_build_repo.sh
|
||||||
env:
|
env:
|
||||||
REF_NAME: ${{ github.ref_name }}
|
REF_NAME: ${{ github.ref_name }}
|
||||||
- name: Compile documentation
|
- name: Clean up git files from build repo
|
||||||
if: github.ref == 'refs/heads/master'
|
if: github.ref == 'refs/heads/master'
|
||||||
run: |
|
run: rm -rf build/packages/.git
|
||||||
echo ${TEXINPUTS}
|
- name: Save built packages to cache
|
||||||
make doc
|
if: github.ref == 'refs/heads/master'
|
||||||
|
uses: actions/cache/save@v3
|
||||||
|
with:
|
||||||
|
path: build/packages/
|
||||||
|
key: ${{ github.ref }}-packages
|
||||||
|
|
||||||
|
pages:
|
||||||
|
runs-on: latex-latest
|
||||||
|
if: github.ref == 'refs/heads/master'
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: Load package cache
|
||||||
|
uses: actions/cache/restore@v3
|
||||||
|
with:
|
||||||
|
path: build/packages/
|
||||||
|
key: ${{ github.ref }}-packages
|
||||||
|
- name: Load compilation cache
|
||||||
|
uses: actions/cache/restore@v3
|
||||||
|
with:
|
||||||
|
path: .compile
|
||||||
|
key: ${{ github.ref }}-doc
|
||||||
|
- name: Compile documentation
|
||||||
|
run: make doc
|
||||||
env:
|
env:
|
||||||
TEXINPUTS: '${{ github.workspace }}/build/packages//:'
|
TEXINPUTS: '${{ github.workspace }}/build/packages//:'
|
||||||
- name: Prepage pages
|
- name: Prepage pages
|
||||||
if: github.ref == 'refs/heads/master'
|
|
||||||
run: |
|
run: |
|
||||||
cd build
|
cd build
|
||||||
rm -rf packages/.git # Don't deploy the git files
|
rm -rf packages/.git # Don't deploy the git files
|
||||||
zip -r latex-packages.zip packages/ -x '*.git*'
|
zip -r latex-packages.zip packages/ -x '*.git*'
|
||||||
zip -r latex-packages-doc.zip doc/
|
zip -r latex-packages-doc.zip doc/
|
||||||
- name: Deploy to pages
|
- name: Deploy to pages
|
||||||
if: github.ref == 'refs/heads/master'
|
|
||||||
uses: actions/pages@v1
|
uses: actions/pages@v1
|
||||||
with:
|
with:
|
||||||
directory: build/
|
directory: build/
|
||||||
|
- name: Upload compilation cache
|
||||||
|
uses: actions/cache/save@v3
|
||||||
|
with:
|
||||||
|
path: .compile
|
||||||
|
key: ${{ github.ref }}-doc
|
||||||
|
|
Loading…
Reference in a new issue