Add cache for fetched deps and build artifacts
Compile All / compile (push) Successful in 55m29s

This commit is contained in:
2026-07-12 15:42:09 +00:00
parent 8285170f4d
commit e8913f1c82
+15
View File
@@ -20,6 +20,21 @@ jobs:
cp secrets.yaml.sample secrets.yaml
cp templates/secrets.yaml.sample templates/secrets.yaml
- name: Cache PlatformIO packages
uses: actions/cache@v4
with:
path: ~/.platformio
# Keyed on ESPHome version + YAML configs; bust when deps change
key: platformio-${{ hashFiles('flake.lock', '*.yaml', 'templates/*.yaml') }}
restore-keys: platformio-
- name: Cache ESPHome build artifacts
uses: actions/cache@v4
with:
path: .esphome
key: esphome-${{ hashFiles('*.yaml', 'templates/*.yaml') }}
restore-keys: esphome-
# Uses the ci shell, which installs esphome via pipx at the exact version
# pinned in Nix. The ci shell avoids nixpkgs wrapping platformio in bwrap,
# which fails on CI runners that disallow unprivileged user namespaces.