forked from espressif/esp32-arduino-lib-builder
-
Notifications
You must be signed in to change notification settings - Fork 25
Build and integrate slave firmware #117
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
Show all changes
27 commits
Select commit
Hold shift + click to select a range
a6cbfa8
initial not working slave firmware build
Jason2866 c605b00
fixes
Jason2866 fa89040
uv venv
Jason2866 4858378
no need for Arduino install for slave firmware
Jason2866 86f6be2
no need for other extra components
Jason2866 5fca544
Hopefully changed artifact workflows are correct
Jason2866 9ff25a3
Update build.sh
Jason2866 7f48ccc
as expected path...
Jason2866 583e0d7
try to simplify
Jason2866 a09184f
remove not needed copy
Jason2866 a1aca06
build in parallel jobs
Jason2866 3a6684f
hate path stuff with artifacts
Jason2866 f019eb7
debug list dir
Jason2866 33b610b
poc parallel build
Jason2866 cb379ea
next...
Jason2866 7e0a047
next...
Jason2866 f91504f
debug ls
Jason2866 f1d9a62
rename
Jason2866 4008541
working
Jason2866 32536df
Update build.sh
Jason2866 cec6367
Update parallel_build.yaml
Jason2866 6abfc99
Update push.yml
Jason2866 576c7b4
ensure ccache is on
Jason2866 62b8759
Update parallel_build.yaml
Jason2866 401bafe
Update parallel_build.yaml
Jason2866 7fcdb34
Update parallel_build.yaml
Jason2866 4353de5
Update parallel_build.yaml
Jason2866 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 |
---|---|---|
@@ -0,0 +1,121 @@ | ||
name: IDF v5.4 parallel build | ||
|
||
on: | ||
workflow_dispatch: # Manually start a workflow | ||
|
||
jobs: | ||
build-libs: | ||
name: Build Libs for ${{ matrix.target }} | ||
runs-on: macos-14 | ||
strategy: | ||
matrix: | ||
target: [esp32, esp32s2, esp32s3, esp32c2, esp32c3, esp32c6, esp32h2, esp32p4] | ||
fail-fast: true | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.11' | ||
- name: Install dependencies | ||
run: bash ./tools/prepare-ci.sh | ||
- name: Get current branch | ||
run: | | ||
echo "GIT_BRANCH=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_ENV | ||
- name: Build Libs for ${{ matrix.target }} | ||
run: bash ./build.sh -e -t ${{ matrix.target }} | ||
- name: Upload artifacts for ${{ matrix.target }} | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: artifacts-${{ matrix.target }} | ||
path: dist | ||
|
||
build-slave_firmware: | ||
name: Build Slave Firmware | ||
runs-on: macos-14 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.11' | ||
- name: Install dependencies | ||
run: bash ./tools/prepare-ci.sh | ||
- name: Build slave firmware | ||
run: | | ||
bash ./tools/compile_slave.sh | ||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: slave_firmware | ||
path: wifi_copro_fw | ||
|
||
combine-artifacts: | ||
name: Combine artifacts and create framework | ||
needs: [build-libs, build-slave_firmware] | ||
runs-on: macos-14 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.11' | ||
- name: Download build artifacts | ||
uses: actions/download-artifact@v4 | ||
with: | ||
path: dist | ||
pattern: artifacts-* | ||
merge-multiple: true | ||
- name: Download slave firmware | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: slave_firmware | ||
path: slave_firmware | ||
- name: Create complete framework | ||
run: | | ||
mkdir -p out dist/framework-arduinoespressif32 | ||
# Combine all target builds | ||
for zip_file in dist/artifacts-*/framework-arduinoespressif32-*.zip; do | ||
echo "Processing $zip_file" | ||
unzip -q "$zip_file" -d out | ||
done | ||
# Remove Arduino IDE specific files (not needed for PlatformIO) | ||
rm -f out/package_esp32_index.template.json | ||
# Copy framework files | ||
cp -r out/* dist/framework-arduinoespressif32/ | ||
# Integrate slave firmware directly | ||
mkdir -p dist/framework-arduinoespressif32/tools/slave_firmware | ||
cp -r slave_firmware/* dist/framework-arduinoespressif32/tools/slave_firmware/ | ||
# Create final framework ZIP | ||
(cd dist && zip -qr framework-arduinoespressif32.zip framework-arduinoespressif32) | ||
|
||
- name: Upload framework artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: framework | ||
path: | | ||
dist/framework* | ||
dist/release-info.txt | ||
|
||
release_framework: | ||
name: Release Framework | ||
needs: combine-artifacts | ||
runs-on: macos-14 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Download complete framework | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: framework | ||
path: dist | ||
- name: Release | ||
uses: jason2866/action-gh-release@v1.3 | ||
with: | ||
tag_name: ${{ github.run_number }} | ||
body_path: dist/release-info.txt | ||
prerelease: true | ||
files: | | ||
dist/framework* | ||
dist/release-info.txt | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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
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 |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#!/bin/bash | ||
|
||
# This script is used to build the slave image for wifi_hosted | ||
|
||
export IDF_CCACHE_ENABLE=${CCACHE_ENABLE:-1} | ||
|
||
rm -rf dependencies.lock | ||
|
||
echo "* Installing/Updating ESP-IDF and all components..." | ||
|
||
source ./tools/install-esp-idf.sh | ||
if [ $? -ne 0 ]; then exit 1; fi | ||
|
||
|
||
slave_targets=( | ||
"esp32" | ||
"esp32s3" | ||
"esp32c2" | ||
"esp32c3" | ||
# "esp32c5" | ||
"esp32c6" | ||
) | ||
|
||
idf.py create-project-from-example "espressif/esp_hosted:slave" | ||
mkdir wifi_copro_fw | ||
cd ./slave | ||
echo "Found firmware version: $(<./main/coprocessor_fw_version.txt)" | ||
Jason2866 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
for target in "${slave_targets[@]}"; do | ||
echo "Building for target: $target" | ||
idf.py set-target "$target" | ||
idf.py clean | ||
idf.py build | ||
cp ./build/network_adapter.bin ../wifi_copro_fw/network_adapter_"$target".bin | ||
echo "Build completed for target: $target" | ||
done | ||
|
||
cp ./main/coprocessor_fw_version.txt ../wifi_copro_fw/coprocessor_fw_version.txt |
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
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.
Uh oh!
There was an error while loading. Please reload this page.