@@ -22,11 +22,12 @@ jobs:
22
22
outputs :
23
23
build-doc : ${{ steps.set-matrix.outputs.build-doc }}
24
24
build-boards : ${{ steps.set-matrix.outputs.build-boards }}
25
+ build-windows : ${{ steps.set-matrix.outputs.build-windows }}
25
26
boards-aarch : ${{ steps.set-matrix.outputs.boards-aarch }}
26
27
boards-arm : ${{ steps.set-matrix.outputs.boards-arm }}
28
+ boards-atmel : ${{ steps.set-matrix.outputs.boards-atmel }}
27
29
boards-esp : ${{ steps.set-matrix.outputs.boards-esp }}
28
30
boards-riscv : ${{ steps.set-matrix.outputs.boards-riscv }}
29
- boards-rpi : ${{ steps.set-matrix.outputs.boards-rpi }}
30
31
cp-version : ${{ steps.set-up-submodules.outputs.version }}
31
32
steps :
32
33
- name : Dump GitHub context
54
55
uses : ./.github/actions/deps/external
55
56
with :
56
57
action : cache
58
+ - name : Set up mpy-cross
59
+ uses : ./.github/actions/mpy_cross
60
+ with :
61
+ download : false
57
62
- name : Get last commit with checks
58
63
id : get-last-commit-with-checks
59
64
if : github.event_name == 'pull_request'
@@ -63,14 +68,10 @@ jobs:
63
68
REPO : ${{ github.repository }}
64
69
PULL : ${{ github.event.number }}
65
70
GITHUB_TOKEN : ${{ github.token }}
66
- EXCLUDE_COMMIT : ${{ github.event.after }}
67
- - name : Set up mpy-cross
68
- uses : ./.github/actions/mpy_cross
69
- with :
70
- download : false
71
+ EXCLUDE_COMMIT : ${{ github.event.pull_request.head.sha }}
71
72
- name : Set head sha
72
73
if : github.event_name == 'pull_request'
73
- run : echo "HEAD_SHA=$(git show -s --format=%s $GITHUB_SHA | grep -o -P "(?<=Merge ).*(?= into)") " >> $GITHUB_ENV
74
+ run : echo "HEAD_SHA=${{ github.event.pull_request.head.sha }} " >> $GITHUB_ENV
74
75
- name : Set base sha
75
76
if : github.event_name == 'pull_request'
76
77
run : |
@@ -218,6 +219,74 @@ jobs:
218
219
[ -z "$TWINE_USERNAME" ] || echo "Uploading dev release to PyPi"
219
220
[ -z "$TWINE_USERNAME" ] || twine upload circuitpython-stubs/dist/*
220
221
222
+ build-windows :
223
+ runs-on : windows-2022
224
+ needs : scheduler
225
+ if : ${{ needs.scheduler.outputs.build-windows == 'True' }}
226
+ env :
227
+ CP_VERSION : ${{ needs.scheduler.outputs.cp-version }}
228
+ defaults :
229
+ run :
230
+ # We define a custom shell script here, although `msys2.cmd` does neither exist nor is it available in the PATH yet
231
+ shell : msys2 {0}
232
+ steps :
233
+ # We want to change the configuration of the git command that actions/checkout will be using
234
+ # (since it is not possible to set autocrlf through the action yet, see actions/checkout#226).
235
+ - run : git config --global core.autocrlf input
236
+ shell : bash
237
+ - name : Check python coding (cmd)
238
+ run : python -c "import sys, locale; print(sys.getdefaultencoding(), locale.getpreferredencoding(False))"
239
+ shell : cmd
240
+ # We use a JS Action, which calls the system terminal or other custom terminals directly, if required
241
+ - uses : msys2/setup-msys2@v2
242
+ with :
243
+ install : base-devel git wget unzip gcc python-pip
244
+ # The goal of this was to test how things worked when the default file encoding (locale.getpreferedencoding())
245
+ # was not UTF-8. However, msys2 python does use utf-8 as the preferred file encoding, and using actions/setup-python
246
+ # python3.8 gave a broken build, so we're not really testing what we wanted to test.
247
+ # However, commandline length limits are being tested so that does some good.
248
+ - name : Check python coding (msys2)
249
+ run : |
250
+ locale -v
251
+ which python; python --version
252
+ python -c "import sys, locale; print(sys.getdefaultencoding(), locale.getpreferredencoding(False))"
253
+ which python3; python3 --version
254
+ python3 -c "import sys, locale; print(sys.getdefaultencoding(), locale.getpreferredencoding(False))"
255
+ - name : Install dependencies
256
+ run : |
257
+ wget --no-verbose -O gcc-arm.zip https://developer.arm.com/-/media/Files/downloads/gnu-rm/10-2020q4/gcc-arm-none-eabi-10-2020-q4-major-win32.zip
258
+ unzip -q -d /tmp gcc-arm.zip
259
+ tar -C /tmp/gcc-arm-none-* -cf - . | tar -C /usr/local -xf -
260
+ pip install wheel
261
+ # requirements_dev.txt doesn't install on windows. (with msys2 python)
262
+ # instead, pick a subset for what we want to do
263
+ pip install cascadetoml jinja2 typer click intelhex
264
+ # check that installed packages work....?
265
+ which python; python --version; python -c "import cascadetoml"
266
+ which python3; python3 --version; python3 -c "import cascadetoml"
267
+ - name : Set up repository
268
+ uses : actions/checkout@v3
269
+ with :
270
+ submodules : false
271
+ fetch-depth : 1
272
+ - name : Set up submodules
273
+ uses : ./.github/actions/deps/submodules
274
+ - name : build mpy-cross
275
+ run : make -j2 -C mpy-cross
276
+ - name : build rp2040
277
+ run : make -j2 -C ports/raspberrypi BOARD=adafruit_feather_rp2040 TRANSLATION=de_DE
278
+ - name : build samd21
279
+ run : make -j2 -C ports/atmel-samd BOARD=feather_m0_express TRANSLATION=zh_Latn_pinyin
280
+ - name : build samd51
281
+ run : make -j2 -C ports/atmel-samd BOARD=feather_m4_express TRANSLATION=es
282
+ - name : build nrf
283
+ run : make -j2 -C ports/nrf BOARD=feather_nrf52840_express TRANSLATION=fr
284
+ - name : build stm
285
+ run : make -j2 -C ports/stm BOARD=feather_stm32f405_express TRANSLATION=pt_BR
286
+ # I gave up trying to do esp builds on windows when I saw
287
+ # ERROR: Platform MINGW64_NT-10.0-17763-x86_64 appears to be unsupported
288
+ # https://github.com/espressif/esp-idf/issues/7062
289
+
221
290
aarch :
222
291
needs : [scheduler, mpy-cross, tests]
223
292
if : ${{ needs.scheduler.outputs.boards-aarch != '[]' }}
@@ -238,6 +307,16 @@ jobs:
238
307
boards : ${{ needs.scheduler.outputs.boards-arm }}
239
308
cp-version : ${{ needs.scheduler.outputs.cp-version }}
240
309
310
+ atmel :
311
+ needs : [scheduler, mpy-cross, tests]
312
+ if : ${{ needs.scheduler.outputs.boards-atmel != '[]' }}
313
+ uses : ./.github/workflows/build-boards.yml
314
+ secrets : inherit
315
+ with :
316
+ platform : arm
317
+ boards : ${{ needs.scheduler.outputs.boards-atmel }}
318
+ cp-version : ${{ needs.scheduler.outputs.cp-version }}
319
+
241
320
esp :
242
321
needs : [scheduler, mpy-cross, tests]
243
322
if : ${{ needs.scheduler.outputs.boards-esp != '[]' }}
@@ -257,13 +336,3 @@ jobs:
257
336
platform : riscv
258
337
boards : ${{ needs.scheduler.outputs.boards-riscv }}
259
338
cp-version : ${{ needs.scheduler.outputs.cp-version }}
260
-
261
- rpi :
262
- needs : [scheduler, mpy-cross, tests]
263
- if : ${{ needs.scheduler.outputs.boards-rpi != '[]' }}
264
- uses : ./.github/workflows/build-boards.yml
265
- secrets : inherit
266
- with :
267
- platform : arm
268
- boards : ${{ needs.scheduler.outputs.boards-rpi }}
269
- cp-version : ${{ needs.scheduler.outputs.cp-version }}
0 commit comments