diff --git a/.github/workflows/pub-release.yml b/.github/workflows/pub-release.yml index 379a55fa..421de3e6 100644 --- a/.github/workflows/pub-release.yml +++ b/.github/workflows/pub-release.yml @@ -42,9 +42,12 @@ # # Libraries come from platformio.lock (tools/pio_lock.py): installed before # each env's first build, and the build fails when anything else resolved. -# Platform and toolchain are pinned in platformio.ini. With every input -# pinned, ~/.platformio and .pio/libdeps are cached under a key of the pin -# files: the same pins, the same packages. +# Platform and toolchain are pinned in platformio.ini. ~/.platformio keeps +# every version it ever installed side by side (platforms/@, +# packages likewise) and a build takes the pinned one, so the cache is one +# growing store: the newest is restored, new versions are added and saved +# under a new key only when a pin changed. Libraries are not cached: small, +# and an old version in .pio/libdeps/ would fail the lock check. name: pub-release "on": @@ -179,15 +182,15 @@ jobs: echo "title=$title" } >>"$GITHUB_OUTPUT" - # every input is pinned (see the header): the key is the pin files - - name: PlatformIO packages and locked libraries + # one store of every platform/toolchain version (see the header) + - name: PlatformIO platforms and packages uses: actions/cache@v5 with: path: | ~/.platformio/platforms ~/.platformio/packages - .pio/libdeps - key: pub-pio-${{ hashFiles('platformio.ini', 'variants/**/platformio.ini', 'platformio.lock') }} + key: pio-store-${{ hashFiles('platformio.ini', 'variants/**/platformio.ini') }} + restore-keys: pio-store- - name: Setup Build Environment uses: ./.github/actions/setup-build-environment