From 92dc505b06a382d79fa3d9c312439cb79bcb1d69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20Ke=C3=9Fler?= Date: Thu, 19 Oct 2023 12:56:19 +0200 Subject: [PATCH] use caches to speed up compilation --- .gitea/workflows/build.yaml | 38 +++++++++++++++++++++++++++++++------ 1 file changed, 32 insertions(+), 6 deletions(-) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index 1500073..c258d76 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -33,22 +33,48 @@ jobs: .ci/deploy_to_build_repo.sh env: REF_NAME: ${{ github.ref_name }} - - name: Compile documentation + - name: Clean up git files from build repo if: github.ref == 'refs/heads/master' - run: | - echo ${TEXINPUTS} - make doc + run: rm -rf build/packages/.git + - name: Save built packages to cache + 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: TEXINPUTS: '${{ github.workspace }}/build/packages//:' - name: Prepage pages - if: github.ref == 'refs/heads/master' run: | cd build rm -rf packages/.git # Don't deploy the git files zip -r latex-packages.zip packages/ -x '*.git*' zip -r latex-packages-doc.zip doc/ - name: Deploy to pages - if: github.ref == 'refs/heads/master' uses: actions/pages@v1 with: directory: build/ + - name: Upload compilation cache + uses: actions/cache/save@v3 + with: + path: .compile + key: ${{ github.ref }}-doc