diff options
author | Eli Schwartz <eschwartz@archlinux.org> | 2023-08-17 00:48:31 -0400 |
---|---|---|
committer | Eli Schwartz <eschwartz@archlinux.org> | 2023-08-18 11:16:15 -0400 |
commit | 9153b82cc2a1fdd98566d7ec6e1a153e106eb03d (patch) | |
tree | 08c2f014b68355c5742b6f609ca248fad8b50147 | |
parent | 5a827616b50c1d8dcf6a4d96142167dc91e85a1f (diff) | |
download | meson-9153b82cc2a1fdd98566d7ec6e1a153e106eb03d.zip meson-9153b82cc2a1fdd98566d7ec6e1a153e106eb03d.tar.gz meson-9153b82cc2a1fdd98566d7ec6e1a153e106eb03d.tar.bz2 |
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.
-rw-r--r-- | .github/workflows/website.yml | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/.github/workflows/website.yml b/.github/workflows/website.yml index fa322fb..1b0ed84 100644 --- a/.github/workflows/website.yml +++ b/.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 |