ci: streamline idf workflow#137
Conversation
There was a problem hiding this comment.
Codex Review: Here are some suggestions.
Reply with @codex fix comments to fix any unresolved comments.
About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you open a pull request for review, mark a draft as ready, or comment "@codex review". If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex fix this CI failure" or "@codex address that feedback".
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| submodules: recursive | ||
|
|
||
| - name: Fetch third-party dependencies | ||
| run: python fetch_repos.py | ||
|
|
||
| # Optional: speed up repeated builds (ccache) | ||
| - name: Prepare ccache dir | ||
| run: mkdir -p .ccache | ||
| lfs: false | ||
|
|
||
| - name: Restore ccache | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: .ccache | ||
| # ✅ FIX: pass multiple patterns as separate args to hashFiles() | ||
| key: ccache-${{ runner.os }}-${{ github.ref_name }}-${{ hashFiles('**/CMakeLists.txt', '**/*.c', '**/*.cpp', 'sdkconfig*') }} | ||
| restore-keys: | | ||
| ccache-${{ runner.os }}-${{ github.ref_name }}- | ||
| ccache-${{ runner.os }}- | ||
|
|
||
| - name: Build with ESP-IDF 5.4.x (esp32p4) | ||
| - name: Build with ESP-IDF 5.4.2 for ESP32-P4 | ||
| uses: espressif/esp-idf-ci-action@v1 | ||
| env: | ||
| IDF_TARGET: esp32p4 | ||
| with: | ||
| esp_idf_version: v5.4.2 | ||
| target: esp32p4 | ||
| path: platforms/tab5 | ||
| # mount ccache dir inside the container | ||
| extra_docker_args: "-v ${{ github.workspace }}/.ccache:/root/.ccache -e CCACHE_DIR=/root/.ccache" | ||
|
|
||
| - name: Upload firmware | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: m5tab5-firmware | ||
| path: | | ||
| platforms/tab5/build/**/*.bin | ||
| platforms/tab5/build/**/*.elf | ||
| platforms/tab5/build/**/*.map | ||
| command: | | ||
| . /opt/esp/idf/export.sh | ||
| cd platforms/tab5 | ||
| idf.py set-target esp32p4 | ||
| idf.py build |
There was a problem hiding this comment.
[P1] Fetch third-party repos before running idf.py
The workflow now checks out the repo and immediately calls idf.py build, but it no longer runs python fetch_repos.py (or any equivalent) to populate dependencies/ with LVGL and other external components. platforms/tab5/CMakeLists.txt unconditionally add_subdirectory’s those directories, so a clean runner will fail during configure because the repos are missing. This job will now always error out on a fresh checkout.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Summary
- Updated the ESP-IDF CI workflow to run
python3 fetch_repos.pyso LVGL and other dependencies are available before the build step executes. .github/workflows/idf-build.ymlL16-L26
Testing
⚠️ Tests not run (CI workflow change only).
Summary
Testing
https://chatgpt.com/codex/tasks/task_e_68ce5d85e4e8832496a2e11131f56186