16
16
test :
17
17
runs-on : ubuntu-20.04
18
18
outputs :
19
+ docs-build : ${{ steps.set-matrix.outputs.docs-build }}
19
20
arm-boards : ${{ steps.set-matrix.outputs.arm-boards }}
20
21
riscv-boards : ${{ steps.set-matrix.outputs.riscv-boards }}
21
22
espressif-boards : ${{ steps.set-matrix.outputs.espressif-boards }}
@@ -41,37 +42,14 @@ jobs:
41
42
run : |
42
43
sudo apt-get update
43
44
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
45
+ sudo eatmydata apt-get install -y gettext gcc-aarch64-linux-gnu mingw-w64
46
+ pip install -r requirements-ci.txt -r requirements- dev.txt
46
47
- name : Versions
47
48
run : |
48
49
gcc --version
49
50
python3 --version
50
51
- name : Duplicate USB VID/PID Check
51
52
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
53
- name : Build mpy-cross
76
54
run : make -C mpy-cross -j2
77
55
- name : Build unix port
@@ -130,39 +108,22 @@ jobs:
130
108
[ -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
109
zip -9r circuitpython-stubs.zip circuitpython-stubs
132
110
[ -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
111
+ - name : " Get changes"
112
+ uses : dorny/paths-filter@v2
144
113
id : filter
145
114
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
115
list-files : json
150
-
151
- # Compare against this branch. (Ignored for PRs.)
152
116
base : ${{ github.ref }}
153
-
154
- # In this example all changed files are passed to the following action to do
155
- # some custom processing.
156
117
filters : |
157
118
changed:
158
119
- '**'
159
- - name : " Set boards to build "
120
+ - name : " Set matrix "
160
121
id : set-matrix
161
122
working-directory : tools
162
123
env :
163
124
CHANGED_FILES : ${{ steps.filter.outputs.changed_files }}
164
- run : |
165
- python3 -u ci_changed_board_list.py
125
+ run : python3 -u ci_set_matrix.py
126
+
166
127
167
128
mpy-cross-mac :
168
129
runs-on : macos-10.15
@@ -221,6 +182,62 @@ jobs:
221
182
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
183
223
184
185
+ build-doc :
186
+ runs-on : ubuntu-20.04
187
+ needs : test
188
+ if : ${{ needs.test.outputs.docs-build == 'True' }}
189
+ steps :
190
+
191
+ with :
192
+ submodules : false
193
+ fetch-depth : 0
194
+ - name : Populate selected submodules
195
+ run : git submodule update --init extmod/ulab
196
+ - run : git fetch --recurse-submodules=no https://github.com/adafruit/circuitpython refs/tags/*:refs/tags/*
197
+ - name : CircuitPython version
198
+ run : |
199
+ git describe --dirty --tags
200
+ echo >>$GITHUB_ENV CP_VERSION=$(git describe --dirty --tags)
201
+ - name : Set up Python 3.8
202
+ uses : actions/setup-python@v1
203
+ with :
204
+ python-version : 3.8
205
+ - name : Install deps
206
+ run : |
207
+ sudo apt-get update
208
+ sudo apt-get install -y eatmydata
209
+ sudo eatmydata apt-get install -y latexmk librsvg2-bin texlive-fonts-recommended texlive-latex-recommended texlive-latex-extra
210
+ pip install -r requirements-ci.txt -r requirements-doc.txt
211
+ - name : Build and Validate Stubs
212
+ run : make check-stubs -j2
213
+ - uses : actions/upload-artifact@v2
214
+ with :
215
+ name : stubs
216
+ path : circuitpython-stubs/dist/*
217
+ - name : Test Documentation Build (HTML)
218
+ run : sphinx-build -E -W -b html -D version=${{ env.CP_VERSION }} -D release=${{ env.CP_VERSION }} . _build/html
219
+ - uses : actions/upload-artifact@v2
220
+ with :
221
+ name : docs
222
+ path : _build/html
223
+ - name : Test Documentation Build (LaTeX/PDF)
224
+ run : |
225
+ make latexpdf
226
+ - uses : actions/upload-artifact@v2
227
+ with :
228
+ name : docs
229
+ path : _build/latex
230
+ - name : Upload stubs to PyPi
231
+ if : github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository_owner == 'adafruit'
232
+ env :
233
+ TWINE_USERNAME : ${{ secrets.pypi_username }}
234
+ TWINE_PASSWORD : ${{ secrets.pypi_password }}
235
+ run : |
236
+ # setup.py sdist was run by 'make stubs'
237
+ [ -z "$TWINE_USERNAME" ] || echo "Uploading dev release to PyPi"
238
+ [ -z "$TWINE_USERNAME" ] || twine upload circuitpython-stubs/dist/*
239
+
240
+
224
241
build-arm :
225
242
runs-on : ubuntu-20.04
226
243
needs : test
@@ -229,7 +246,6 @@ jobs:
229
246
matrix :
230
247
board : ${{ fromJSON(needs.test.outputs.arm-boards) }}
231
248
if : ${{ needs.test.outputs.arm-boards != '[]' }}
232
-
233
249
steps :
234
250
- name : Set up Python 3.8
235
251
uses : actions/setup-python@v1
@@ -243,7 +259,7 @@ jobs:
243
259
- name : Install deps
244
260
run : |
245
261
sudo apt-get install -y gettext
246
- pip install -r requirements-dev.txt
262
+ pip install -r requirements-ci.txt -r requirements- dev.txt
247
263
wget --no-verbose https://adafruit-circuit-python.s3.amazonaws.com/gcc-arm-none-eabi-10-2020-q4-major-x86_64-linux.tar.bz2
248
264
sudo tar -C /usr --strip-components=1 -xaf gcc-arm-none-eabi-10-2020-q4-major-x86_64-linux.tar.bz2
249
265
- name : Versions
@@ -272,6 +288,7 @@ jobs:
272
288
AWS_SECRET_ACCESS_KEY : ${{ secrets.AWS_SECRET_ACCESS_KEY }}
273
289
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
290
291
+
275
292
build-riscv :
276
293
runs-on : ubuntu-20.04
277
294
needs : test
@@ -280,7 +297,6 @@ jobs:
280
297
matrix :
281
298
board : ${{ fromJSON(needs.test.outputs.riscv-boards) }}
282
299
if : ${{ needs.test.outputs.riscv-boards != '[]' }}
283
-
284
300
steps :
285
301
- name : Set up Python 3.8
286
302
uses : actions/setup-python@v1
@@ -294,7 +310,7 @@ jobs:
294
310
- name : Install deps
295
311
run : |
296
312
sudo apt-get install -y gettext
297
- pip install -r requirements-dev.txt
313
+ pip install -r requirements-ci.txt -r requirements- dev.txt
298
314
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
315
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
316
- name : Versions
@@ -322,6 +338,8 @@ jobs:
322
338
AWS_ACCESS_KEY_ID : ${{ secrets.AWS_ACCESS_KEY_ID }}
323
339
AWS_SECRET_ACCESS_KEY : ${{ secrets.AWS_SECRET_ACCESS_KEY }}
324
340
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'))
341
+
342
+
325
343
build-espressif :
326
344
runs-on : ubuntu-20.04
327
345
needs : test
@@ -330,7 +348,6 @@ jobs:
330
348
matrix :
331
349
board : ${{ fromJSON(needs.test.outputs.espressif-boards) }}
332
350
if : ${{ needs.test.outputs.espressif-boards != '[]' }}
333
-
334
351
steps :
335
352
- name : Set up Python 3.8
336
353
uses : actions/setup-python@v1
@@ -363,11 +380,11 @@ jobs:
363
380
env :
364
381
IDF_PATH : ${{ github.workspace }}/ports/espressif/esp-idf
365
382
IDF_TOOLS_PATH : ${{ github.workspace }}/.idf_tools
366
- - name : Install CircuitPython deps
383
+ - name : Install deps
367
384
run : |
368
385
source $IDF_PATH/export.sh
369
- pip install -r requirements-dev.txt
370
386
sudo apt-get install -y gettext ninja-build
387
+ pip install -r requirements-ci.txt -r requirements-dev.txt
371
388
env :
372
389
IDF_PATH : ${{ github.workspace }}/ports/espressif/esp-idf
373
390
IDF_TOOLS_PATH : ${{ github.workspace }}/.idf_tools
0 commit comments