66jobs :
77 build-libs :
88 name : Build Libs for ${{ matrix.target }}
9- runs-on : macos-14
9+ runs-on : ubuntu-latest
1010 strategy :
1111 matrix :
1212 target : [esp32, esp32s2, esp32s3, esp32c2, esp32c3, esp32c6, esp32h2, esp32p4]
@@ -23,16 +23,18 @@ jobs:
2323 run : |
2424 echo "GIT_BRANCH=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_ENV
2525 - name : Build Libs for ${{ matrix.target }}
26- run : bash ./build.sh -e -t ${{ matrix.target }}
26+ run : |
27+ bash ./build.sh -e -t ${{ matrix.target }}
28+ mv release-info.txt out/framework-arduinoespressif32
2729 - name : Upload artifacts for ${{ matrix.target }}
2830 uses : actions/upload-artifact@v4
2931 with :
3032 name : artifacts-${{ matrix.target }}
31- path : dist
33+ path : out/framework-arduinoespressif32
3234
3335 build-slave_firmware :
3436 name : Build Slave Firmware
35- runs-on : macos-14
37+ runs-on : ubuntu-latest
3638 steps :
3739 - uses : actions/checkout@v4
3840 - name : Set up Python
4244 - name : Install dependencies
4345 run : bash ./tools/prepare-ci.sh
4446 - name : Build slave firmware
45- run : |
46- bash ./tools/compile_slave.sh
47+ run : bash ./tools/compile_slave.sh
4748 - name : Upload artifacts
4849 uses : actions/upload-artifact@v4
4950 with :
5354 combine-artifacts :
5455 name : Combine artifacts and create framework
5556 needs : [build-libs, build-slave_firmware]
56- runs-on : macos-14
57+ runs-on : ubuntu-latest
5758 steps :
5859 - uses : actions/checkout@v4
5960 - name : Set up Python
6364 - name : Download build artifacts
6465 uses : actions/download-artifact@v4
6566 with :
66- path : dist
67+ path : framework-arduinoespressif32
6768 pattern : artifacts-*
6869 merge-multiple : true
6970 - name : Download slave firmware
@@ -73,49 +74,31 @@ jobs:
7374 path : slave_firmware
7475 - name : Create complete framework
7576 run : |
76- mkdir -p out dist/framework-arduinoespressif32
77- # Combine all target builds
78- for zip_file in dist/artifacts-*/framework-arduinoespressif32-*.zip; do
79- echo "Processing $zip_file"
80- unzip -q "$zip_file" -d out
81- done
82- # Remove Arduino IDE specific files (not needed for PlatformIO)
83- rm -f out/package_esp32_index.template.json
84- # Copy framework files
85- cp -r out/* dist/framework-arduinoespressif32/
86- # Integrate slave firmware directly
87- mkdir -p dist/framework-arduinoespressif32/tools/slave_firmware
88- cp -r slave_firmware/* dist/framework-arduinoespressif32/tools/slave_firmware/
89- # Create final framework ZIP
90- (cd dist && zip -qr framework-arduinoespressif32.zip framework-arduinoespressif32)
77+ mkdir -p framework-arduinoespressif32/tools/slave_firmware
78+ mv slave_firmware/* framework-arduinoespressif32/tools/slave_firmware/
79+ mv framework-arduinoespressif32/release-info.txt .
80+ IDF_BRANCH=$(grep 'esp-idf branch' release-info.txt | sed -E 's/.*branch \[([^]]+)\].*/\1/')
81+ IDF_COMMIT=$(grep 'esp-idf branch' release-info.txt | sed -E 's/.*commit \[([^]]+)\].*/\1/')
82+ echo "IDF_BRANCH=$IDF_BRANCH"
83+ echo "IDF_COMMIT=$IDF_COMMIT"
84+ idf_version_string="${IDF_BRANCH//\//_}-$IDF_COMMIT"
85+ 7z a -mx=9 -tzip -xr'!.*' framework-arduinoespressif32-${idf_version_string}.zip framework-arduinoespressif32/
9186
92- - name : Upload framework artifact
93- uses : actions/upload-artifact@v4
94- with :
95- name : framework
96- path : |
97- dist/framework*
98- dist/release-info.txt
87+ - name : Set tag name
88+ id : set_tag_name
89+ run : |
90+ IDF_VERSION=$(grep 'esp-idf branch' release-info.txt | sed -E 's/.*branch \[release\/v([0-9]+\.[0-9]+)\].*/\1/')
91+ DATE=$(date +"%d%m-%H%M")
92+ echo "tag_name=${DATE}-${IDF_VERSION}" >> $GITHUB_OUTPUT
9993
100- release_framework :
101- name : Release Framework
102- needs : combine-artifacts
103- runs-on : macos-14
104- steps :
105- - uses : actions/checkout@v4
106- - name : Download complete framework
107- uses : actions/download-artifact@v4
108- with :
109- name : framework
110- path : dist
111- - name : Release
94+ - name : Release framework-arduinoespressif32
11295 uses : jason2866/action-gh-release@v1.3
11396 with :
114- tag_name : ${{ github.run_number }}
115- body_path : dist/ release-info.txt
97+ tag_name : ${{ steps.set_tag_name.outputs.tag_name }}
98+ body_path : release-info.txt
11699 prerelease : true
117100 files : |
118- dist/ framework*
119- dist/ release-info.txt
101+ framework-arduinoespressif32-*.zip
102+ release-info.txt
120103 env :
121104 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
0 commit comments