From fdf240f81a3160bdedcefe27e023168ead954cf3 Mon Sep 17 00:00:00 2001 From: Eric Severance Date: Sat, 11 Jan 2025 14:22:25 -0800 Subject: [PATCH] Cache Python & PlatformIO dependencies --- .github/actions/build-variant/action.yml | 6 ++++++ .github/actions/setup-base/action.yml | 11 ++++------- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/actions/build-variant/action.yml b/.github/actions/build-variant/action.yml index d003459d6f..b24a5fc12b 100644 --- a/.github/actions/build-variant/action.yml +++ b/.github/actions/build-variant/action.yml @@ -68,6 +68,12 @@ runs: sed -i '/DDEBUG_HEAP/d' ${INI_FILE} done + - name: PlatformIO ${{ inputs.arch }} download cache + uses: actions/cache@v4 + with: + path: ~/.platformio/.cache + key: pio-cache-${{ inputs.arch }}-${{ hashFiles('.github/actions/**', '**.ini') }} + - name: Build ${{ inputs.board }} shell: bash run: ${{ inputs.build-script-path }} ${{ inputs.board }} diff --git a/.github/actions/setup-base/action.yml b/.github/actions/setup-base/action.yml index c0f6c4e664..77c8f0e106 100644 --- a/.github/actions/setup-base/action.yml +++ b/.github/actions/setup-base/action.yml @@ -26,13 +26,10 @@ runs: uses: actions/setup-python@v5 with: python-version: 3.x - - # - name: Cache python libs - # uses: actions/cache@v4 - # id: cache-pip # needed in if test - # with: - # path: ~/.cache/pip - # key: ${{ runner.os }}-pip + cache: pip + cache-dependency-path: | + .github/actions/** + **.ini - name: Upgrade python tools shell: bash