Skip to content

Commit d56d382

Browse files
committed
fixup! fixup! chore(ci): faster build
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
1 parent bb743b5 commit d56d382

1 file changed

Lines changed: 31 additions & 7 deletions

File tree

.github/workflows/sphinxbuild.yml

Lines changed: 31 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,39 @@ permissions:
1111
contents: read
1212

1313
jobs:
14-
build:
14+
setup:
15+
name: Setup dependencies and cache
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- name: Cache LaTeX apt packages
20+
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
21+
with:
22+
path: /var/cache/apt/archives
23+
key: latex-apt-${{ runner.os }}-${{ hashFiles('.github/workflows/*.yml') }}
24+
restore-keys: |
25+
latex-apt-${{ runner.os }}-
26+
27+
- name: Install LaTeX dependencies
28+
run: |
29+
sudo DEBIAN_FRONTEND=noninteractive apt-get update
30+
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y \
31+
--no-install-recommends \
32+
python3-pil \
33+
texlive-fonts-recommended \
34+
latexmk \
35+
texlive-latex-extra \
36+
texlive-latex-recommended \
37+
texlive-xetex \
38+
texlive-fonts-extra-links \
39+
texlive-fonts-extra \
40+
xindy
41+
sudo chmod -R a+r /var/cache/apt/archives
1542
43+
build:
1644
name: Build ${{ matrix.manual.name }}
1745
runs-on: ubuntu-latest
46+
needs: setup
1847

1948
strategy:
2049
matrix:
@@ -58,7 +87,7 @@ jobs:
5887
- name: Checkout repository
5988
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
6089

61-
- name: Cache LaTeX apt packages
90+
- name: Restore LaTeX apt packages cache
6291
if: ${{ matrix.manual.build_pdf_path }}
6392
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
6493
with:
@@ -67,16 +96,11 @@ jobs:
6796
restore-keys: |
6897
latex-apt-${{ runner.os }}-
6998
70-
- name: Fix apt cache permissions
71-
if: ${{ matrix.manual.build_pdf_path }}
72-
run: sudo chmod -R a+r /var/cache/apt/archives
73-
7499
- name: Install LaTeX dependencies
75100
if: ${{ matrix.manual.build_pdf_path }}
76101
run: |
77102
sudo DEBIAN_FRONTEND=noninteractive apt-get update
78103
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y \
79-
--no-install-recommends \
80104
python3-pil \
81105
python3-pip \
82106
texlive-fonts-recommended \

0 commit comments

Comments
 (0)