mirror of
https://github.com/micropython/micropython.git
synced 2026-01-04 19:20:22 +01:00
github/workflows: Improve MSYS2-based CI builds.
Install the mingw variant of Python since it behaves more like a 'real' Windows CPython than the msys2 variant: os.name == 'nt', not 'posix'. Note that os.sep is still '/' though so we don't actually need to skip the import_file test. This way one single Python version can be used both for running run-tests.py and getting the expected test output. Signed-off-by: stijn <stijn@ignitron.net>
This commit is contained in:
15
.github/workflows/ports_windows.yml
vendored
15
.github/workflows/ports_windows.yml
vendored
@@ -108,16 +108,6 @@ jobs:
|
||||
run:
|
||||
shell: msys2 {0}
|
||||
steps:
|
||||
- name: Get Python path
|
||||
id: python_path
|
||||
shell: python
|
||||
run: |
|
||||
import os
|
||||
import sys
|
||||
output = f"python={os.fspath(sys.executable)}"
|
||||
print(output)
|
||||
with open(os.environ["GITHUB_OUTPUT"], "w") as f:
|
||||
f.write(output)
|
||||
- uses: msys2/setup-msys2@v2
|
||||
with:
|
||||
msystem: ${{ matrix.sys }}
|
||||
@@ -126,7 +116,7 @@ jobs:
|
||||
make
|
||||
mingw-w64-${{ matrix.env }}-gcc
|
||||
pkg-config
|
||||
python3
|
||||
mingw-w64-${{ matrix.env }}-python3
|
||||
git
|
||||
diffutils
|
||||
- uses: actions/checkout@v4
|
||||
@@ -138,8 +128,7 @@ jobs:
|
||||
run: make -C ports/windows -j2 VARIANT=${{ matrix.variant }}
|
||||
- name: Run tests
|
||||
id: test
|
||||
# msys python breaks tests so we need to use "real" windows python
|
||||
run: MICROPY_CPYTHON3=$(cygpath "${{ steps.python_path.outputs.python }}") make -C ports/windows test_full VARIANT=${{ matrix.variant }}
|
||||
run: make -C ports/windows test_full VARIANT=${{ matrix.variant }}
|
||||
- name: Print failures
|
||||
if: failure() && steps.test.conclusion == 'failure'
|
||||
working-directory: tests
|
||||
|
||||
Reference in New Issue
Block a user