From 1c629fbc21a11a8ea3b8b1b558d9518b6a1c75ad Mon Sep 17 00:00:00 2001 From: Arseniy Obolenskiy Date: Sat, 5 Oct 2024 21:11:34 +0300 Subject: [PATCH] [CI] Cache TeX depencencies installed by apt --- .github/workflows/build.yml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 782c207..180ffb0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,12 +12,11 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: Setup environment - run: | - sudo add-apt-repository ppa:ubuntu-toolchain-r/test - sudo apt-get update - sudo apt-get install ninja-build - sudo apt-get install texlive* + - name: Install apt dependencies with cache + uses: awalsh128/cache-apt-pkgs-action@v1.4.2 + with: + packages: ninja-build texlive-base texlive-latex-extra + version: 1.0 - name: Build run: | find . -iname '*.tex' -execdir pdflatex -output-directory $GITHUB_WORKSPACE {} \; || exit 1 @@ -34,6 +33,13 @@ jobs: runs-on: macos-latest steps: - uses: actions/checkout@v4 + - name: Cache brew packages + uses: actions/cache@v4 + with: + path: /usr/local/Homebrew + key: ${{ runner.os }}-brew-${{ hashFiles('brew.txt') }} + restore-keys: | + ${{ runner.os }}-brew- - name: Setup environment run: | brew install --cask mactex