6
6
jobs :
7
7
build-libs :
8
8
name : Build Libs for ${{ matrix.target }}
9
- runs-on : macos-14
9
+ runs-on : ubuntu-latest
10
10
strategy :
11
11
matrix :
12
12
target : [esp32, esp32s2, esp32s3, esp32c2, esp32c3, esp32c6, esp32h2, esp32p4]
@@ -23,16 +23,18 @@ jobs:
23
23
run : |
24
24
echo "GIT_BRANCH=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_ENV
25
25
- 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
27
29
- name : Upload artifacts for ${{ matrix.target }}
28
30
uses : actions/upload-artifact@v4
29
31
with :
30
32
name : artifacts-${{ matrix.target }}
31
- path : dist
33
+ path : out/framework-arduinoespressif32
32
34
33
35
build-slave_firmware :
34
36
name : Build Slave Firmware
35
- runs-on : macos-14
37
+ runs-on : ubuntu-latest
36
38
steps :
37
39
- uses : actions/checkout@v4
38
40
- name : Set up Python
42
44
- name : Install dependencies
43
45
run : bash ./tools/prepare-ci.sh
44
46
- name : Build slave firmware
45
- run : |
46
- bash ./tools/compile_slave.sh
47
+ run : bash ./tools/compile_slave.sh
47
48
- name : Upload artifacts
48
49
uses : actions/upload-artifact@v4
49
50
with :
53
54
combine-artifacts :
54
55
name : Combine artifacts and create framework
55
56
needs : [build-libs, build-slave_firmware]
56
- runs-on : macos-14
57
+ runs-on : ubuntu-latest
57
58
steps :
58
59
- uses : actions/checkout@v4
59
60
- name : Set up Python
63
64
- name : Download build artifacts
64
65
uses : actions/download-artifact@v4
65
66
with :
66
- path : dist
67
+ path : framework-arduinoespressif32
67
68
pattern : artifacts-*
68
69
merge-multiple : true
69
70
- name : Download slave firmware
@@ -73,49 +74,31 @@ jobs:
73
74
path : slave_firmware
74
75
- name : Create complete framework
75
76
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/
91
86
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
99
93
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
112
95
113
96
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
116
99
prerelease : true
117
100
files : |
118
- dist/ framework*
119
- dist/ release-info.txt
101
+ framework-arduinoespressif32-*.zip
102
+ release-info.txt
120
103
env :
121
104
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
0 commit comments