CI: add pip caching to website job

On average, saves 20 seconds for a job that may take 1.5 or 2 minutes.
Mostly due to recompiling the same 3 wheels again and again, so that
avoids pointless CPU waste.
pull/12139/head
Eli Schwartz 2 years ago
parent 5a827616b5
commit 9153b82cc2
No known key found for this signature in database
GPG Key ID: CEB167EFB5722BD6
  1. 16
      .github/workflows/website.yml

@ -31,10 +31,26 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/cache/restore@v3
id: restore-cache
with:
# should use 'pip3 cache dir' to discover this path
path: ~/.cache/pip
key: website-pip-${{ github.run_number }}
restore-keys: website-pip-
- name: Install package
run: |
sudo apt-get -y install python3-pip ninja-build libjson-glib-dev
pip install hotdoc chevron strictyaml
- uses: actions/cache/save@v3
with:
# should use 'pip3 cache dir' to discover this path
path: ~/.cache/pip
key: website-pip-${{ github.run_number }}
- name: Setup SSH Keys and known_hosts
env:
SSH_AUTH_SOCK: /tmp/ssh_agent.sock

Loading…
Cancel
Save