From cbd79a5e870579cfcbf0cac3c4e6f85ce6940d30 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Mon, 7 Apr 2025 18:05:57 -0500 Subject: [PATCH] =?UTF-8?q?=E2=9C=85=20Tweak=20pip/PIO=20caching?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci-build-tests.yml | 13 +++++++++---- .github/workflows/ci-unit-tests.yml | 13 +++++++++---- .github/workflows/ci-validate-boards.yml | 4 ++-- .github/workflows/ci-validate-pins.yml | 4 ++-- 4 files changed, 22 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci-build-tests.yml b/.github/workflows/ci-build-tests.yml index 58fd02eb5d..f80417c0fe 100644 --- a/.github/workflows/ci-build-tests.yml +++ b/.github/workflows/ci-build-tests.yml @@ -170,15 +170,20 @@ jobs: uses: actions/cache@v4 with: path: ~/.cache/pip - key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} + key: ${{ runner.os }}-pip-build-v1 restore-keys: | - ${{ runner.os }}-pip- + ${{ runner.os }}-pip-build- - name: Cache PlatformIO uses: actions/cache@v4 with: - path: ~/.platformio - key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }} + path: | + ~/.platformio + .pio/build + .pio/libdeps + key: ${{ runner.os }}-pio-build-v1 + restore-keys: | + ${{ runner.os }}-pio-build- - name: Select Python 3.9 uses: actions/setup-python@v5 diff --git a/.github/workflows/ci-unit-tests.yml b/.github/workflows/ci-unit-tests.yml index 9a311aabc6..30af812dff 100644 --- a/.github/workflows/ci-unit-tests.yml +++ b/.github/workflows/ci-unit-tests.yml @@ -46,15 +46,20 @@ jobs: uses: actions/cache@v4 with: path: ~/.cache/pip - key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} + key: ${{ runner.os }}-pip-unit-v1 restore-keys: | - ${{ runner.os }}-pip- + ${{ runner.os }}-pip-unit- - name: Cache PlatformIO uses: actions/cache@v4 with: - path: ~/.platformio - key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }} + path: | + ~/.platformio + .pio/build + .pio/libdeps + key: ${{ runner.os }}-pio-tests-v1 + restore-keys: | + ${{ runner.os }}-pio-tests- - name: Select Python 3.9 uses: actions/setup-python@v5 diff --git a/.github/workflows/ci-validate-boards.yml b/.github/workflows/ci-validate-boards.yml index baa7b8b6e1..36f3a3522a 100644 --- a/.github/workflows/ci-validate-boards.yml +++ b/.github/workflows/ci-validate-boards.yml @@ -33,9 +33,9 @@ jobs: uses: actions/cache@v4 with: path: ~/.cache/pip - key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} + key: ${{ runner.os }}-pip-boards-v1 restore-keys: | - ${{ runner.os }}-pip- + ${{ runner.os }}-pip-boards- - name: Select Python 3.9 uses: actions/setup-python@v5 diff --git a/.github/workflows/ci-validate-pins.yml b/.github/workflows/ci-validate-pins.yml index 695f8eff18..ae777427e7 100644 --- a/.github/workflows/ci-validate-pins.yml +++ b/.github/workflows/ci-validate-pins.yml @@ -36,9 +36,9 @@ jobs: uses: actions/cache@v4 with: path: ~/.cache/pip - key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} + key: ${{ runner.os }}-pip-pins-v1 restore-keys: | - ${{ runner.os }}-pip- + ${{ runner.os }}-pip-pins- - name: Select Python 3.9 uses: actions/setup-python@v5