@@ -16,19 +16,23 @@ jobs:
16
16
test :
17
17
runs-on : ubuntu-20.04
18
18
outputs :
19
- arm-boards : ${{ steps.set-matrix.outputs.arm-boards }}
20
- riscv-boards : ${{ steps.set-matrix.outputs.riscv-boards }}
21
- espressif-boards : ${{ steps.set-matrix.outputs.espressif-boards }}
19
+ build-doc : ${{ steps.set-matrix.outputs.build-doc }}
20
+ boards-arm : ${{ steps.set-matrix.outputs.boards-arm }}
21
+ boards-riscv : ${{ steps.set-matrix.outputs.boards-riscv }}
22
+ boards-espressif : ${{ steps.set-matrix.outputs.boards-espressif }}
22
23
steps :
23
24
- name : Dump GitHub context
24
25
env :
25
26
GITHUB_CONTEXT : ${{ toJson(github) }}
26
27
run : echo "$GITHUB_CONTEXT"
27
28
28
29
with :
29
- submodules : true
30
+ submodules : false
30
31
fetch-depth : 0
31
- - run : git fetch --recurse-submodules=no https://github.com/adafruit/circuitpython refs/tags/*:refs/tags/*
32
+ - name : Populate selected submodules
33
+ run : git submodule update --init extmod/ lib/ tools/
34
+ - name : Fetch tags
35
+ run : git fetch --recurse-submodules=no https://github.com/adafruit/circuitpython refs/tags/*:refs/tags/*
32
36
- name : CircuitPython version
33
37
run : |
34
38
git describe --dirty --tags
@@ -37,41 +41,18 @@ jobs:
37
41
uses : actions/setup-python@v1
38
42
with :
39
43
python-version : 3.8
40
- - name : Install deps
44
+ - name : Install dependencies
41
45
run : |
42
46
sudo apt-get update
43
47
sudo apt-get install -y eatmydata
44
- sudo eatmydata apt-get install -y gettext librsvg2-bin mingw-w64 latexmk texlive-fonts-recommended texlive-latex-recommended texlive-latex-extra gcc-aarch64-linux-gnu
45
- pip install -r requirements-dev.txt
48
+ sudo eatmydata apt-get install -y gettext gcc-aarch64-linux-gnu mingw-w64
49
+ pip install -r requirements-ci.txt -r requirements- dev.txt
46
50
- name : Versions
47
51
run : |
48
52
gcc --version
49
53
python3 --version
50
54
- name : Duplicate USB VID/PID Check
51
55
run : python3 -u -m tools.ci_check_duplicate_usb_vid_pid
52
- - name : Build and Validate Stubs
53
- run : make check-stubs -j2
54
- - uses : actions/upload-artifact@v2
55
- with :
56
- name : stubs
57
- path : circuitpython-stubs/dist/*
58
- - name : Install pypi dependencies
59
- run : |
60
- python -m pip install --upgrade pip
61
- pip install setuptools wheel twine
62
- - name : Test Documentation Build (HTML)
63
- run : sphinx-build -E -W -b html -D version=${{ env.CP_VERSION }} -D release=${{ env.CP_VERSION }} . _build/html
64
- - uses : actions/upload-artifact@v2
65
- with :
66
- name : docs
67
- path : _build/html
68
- - name : Test Documentation Build (LaTeX/PDF)
69
- run : |
70
- make latexpdf
71
- - uses : actions/upload-artifact@v2
72
- with :
73
- name : docs
74
- path : _build/latex
75
56
- name : Build mpy-cross
76
57
run : make -C mpy-cross -j2
77
58
- name : Build unix port
@@ -130,39 +111,22 @@ jobs:
130
111
[ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp mpy-cross/mpy-cross.static.exe s3://adafruit-circuit-python/bin/mpy-cross/mpy-cross.static-x64-windows-${{ env.CP_VERSION }}.exe --no-progress --region us-east-1
131
112
zip -9r circuitpython-stubs.zip circuitpython-stubs
132
113
[ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp circuitpython-stubs/dist/*.tar.gz s3://adafruit-circuit-python/bin/stubs/circuitpython-stubs-${{ env.CP_VERSION }}.zip --no-progress --region us-east-1
133
-
134
- - name : Upload stubs to PyPi
135
- if : github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository_owner == 'adafruit'
136
- env :
137
- TWINE_USERNAME : ${{ secrets.pypi_username }}
138
- TWINE_PASSWORD : ${{ secrets.pypi_password }}
139
- run : |
140
- # setup.py sdist was run by 'make stubs'
141
- [ -z "$TWINE_USERNAME" ] || echo "Uploading dev release to PyPi"
142
- [ -z "$TWINE_USERNAME" ] || twine upload circuitpython-stubs/dist/*
143
- - uses : dorny/paths-filter@v2
114
+ - name : " Get changes"
115
+ if : github.event_name == 'pull_request'
116
+ uses : dorny/paths-filter@v2
144
117
id : filter
145
118
with :
146
- # Enable listing of files matching each filter.
147
- # Paths to files will be available in `${FILTER_NAME}_files` output variable.
148
- # Paths will be formatted as JSON array
149
119
list-files : json
150
-
151
- # Compare against this branch. (Ignored for PRs.)
152
- base : ${{ github.ref }}
153
-
154
- # In this example all changed files are passed to the following action to do
155
- # some custom processing.
156
120
filters : |
157
121
changed:
158
122
- '**'
159
- - name : " Set boards to build "
123
+ - name : " Set matrix "
160
124
id : set-matrix
161
125
working-directory : tools
162
126
env :
163
127
CHANGED_FILES : ${{ steps.filter.outputs.changed_files }}
164
- run : |
165
- python3 -u ci_changed_board_list.py
128
+ run : python3 -u ci_set_matrix.py
129
+
166
130
167
131
mpy-cross-mac :
168
132
runs-on : macos-10.15
@@ -173,9 +137,12 @@ jobs:
173
137
run : echo "$GITHUB_CONTEXT"
174
138
175
139
with :
176
- submodules : true
140
+ submodules : false
177
141
fetch-depth : 0
178
- - run : git fetch --recurse-submodules=no https://github.com/adafruit/circuitpython refs/tags/*:refs/tags/*
142
+ - name : Populate selected submodules
143
+ run : git submodule update --init extmod/ lib/ tools/
144
+ - name : Fetch tags
145
+ run : git fetch --recurse-submodules=no https://github.com/adafruit/circuitpython refs/tags/*:refs/tags/*
179
146
- name : CircuitPython version
180
147
run : |
181
148
git describe --dirty --tags
@@ -221,15 +188,71 @@ jobs:
221
188
if : (github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository_owner == 'adafruit') || (github.event_name == 'release' && (github.event.action == 'published' || github.event.action == 'rerequested'))
222
189
223
190
191
+ build-doc :
192
+ runs-on : ubuntu-20.04
193
+ needs : test
194
+ if : ${{ needs.test.outputs.build-doc == 'True' }}
195
+ steps :
196
+
197
+ with :
198
+ submodules : false
199
+ fetch-depth : 0
200
+ - name : Populate selected submodules
201
+ run : git submodule update --init extmod/
202
+ - name : Fetch tags
203
+ run : git fetch --recurse-submodules=no https://github.com/adafruit/circuitpython refs/tags/*:refs/tags/*
204
+ - name : CircuitPython version
205
+ run : |
206
+ git describe --dirty --tags
207
+ echo >>$GITHUB_ENV CP_VERSION=$(git describe --dirty --tags)
208
+ - name : Set up Python 3.8
209
+ uses : actions/setup-python@v1
210
+ with :
211
+ python-version : 3.8
212
+ - name : Install dependencies
213
+ run : |
214
+ sudo apt-get update
215
+ sudo apt-get install -y eatmydata
216
+ sudo eatmydata apt-get install -y latexmk librsvg2-bin texlive-fonts-recommended texlive-latex-recommended texlive-latex-extra
217
+ pip install -r requirements-ci.txt -r requirements-doc.txt
218
+ - name : Build and Validate Stubs
219
+ run : make check-stubs -j2
220
+ - uses : actions/upload-artifact@v2
221
+ with :
222
+ name : stubs
223
+ path : circuitpython-stubs/dist/*
224
+ - name : Test Documentation Build (HTML)
225
+ run : sphinx-build -E -W -b html -D version=${{ env.CP_VERSION }} -D release=${{ env.CP_VERSION }} . _build/html
226
+ - uses : actions/upload-artifact@v2
227
+ with :
228
+ name : docs
229
+ path : _build/html
230
+ - name : Test Documentation Build (LaTeX/PDF)
231
+ run : |
232
+ make latexpdf
233
+ - uses : actions/upload-artifact@v2
234
+ with :
235
+ name : docs
236
+ path : _build/latex
237
+ - name : Upload stubs to PyPi
238
+ if : github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository_owner == 'adafruit'
239
+ env :
240
+ TWINE_USERNAME : ${{ secrets.pypi_username }}
241
+ TWINE_PASSWORD : ${{ secrets.pypi_password }}
242
+ run : |
243
+ # setup.py sdist was run by 'make stubs'
244
+ [ -z "$TWINE_USERNAME" ] || echo "Uploading dev release to PyPi"
245
+ [ -z "$TWINE_USERNAME" ] || twine upload circuitpython-stubs/dist/*
246
+
247
+
224
248
build-arm :
225
249
runs-on : ubuntu-20.04
226
250
needs : test
227
251
strategy :
228
252
fail-fast : false
229
253
matrix :
230
- board : ${{ fromJSON(needs.test.outputs.arm-boards) }}
231
- if : ${{ needs.test.outputs.arm-boards != '[]' }}
232
-
254
+ board : ${{ fromJSON(needs.test.outputs.boards-arm) }}
255
+ if : ${{ needs.test.outputs.boards-arm != '[]' }}
233
256
steps :
234
257
- name : Set up Python 3.8
235
258
uses : actions/setup-python@v1
@@ -239,11 +262,12 @@ jobs:
239
262
with :
240
263
submodules : true
241
264
fetch-depth : 0
242
- - run : git fetch --recurse-submodules=no https://github.com/adafruit/circuitpython refs/tags/*:refs/tags/*
243
- - name : Install deps
265
+ - name : Fetch tags
266
+ run : git fetch --recurse-submodules=no https://github.com/adafruit/circuitpython refs/tags/*:refs/tags/*
267
+ - name : Install dependencies
244
268
run : |
245
269
sudo apt-get install -y gettext
246
- pip install -r requirements-dev.txt
270
+ pip install -r requirements-ci.txt -r requirements- dev.txt
247
271
wget --no-verbose https://adafruit-circuit-python.s3.amazonaws.com/gcc-arm-none-eabi-10-2020-q4-major-x86_64-linux.tar.bz2
248
272
sudo tar -C /usr --strip-components=1 -xaf gcc-arm-none-eabi-10-2020-q4-major-x86_64-linux.tar.bz2
249
273
- name : Versions
@@ -272,15 +296,15 @@ jobs:
272
296
AWS_SECRET_ACCESS_KEY : ${{ secrets.AWS_SECRET_ACCESS_KEY }}
273
297
if : (github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository_owner == 'adafruit') || (github.event_name == 'release' && (github.event.action == 'published' || github.event.action == 'rerequested'))
274
298
299
+
275
300
build-riscv :
276
301
runs-on : ubuntu-20.04
277
302
needs : test
278
303
strategy :
279
304
fail-fast : false
280
305
matrix :
281
- board : ${{ fromJSON(needs.test.outputs.riscv-boards) }}
282
- if : ${{ needs.test.outputs.riscv-boards != '[]' }}
283
-
306
+ board : ${{ fromJSON(needs.test.outputs.boards-riscv) }}
307
+ if : ${{ needs.test.outputs.boards-riscv != '[]' }}
284
308
steps :
285
309
- name : Set up Python 3.8
286
310
uses : actions/setup-python@v1
@@ -290,11 +314,12 @@ jobs:
290
314
with :
291
315
submodules : true
292
316
fetch-depth : 0
293
- - run : git fetch --recurse-submodules=no https://github.com/adafruit/circuitpython refs/tags/*:refs/tags/*
294
- - name : Install deps
317
+ - name : Fetch tags
318
+ run : git fetch --recurse-submodules=no https://github.com/adafruit/circuitpython refs/tags/*:refs/tags/*
319
+ - name : Install dependencies
295
320
run : |
296
321
sudo apt-get install -y gettext
297
- pip install -r requirements-dev.txt
322
+ pip install -r requirements-ci.txt -r requirements- dev.txt
298
323
wget https://static.dev.sifive.com/dev-tools/riscv64-unknown-elf-gcc-8.3.0-2019.08.0-x86_64-linux-centos6.tar.gz
299
324
sudo tar -C /usr --strip-components=1 -xaf riscv64-unknown-elf-gcc-8.3.0-2019.08.0-x86_64-linux-centos6.tar.gz
300
325
- name : Versions
@@ -322,15 +347,16 @@ jobs:
322
347
AWS_ACCESS_KEY_ID : ${{ secrets.AWS_ACCESS_KEY_ID }}
323
348
AWS_SECRET_ACCESS_KEY : ${{ secrets.AWS_SECRET_ACCESS_KEY }}
324
349
if : (github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository_owner == 'adafruit') || (github.event_name == 'release' && (github.event.action == 'published' || github.event.action == 'rerequested'))
350
+
351
+
325
352
build-espressif :
326
353
runs-on : ubuntu-20.04
327
354
needs : test
328
355
strategy :
329
356
fail-fast : false
330
357
matrix :
331
- board : ${{ fromJSON(needs.test.outputs.espressif-boards) }}
332
- if : ${{ needs.test.outputs.espressif-boards != '[]' }}
333
-
358
+ board : ${{ fromJSON(needs.test.outputs.boards-espressif) }}
359
+ if : ${{ needs.test.outputs.boards-espressif != '[]' }}
334
360
steps :
335
361
- name : Set up Python 3.8
336
362
uses : actions/setup-python@v1
@@ -340,7 +366,8 @@ jobs:
340
366
with :
341
367
submodules : true
342
368
fetch-depth : 0
343
- - run : git fetch --recurse-submodules=no https://github.com/adafruit/circuitpython refs/tags/*:refs/tags/*
369
+ - name : Fetch tags
370
+ run : git fetch --recurse-submodules=no https://github.com/adafruit/circuitpython refs/tags/*:refs/tags/*
344
371
- name : CircuitPython version
345
372
run : git describe --dirty --tags
346
373
- uses : actions/cache@v2
@@ -363,11 +390,11 @@ jobs:
363
390
env :
364
391
IDF_PATH : ${{ github.workspace }}/ports/espressif/esp-idf
365
392
IDF_TOOLS_PATH : ${{ github.workspace }}/.idf_tools
366
- - name : Install CircuitPython deps
393
+ - name : Install dependencies
367
394
run : |
368
395
source $IDF_PATH/export.sh
369
- pip install -r requirements-dev.txt
370
396
sudo apt-get install -y gettext ninja-build
397
+ pip install -r requirements-ci.txt -r requirements-dev.txt
371
398
env :
372
399
IDF_PATH : ${{ github.workspace }}/ports/espressif/esp-idf
373
400
IDF_TOOLS_PATH : ${{ github.workspace }}/.idf_tools
0 commit comments