@@ -22,12 +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
- boards-nrf : ${{ steps.set-matrix.outputs.boards-nrf }}
29
30
boards-riscv : ${{ steps.set-matrix.outputs.boards-riscv }}
30
- boards-rpi : ${{ steps.set-matrix.outputs.boards-rpi }}
31
31
cp-version : ${{ steps.set-up-submodules.outputs.version }}
32
32
steps :
33
33
- name : Dump GitHub context
@@ -55,24 +55,23 @@ jobs:
55
55
uses : ./.github/actions/deps/external
56
56
with :
57
57
action : cache
58
- # Disabled: Needs to be updated
59
- # - name: Get last commit with checks
60
- # id: get-last-commit-with-checks
61
- # if: github.event_name == 'pull_request'
62
- # working-directory: tools
63
- # run: python3 -u ci_changes_per_commit.py
64
- # env:
65
- # REPO: ${{ github.repository }}
66
- # PULL: ${{ github.event.number }}
67
- # GITHUB_TOKEN: ${{ github.token }}
68
- # EXCLUDE_COMMIT: ${{ github.event.after }}
69
58
- name : Set up mpy-cross
70
59
uses : ./.github/actions/mpy_cross
71
60
with :
72
61
download : false
62
+ - name : Get last commit with checks
63
+ id : get-last-commit-with-checks
64
+ if : github.event_name == 'pull_request'
65
+ working-directory : tools
66
+ run : python3 -u ci_changes_per_commit.py
67
+ env :
68
+ REPO : ${{ github.repository }}
69
+ PULL : ${{ github.event.number }}
70
+ GITHUB_TOKEN : ${{ github.token }}
71
+ EXCLUDE_COMMIT : ${{ github.event.pull_request.head.sha }}
73
72
- name : Set head sha
74
73
if : github.event_name == 'pull_request'
75
- 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
76
75
- name : Set base sha
77
76
if : github.event_name == 'pull_request'
78
77
run : |
@@ -220,6 +219,74 @@ jobs:
220
219
[ -z "$TWINE_USERNAME" ] || echo "Uploading dev release to PyPi"
221
220
[ -z "$TWINE_USERNAME" ] || twine upload circuitpython-stubs/dist/*
222
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
+
223
290
aarch :
224
291
needs : [scheduler, mpy-cross, tests]
225
292
if : ${{ needs.scheduler.outputs.boards-aarch != '[]' }}
@@ -240,24 +307,24 @@ jobs:
240
307
boards : ${{ needs.scheduler.outputs.boards-arm }}
241
308
cp-version : ${{ needs.scheduler.outputs.cp-version }}
242
309
243
- esp :
310
+ atmel :
244
311
needs : [scheduler, mpy-cross, tests]
245
- if : ${{ needs.scheduler.outputs.boards-esp != '[]' }}
312
+ if : ${{ needs.scheduler.outputs.boards-atmel != '[]' }}
246
313
uses : ./.github/workflows/build-boards.yml
247
314
secrets : inherit
248
315
with :
249
- platform : esp
250
- boards : ${{ needs.scheduler.outputs.boards-esp }}
316
+ platform : arm
317
+ boards : ${{ needs.scheduler.outputs.boards-atmel }}
251
318
cp-version : ${{ needs.scheduler.outputs.cp-version }}
252
319
253
- nrf :
320
+ esp :
254
321
needs : [scheduler, mpy-cross, tests]
255
- if : ${{ needs.scheduler.outputs.boards-nrf != '[]' }}
322
+ if : ${{ needs.scheduler.outputs.boards-esp != '[]' }}
256
323
uses : ./.github/workflows/build-boards.yml
257
324
secrets : inherit
258
325
with :
259
- platform : nrf
260
- boards : ${{ needs.scheduler.outputs.boards-nrf }}
326
+ platform : esp
327
+ boards : ${{ needs.scheduler.outputs.boards-esp }}
261
328
cp-version : ${{ needs.scheduler.outputs.cp-version }}
262
329
263
330
riscv :
@@ -269,13 +336,3 @@ jobs:
269
336
platform : riscv
270
337
boards : ${{ needs.scheduler.outputs.boards-riscv }}
271
338
cp-version : ${{ needs.scheduler.outputs.cp-version }}
272
-
273
- rpi :
274
- needs : [scheduler, mpy-cross, tests]
275
- if : ${{ needs.scheduler.outputs.boards-rpi != '[]' }}
276
- uses : ./.github/workflows/build-boards.yml
277
- secrets : inherit
278
- with :
279
- platform : arm
280
- boards : ${{ needs.scheduler.outputs.boards-rpi }}
281
- cp-version : ${{ needs.scheduler.outputs.cp-version }}
0 commit comments