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 : framework-arduinoespressif32
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,45 +74,31 @@ jobs:
7374 path : slave_firmware
7475 - name : Create complete framework
7576 run : |
76- echo "Listing current directory:"
77- ls -la
78- echo "Listing slave_firmware directory:"
79- ls -la slave_firmware/ || echo "slave_firmware directory not found"
80- echo "Listing dist directory:"
81- ls -la dist/ || echo "dist directory not found"
82- # Integrate slave firmware directly
83- mkdir -p dist/framework-arduinoespressif32/tools/slave_firmware
84- cp -r slave_firmware/* dist/framework-arduinoespressif32/tools/slave_firmware/
85- # Create final framework ZIP
86- (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/
8786
88- - name : Upload framework artifact
89- uses : actions/upload-artifact@v4
90- with :
91- name : framework
92- path : |
93- dist/framework*
94- 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
9593
96- release_framework :
97- name : Release Framework
98- needs : combine-artifacts
99- runs-on : macos-14
100- steps :
101- - uses : actions/checkout@v4
102- - name : Download complete framework
103- uses : actions/download-artifact@v4
104- with :
105- name : framework
106- path : dist
107- - name : Release
94+ - name : Release framework-arduinoespressif32
10895 uses : jason2866/action-gh-release@v1.3
10996 with :
110- tag_name : ${{ github.run_number }}
111- body_path : dist/ release-info.txt
97+ tag_name : ${{ steps.set_tag_name.outputs.tag_name }}
98+ body_path : release-info.txt
11299 prerelease : true
113100 files : |
114- dist/ framework*
115- dist/ release-info.txt
101+ framework-arduinoespressif32-*.zip
102+ release-info.txt
116103 env :
117104 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
0 commit comments