@@ -24,10 +24,10 @@ jobs:
24
24
runs-on : ubuntu-22.04
25
25
steps :
26
26
- uses : actions/checkout@v4
27
- - uses : actions/setup-python@v4
27
+ - uses : actions/setup-python@v5
28
28
with :
29
29
python-version : ' 3.x'
30
- - uses : actions/cache@v3
30
+ - uses : actions/cache@v4
31
31
with :
32
32
path : ~/.cache/pip
33
33
key : ${{ runner.os }}-docs-${{ hashFiles('docs/requirements.txt') }}
39
39
make html
40
40
cd ..
41
41
zip -r -qq ESPEasy_docs.zip docs/build/*
42
- - uses : actions/upload-artifact@v3
42
+ - uses : actions/upload-artifact@v4
43
43
with :
44
44
name : Documentation
45
45
path : ESPEasy_docs.zip
49
49
matrix : ${{ steps.set-matrix.outputs.matrix }}
50
50
steps :
51
51
- uses : actions/checkout@v4
52
- - uses : actions/setup-python@v4
52
+ - uses : actions/setup-python@v5
53
53
with :
54
54
python-version : ' 3.x'
55
55
- id : set-matrix
@@ -64,19 +64,19 @@ jobs:
64
64
matrix : ${{ fromJson(needs.generate-matrix.outputs.matrix) }}
65
65
steps :
66
66
- uses : actions/checkout@v4
67
- - uses : actions/setup-python@v4
67
+ - uses : actions/setup-python@v5
68
68
with :
69
- python-version : ' 3.11 '
70
- - uses : actions/cache@v3
69
+ python-version : ' 3.x '
70
+ - uses : actions/cache@v4
71
71
with :
72
72
path : ~/.cache/pip
73
73
key : ${{ runner.os }}-${{ hashFiles('requirements.txt') }}
74
- - uses : actions/cache@v3
74
+ - uses : actions/cache@v4
75
75
if : ${{ contains(matrix.env, 'esp32') }}
76
76
with :
77
77
path : ~/.platformio
78
78
key : ${{ runner.os }}-esp32-${{ hashFiles('platformio*.ini') }}
79
- - uses : actions/cache@v3
79
+ - uses : actions/cache@v4
80
80
if : ${{ contains(matrix.env, 'esp8266') }}
81
81
with :
82
82
path : ~/.platformio
@@ -89,123 +89,60 @@ jobs:
89
89
pip install wheel
90
90
pip install -r requirements.txt
91
91
platformio update
92
+ - name : Get current date
93
+ id : date
94
+ run : |
95
+ echo "builddate=$(date +'%Y%m%d')" >> $GITHUB_OUTPUT
92
96
- name : Build and archive
93
97
id : build-and-archive
94
98
env :
95
99
CHIP : ${{ matrix.chip }}
96
100
ENV : ${{ matrix.env }}
97
101
run : |
98
102
python tools/ci/build-and-archive.py
99
- - uses : actions/upload-artifact@v3
103
+ - id : string
104
+ uses : Entepotenz/change-string-case-action-min-dependencies@v1
105
+ with :
106
+ string : ${{ matrix.chip }}
107
+ - uses : actions/upload-artifact@v4
100
108
with :
101
- name : Binaries
109
+ # FIXME Workaround to (temporarily) not use # in the artifact name, see https://github.com/actions/upload-artifact/issues/473
110
+ name : Bin-${{ steps.string.outputs.uppercase }}-${{ matrix.env }}-${{ steps.date.outputs.builddate }}_PR_${{ github.event.number }}_${{ github.run_id }} # Sort by ESP type
102
111
path : |
103
112
bin
104
113
if-no-files-found : ignore
105
114
106
- # Repackage separately for ESP82xx and ESP32
107
- repackage :
115
+ # Package all ESP82xx and ESP32 into a single ESPEasy-all-Binaries-<date>_PR#<pr_nr>_<runnr>.zip
116
+ combine_package :
108
117
needs : build
109
118
runs-on : ubuntu-22.04
110
119
steps :
111
120
- uses : actions/checkout@v4
112
- - uses : actions/setup-python@v4
121
+ - uses : actions/setup-python@v5
113
122
with :
114
123
python-version : ' 3.x'
115
- - uses : actions/cache@v3
124
+ - uses : actions/cache@v4
116
125
with :
117
126
path : ~/.cache/pip
118
127
key : ${{ runner.os }}-docs-${{ hashFiles('docs/requirements.txt') }}
119
128
- name : Get current date
120
129
id : date
121
130
run : |
122
131
echo "builddate=$(date +'%Y%m%d')" >> $GITHUB_OUTPUT
123
- - uses : actions/download-artifact@v3
132
+ - name : Download all artifacts
133
+ uses : actions/download-artifact@v4
124
134
with :
125
- path : artifacts/
126
- - name : Prepare artifacts
135
+ path : artifacts/Binaries/bin/
136
+ pattern : Bin-*
137
+ merge-multiple : true
138
+ - name : List all files in the package for single-archive upload
127
139
run : |
128
- # ESP82xx
129
- mkdir ESPEasy_dist_ESP82xx
130
- cd dist
131
- find . -exec cp -r --parents {} ../ESPEasy_dist_ESP82xx/ \;
132
- rm ../ESPEasy_dist_ESP82xx/bin/blank_8MB.bin
133
- cd ../artifacts/Binaries
134
- find . -not -name '*ESP32*' -exec mv {} ../../ESPEasy_dist_ESP82xx/bin/ \;
135
- cd ../..
136
- # ESP32 and derived cpus, ESP32 (classic) _MUST_ be last in this list!
137
- for cpu in ESP32s2 ESP32c3 ESP32s3 ESP32c2 ESP32c6 ESP32h2 ESP32solo1 ESP32
138
- do
139
- mkdir ESPEasy_dist_${cpu}
140
- spec="*${cpu}*"
141
- _files=$(find ./artifacts/Binaries -name "$spec"|wc -l)
142
- if [[ $_files > 0 ]]; then
143
- cd dist
144
- find . -exec cp -r --parents {} ../ESPEasy_dist_${cpu}/ \;
145
- cd ../ESPEasy_dist_${cpu}
146
- rm bin/blank_1MB.bin bin/blank_2MB.bin bin/ESPEasy_2step_UploaderMega_1024.bin
147
- cd ../artifacts/Binaries
148
- find . -name "$spec" -exec mv {} ../../ESPEasy_dist_${cpu}/bin/ \;
149
- cd ../..
150
- fi
151
- done
152
- # Each supported cpu has to be listed separately, but empty folders are ignored
153
- - uses : actions/upload-artifact@v3
154
- with :
155
- name : ESPEasy_mega_${{ steps.date.outputs.builddate }}_ESP32_PR#${{ github.event.number }}_${{ github.run_id }}
156
- path : |
157
- ESPEasy_dist_ESP32/*
158
- if-no-files-found : ignore
159
- - uses : actions/upload-artifact@v3
160
- with :
161
- name : ESPEasy_mega_${{ steps.date.outputs.builddate }}_ESP32solo1_PR#${{ github.event.number }}_${{ github.run_id }}
162
- path : |
163
- ESPEasy_dist_ESP32solo1/*
164
- if-no-files-found : ignore
165
- - uses : actions/upload-artifact@v3
140
+ cd artifacts/Binaries/
141
+ ls -R
142
+ - uses : actions/upload-artifact@v4
166
143
with :
167
- name : ESPEasy_mega_${{ steps.date.outputs.builddate }}_ESP32s2_PR#${{ github.event.number }}_${{ github.run_id }}
144
+ # FIXME Workaround to (temporarily) not use # in the artifact name, see https://github.com/actions/upload-artifact/issues/473
145
+ name : ESPEasy-all-Binaries-${{ steps.date.outputs.builddate }}_PR_${{ github.event.number }}_${{ github.run_id }}
168
146
path : |
169
- ESPEasy_dist_ESP32s2/*
147
+ artifacts/Binaries/
170
148
if-no-files-found : ignore
171
- - uses : actions/upload-artifact@v3
172
- with :
173
- name : ESPEasy_mega_${{ steps.date.outputs.builddate }}_ESP32c3_PR#${{ github.event.number }}_${{ github.run_id }}
174
- path : |
175
- ESPEasy_dist_ESP32c3/*
176
- if-no-files-found : ignore
177
- - uses : actions/upload-artifact@v3
178
- with :
179
- name : ESPEasy_mega_${{ steps.date.outputs.builddate }}_ESP32s3_PR#${{ github.event.number }}_${{ github.run_id }}
180
- path : |
181
- ESPEasy_dist_ESP32s3/*
182
- if-no-files-found : ignore
183
- - uses : actions/upload-artifact@v3
184
- with :
185
- name : ESPEasy_mega_${{ steps.date.outputs.builddate }}_ESP32c2_PR#${{ github.event.number }}_${{ github.run_id }}
186
- path : |
187
- ESPEasy_dist_ESP32c2/*
188
- if-no-files-found : ignore
189
- - uses : actions/upload-artifact@v3
190
- with :
191
- name : ESPEasy_mega_${{ steps.date.outputs.builddate }}_ESP32c6_PR#${{ github.event.number }}_${{ github.run_id }}
192
- path : |
193
- ESPEasy_dist_ESP32c6/*
194
- if-no-files-found : ignore
195
- - uses : actions/upload-artifact@v3
196
- with :
197
- name : ESPEasy_mega_${{ steps.date.outputs.builddate }}_ESP32h2_PR#${{ github.event.number }}_${{ github.run_id }}
198
- path : |
199
- ESPEasy_dist_ESP32h2/*
200
- if-no-files-found : ignore
201
- - uses : actions/upload-artifact@v3
202
- with :
203
- name : ESPEasy_mega_${{ steps.date.outputs.builddate }}_ESP82xx_PR#${{ github.event.number }}_${{ github.run_id }}
204
- path : |
205
- ESPEasy_dist_ESP82xx/*
206
- if-no-files-found : ignore
207
- # When successfully re-packaged, the original Binaries can be removed
208
- # comment below 3 lines to not remove the Binaries artifact after repackaging
209
- - uses : geekyeggo/delete-artifact@v2
210
- with :
211
- name : Binaries
0 commit comments