From 29aa60ea2f4846455a368e2928c733dc86f99da5 Mon Sep 17 00:00:00 2001 From: Jared Dohrman Date: Fri, 17 Apr 2026 12:28:41 +1000 Subject: [PATCH] ci: improve workflow caching for build checks --- .../actions/setup-build-environment/action.yml | 18 ++++++++++++++++-- .github/workflows/push-build-check.yml | 2 +- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/.github/actions/setup-build-environment/action.yml b/.github/actions/setup-build-environment/action.yml index 03790ec7..88b665e5 100644 --- a/.github/actions/setup-build-environment/action.yml +++ b/.github/actions/setup-build-environment/action.yml @@ -3,13 +3,27 @@ description: Setup Build Environment runs: using: "composite" steps: - - name: Init Cache + - name: Restore uv Cache uses: actions/cache@v5 with: path: | ~/.cache/uv + .venv + key: ${{ runner.os }}-py311-uv-${{ hashFiles('uv.lock', 'pyproject.toml') }} + restore-keys: | + ${{ runner.os }}-py311-uv- + + - name: Restore PlatformIO Cache + uses: actions/cache@v5 + with: + path: | ~/.platformio/.cache - key: ${{ runner.os }}-pio + ~/.platformio/packages + ~/.platformio/platforms + ~/.platformio/lib + key: ${{ runner.os }}-pio-${{ hashFiles('platformio.ini', 'variants/**/platformio.ini') }} + restore-keys: | + ${{ runner.os }}-pio- - name: Install Python uses: actions/setup-python@v6 diff --git a/.github/workflows/push-build-check.yml b/.github/workflows/push-build-check.yml index 3d8a821c..8983fd2e 100644 --- a/.github/workflows/push-build-check.yml +++ b/.github/workflows/push-build-check.yml @@ -8,7 +8,7 @@ on: - "examples/**" - "variants/**" - "platformio.ini" - - ".github/workflows/pr-build-check.yml" + - ".github/workflows/push-build-check.yml" jobs: build: