Skip to content

Commit 1c629fb

Browse files
committed
[CI] Cache TeX depencencies installed by apt
1 parent 01b8ee6 commit 1c629fb

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

.github/workflows/build.yml

+12-6
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,11 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- uses: actions/checkout@v4
15-
- name: Setup environment
16-
run: |
17-
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
18-
sudo apt-get update
19-
sudo apt-get install ninja-build
20-
sudo apt-get install texlive*
15+
- name: Install apt dependencies with cache
16+
uses: awalsh128/cache-apt-pkgs-action@v1.4.2
17+
with:
18+
packages: ninja-build texlive-base texlive-latex-extra
19+
version: 1.0
2120
- name: Build
2221
run: |
2322
find . -iname '*.tex' -execdir pdflatex -output-directory $GITHUB_WORKSPACE {} \; || exit 1
@@ -34,6 +33,13 @@ jobs:
3433
runs-on: macos-latest
3534
steps:
3635
- uses: actions/checkout@v4
36+
- name: Cache brew packages
37+
uses: actions/cache@v4
38+
with:
39+
path: /usr/local/Homebrew
40+
key: ${{ runner.os }}-brew-${{ hashFiles('brew.txt') }}
41+
restore-keys: |
42+
${{ runner.os }}-brew-
3743
- name: Setup environment
3844
run: |
3945
brew install --cask mactex

0 commit comments

Comments
 (0)