From 9153b82cc2a1fdd98566d7ec6e1a153e106eb03d Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Thu, 17 Aug 2023 00:48:31 -0400 Subject: 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. --- .github/workflows/website.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to '.github') diff --git a/.github/workflows/website.yml b/.github/workflows/website.yml index fa322fb42..1b0ed8465 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 -- cgit v1.2.3