Skip to content

Commit 36719ec

Browse files
Refactor ESP32 test workflow: Simplify environment setup and improve caching strategy
1 parent 3252670 commit 36719ec

File tree

1 file changed

+10
-15
lines changed

1 file changed

+10
-15
lines changed

.github/workflows/esp32-test.yml

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,13 @@ jobs:
1818
build:
1919
runs-on: ubuntu-latest
2020

21+
env:
22+
ESP_IDF_VERSION: v5.5.1
23+
ESP_IDF_TOOLS_INSTALL_DIR: /opt/esp
24+
ESP_IDF_PATH: /opt/esp/idf
25+
SCCACHE_GHA_ENABLED: "true"
26+
RUSTC_WRAPPER: "sccache"
27+
2128
steps:
2229
- name: Checkout code
2330
uses: actions/checkout@v4
@@ -28,20 +35,11 @@ jobs:
2835
path: |
2936
~/.espressif
3037
/opt/esp
31-
key: ${{ runner.os }}-espidf-${{ hashFiles('validation/esp32-test/sdkconfig.defaults') }}
38+
key: ${{ runner.os }}-espidf-${{ env.ESP_IDF_VERSION }}-
3239
restore-keys: |
40+
${{ runner.os }}-espidf-${{ env.ESP_IDF_VERSION }}-
3341
${{ runner.os }}-espidf-
3442
35-
- name: Install ESP-IDF
36-
uses: espressif/install-esp-idf-action@v1
37-
with:
38-
version: "v5.5.1"
39-
40-
- name: Set ESP-IDF environment
41-
run: |
42-
echo "ESP_IDF_TOOLS_INSTALL_DIR=/opt/esp" >> $GITHUB_ENV
43-
echo "ESP_IDF_PATH=/opt/esp/idf" >> $GITHUB_ENV
44-
4543
- name: Set up Rust
4644
uses: dtolnay/rust-toolchain@master
4745
with:
@@ -56,7 +54,7 @@ jobs:
5654
with:
5755
workspaces: "validation/esp32-test"
5856

59-
- name: Setup | ldproxy
57+
- name: Setup ldproxy
6058
uses: taiki-e/cache-cargo-install-action@v2
6159
with:
6260
tool: ldproxy
@@ -65,9 +63,6 @@ jobs:
6563
working-directory: validation/esp32-test
6664
run: |
6765
cargo build --release
68-
env:
69-
SCCACHE_GHA_ENABLED: "true"
70-
RUSTC_WRAPPER: "sccache"
7166
7267
- name: Upload build artifacts
7368
uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)