diff --git a/.github/workflows/compile.yaml b/.github/workflows/compile.yaml index b69400d..2393d27 100644 --- a/.github/workflows/compile.yaml +++ b/.github/workflows/compile.yaml @@ -1,7 +1,7 @@ name: compile-slides 'on': push: - branches: [ master, main ] + branches: [ master, main, 3-speed-up-ci-with-caching ] jobs: build: @@ -14,6 +14,18 @@ jobs: submodules: true - name: get pu for preview run: sudo apt install poppler-utils +# https://github.com/actions/cache/issues/342 + - name: Caching + id: cache-slides + uses: actions/cache@v3 + with: + path: | + **/build/* + !**/build/*.pdf + overview/* + !Overview/*.pdf + key: ${{ runner.os }}-eidi-ss2022-slides-v2-${{ github.run_id }} + restore-keys: ${{ runner.os }}-eidi-ss2022-slides-v2- - name: use make docker to do the magic run: make docker - name: 'compiling the pdfs' diff --git a/data/makefile.meta b/data/makefile.meta index fa20a20..59d3f87 100644 --- a/data/makefile.meta +++ b/data/makefile.meta @@ -48,8 +48,9 @@ noanim_%-dark.pdf: $(DEPENDENCIES) # we only make use of temporary files to do not clutter define produce echo "${__FILECONTENT}" > "${__FILENAME}" - sltx raw-compile "${__FILENAME}" + latexmk -shell-escape -output-directory=build/ -pdf "${__FILENAME}" rm "${__FILENAME}" + mv build/*.pdf ./ endef clean: