Skip to content

Commit 967c1f5

Browse files
committed
zephyr workspace cache
1 parent db01244 commit 967c1f5

File tree

1 file changed

+16
-8
lines changed

1 file changed

+16
-8
lines changed

.github/workflows/ci.yml

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,29 +21,37 @@ jobs:
2121
CMAKE_PREFIX_PATH: /opt/toolchains
2222

2323
steps:
24-
- name: Checkout code
24+
- name: 💾 Cache Zephyr Workspace
25+
uses: actions/cache@v4
26+
with:
27+
path: zephyr-workspace
28+
key: zephyr-workspace-${{ hashFiles('zephyr-workspace/zephyr/west.yml') }}
29+
30+
- name: 🧹 Clean Zephyr Manifest Directory
31+
# Clean the manifest directory to ensure a fresh start
32+
run: |
33+
rm -rf zephyr-workspace/zephyr-esp32-example
34+
rm -rf zephyr-workspace/.west
35+
36+
- name: ✅ Checkout code
2537
uses: actions/checkout@v4
2638
with:
2739
path: zephyr-workspace/zephyr-esp32-example
2840

2941
- name: ♻️ Initialize Zephyr Workspace
30-
# Set up the Zephyr workspace and install the Python dependencies
42+
# Set up the Zephyr workspace
3143
run: |
3244
cd zephyr-workspace
3345
rm -rf .west
3446
west init -l zephyr-esp32-example
3547
west update --narrow -o=--depth=1
3648
37-
- name: Cache ESP32 Blobs
49+
- name: 💾 Cache ESP32 Blobs
3850
uses: actions/cache@v4
39-
# the blobs are at /zephyr-workspace/modules/hal/espressif/zephyr/blobs
4051
with:
4152
path: zephyr-workspace/modules/hal/espressif/zephyr/blobs
42-
key: zephyr-esp32-blobs-main-${{ hashFiles('/zephyr-workspace/zephyr/west.yml') }}
43-
restore-keys: |
44-
zephyr-esp32-blobs-main-
53+
key: zephyr-esp32-blobs-${{ hashFiles('zephyr-workspace/zephyr/west.yml') }}
4554

46-
# fetch the ESP32 blobs
4755
- name: ⬇️ Fetch ESP32 Blobs
4856
run: |
4957
cd zephyr-workspace

0 commit comments

Comments
 (0)