Skip to content

Commit beb785e

Browse files
authored
Install mosquitto and ccache through the cached apt action (#2586)
1 parent 7681744 commit beb785e

1 file changed

Lines changed: 15 additions & 6 deletions

File tree

.github/workflows/test.yml

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -365,8 +365,15 @@ jobs:
365365
python-version: "3.14"
366366
install-args: -c esphome-constraints.txt -e .[esphome,test]
367367

368-
- name: Install mosquitto
369-
run: sudo apt-get update && sudo apt-get install -y mosquitto
368+
- name: Install mosquitto (cached)
369+
# Cache-hit restores skip ``apt-get update`` entirely, so an apt
370+
# mirror outage can't hang the job; the timeout bounds the
371+
# cold-cache install path.
372+
timeout-minutes: 10
373+
uses: awalsh128/cache-apt-pkgs-action@553a35bb8ebd9fcabcb1c9451aa4c98e1b4ca8a9 # v1.6.3
374+
with:
375+
packages: mosquitto
376+
version: 1.0
370377

371378
- name: Run MQTT discovery e2e
372379
timeout-minutes: 5
@@ -465,14 +472,16 @@ jobs:
465472
restore-keys: |
466473
e2e-espidf-ccache-${{ runner.os }}-
467474
468-
- name: Install ccache
475+
- name: Install ccache (cached)
469476
# esphome's native-IDF build enables ccache whenever the binary is
470477
# on PATH (``espidf/framework.py``'s ``_ccache_env``) and respects
471478
# a pre-set CCACHE_DIR, so the run step below points it at the
472479
# dedicated cached dir instead of the default inside the prefix.
473-
run: |
474-
sudo apt-get update -qq
475-
sudo apt-get install -y --no-install-recommends ccache
480+
timeout-minutes: 10
481+
uses: awalsh128/cache-apt-pkgs-action@553a35bb8ebd9fcabcb1c9451aa4c98e1b4ca8a9 # v1.6.3
482+
with:
483+
packages: ccache
484+
version: 1.0
476485

477486
- name: Run native ESP-IDF e2e
478487
# A cold native-IDF compile installs the IDF toolchain then runs

0 commit comments

Comments
 (0)