Skip to content

Commit cceb57b

Browse files
committed
ci(github): streamline idf workflow
1 parent 7f77698 commit cceb57b

1 file changed

Lines changed: 9 additions & 37 deletions

File tree

.github/workflows/idf-build.yml

Lines changed: 9 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,25 @@
11
name: IDF Build (ESP32-P4)
22

33
on:
4-
pull_request:
54
push:
6-
branches: [main]
5+
pull_request:
76

87
jobs:
98
build:
109
runs-on: ubuntu-latest
11-
1210
steps:
13-
- name: Checkout (with submodules)
11+
- name: Checkout repository
1412
uses: actions/checkout@v4
1513
with:
16-
submodules: recursive
17-
18-
- name: Fetch third-party dependencies
19-
run: python fetch_repos.py
20-
21-
# Optional: speed up repeated builds (ccache)
22-
- name: Prepare ccache dir
23-
run: mkdir -p .ccache
14+
lfs: false
2415

25-
- name: Restore ccache
26-
uses: actions/cache@v4
27-
with:
28-
path: .ccache
29-
# ✅ FIX: pass multiple patterns as separate args to hashFiles()
30-
key: ccache-${{ runner.os }}-${{ github.ref_name }}-${{ hashFiles('**/CMakeLists.txt', '**/*.c', '**/*.cpp', 'sdkconfig*') }}
31-
restore-keys: |
32-
ccache-${{ runner.os }}-${{ github.ref_name }}-
33-
ccache-${{ runner.os }}-
34-
35-
- name: Build with ESP-IDF 5.4.x (esp32p4)
16+
- name: Build with ESP-IDF 5.4.2 for ESP32-P4
3617
uses: espressif/esp-idf-ci-action@v1
37-
env:
38-
IDF_TARGET: esp32p4
3918
with:
4019
esp_idf_version: v5.4.2
4120
target: esp32p4
42-
path: platforms/tab5
43-
# mount ccache dir inside the container
44-
extra_docker_args: "-v ${{ github.workspace }}/.ccache:/root/.ccache -e CCACHE_DIR=/root/.ccache"
45-
46-
- name: Upload firmware
47-
uses: actions/upload-artifact@v4
48-
with:
49-
name: m5tab5-firmware
50-
path: |
51-
platforms/tab5/build/**/*.bin
52-
platforms/tab5/build/**/*.elf
53-
platforms/tab5/build/**/*.map
21+
command: |
22+
. /opt/esp/idf/export.sh
23+
cd platforms/tab5
24+
idf.py set-target esp32p4
25+
idf.py build

0 commit comments

Comments
 (0)