forked from m5stack/M5Tab5-UserDemo
-
Notifications
You must be signed in to change notification settings - Fork 0
ci: streamline idf workflow #137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,53 +1,25 @@ | ||
| name: IDF Build (ESP32-P4) | ||
|
|
||
| on: | ||
| pull_request: | ||
| push: | ||
| branches: [main] | ||
| pull_request: | ||
|
|
||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout (with submodules) | ||
| - 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 | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[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 runspython fetch_repos.py(or any equivalent) to populatedependencies/with LVGL and other external components.platforms/tab5/CMakeLists.txtunconditionallyadd_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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@codex fix comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Summary
python3 fetch_repos.pyso LVGL and other dependencies are available before the build step executes. .github/workflows/idf-build.ymlL16-L26Testing
View task →