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:
stijn
2024-03-26 16:09:15 +01:00
committed by Damien George
parent 233f5ce661
commit a0c7bf12d2
4 changed files with 10 additions and 19 deletions

View File

@@ -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