Skip to content

Commit 53e5c39

Browse files
committed
perf(ci): optimize latex caching
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
1 parent 930ddd7 commit 53e5c39

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

.github/workflows/sphinxbuild.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ jobs:
3434
restore-keys: |
3535
latex-apt-${{ runner.os }}-${{ runner.arch }}-ubuntu-24.04-
3636
latex-apt-${{ runner.os }}-${{ runner.arch }}-
37+
lookup-only: true
3738

3839
- name: Download LaTeX packages (cache miss only)
3940
if: steps.cache-latex-apt.outputs.cache-hit != 'true'
@@ -47,6 +48,13 @@ jobs:
4748
# Ensure downloaded packages are owned by the current user so they can be cached
4849
sudo chown -R $(id -u):$(id -g) ${{ runner.temp }}/.cache/archives
4950
51+
- name: Save LaTeX apt cache (cache miss only)
52+
if: steps.cache-latex-apt.outputs.cache-hit != 'true'
53+
uses: actions/cache/save@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
54+
with:
55+
path: ${{ runner.temp }}/.cache/archives
56+
key: latex-apt-${{ runner.os }}-${{ runner.arch }}-ubuntu-24.04-texlive-2023
57+
5058
build:
5159
name: Build ${{ matrix.manual.name }}
5260
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)