|
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 }}
|
27 | 28 | boards-atmel: ${{ steps.set-matrix.outputs.boards-atmel }}
|
@@ -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 != '[]' }}
|
|
0 commit comments