From c06c8570549db62c947cb46cbcecf716c86904af Mon Sep 17 00:00:00 2001 From: Ben Allfree Date: Fri, 10 Apr 2026 11:26:41 -0700 Subject: [PATCH] Add caching for PlatformIO global store in CI workflows to improve build efficiency. Updated both custom_build.yml and custom_build_test.yml to include caching paths and keys. --- .github/workflows/custom_build.yml | 10 ++++++++++ .github/workflows/custom_build_test.yml | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/.github/workflows/custom_build.yml b/.github/workflows/custom_build.yml index 341a849..64cb284 100644 --- a/.github/workflows/custom_build.yml +++ b/.github/workflows/custom_build.yml @@ -82,6 +82,16 @@ jobs: ENC_REF=$(python3 -c "import urllib.parse,os; print(urllib.parse.quote(os.environ['REF'], safe=''))") curl -fsSL -o /tmp/src.zip "https://codeload.github.com/${OWNER}/${REPO}/zip/${ENC_REF}" + - name: Cache PlatformIO global store + uses: actions/cache@v4 + with: + path: | + ~/.platformio/.cache + ~/.platformio/packages + key: platformio-${{ runner.os }}-v1-${{ hashFiles('.github/workflows/custom_build.yml', '.github/workflows/custom_build_test.yml') }} + restore-keys: | + platformio-${{ runner.os }}-v1- + - name: Extract and build id: pio env: diff --git a/.github/workflows/custom_build_test.yml b/.github/workflows/custom_build_test.yml index 341a849..64cb284 100644 --- a/.github/workflows/custom_build_test.yml +++ b/.github/workflows/custom_build_test.yml @@ -82,6 +82,16 @@ jobs: ENC_REF=$(python3 -c "import urllib.parse,os; print(urllib.parse.quote(os.environ['REF'], safe=''))") curl -fsSL -o /tmp/src.zip "https://codeload.github.com/${OWNER}/${REPO}/zip/${ENC_REF}" + - name: Cache PlatformIO global store + uses: actions/cache@v4 + with: + path: | + ~/.platformio/.cache + ~/.platformio/packages + key: platformio-${{ runner.os }}-v1-${{ hashFiles('.github/workflows/custom_build.yml', '.github/workflows/custom_build_test.yml') }} + restore-keys: | + platformio-${{ runner.os }}-v1- + - name: Extract and build id: pio env: