Skip to content

Improve MSYS2-based CI builds. #14188

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 4 additions & 13 deletions .github/workflows/ports_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ jobs:
configuration: Debug
- visualstudio: '2019'
configuration: Debug
env:
CI_BUILD_CONFIGURATION: ${{ matrix.configuration }}
runs-on: ${{ matrix.runner }}
steps:
- name: Install Visual Studio 2017
Expand Down Expand Up @@ -108,16 +110,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 }}
Expand All @@ -126,7 +118,7 @@ jobs:
make
mingw-w64-${{ matrix.env }}-gcc
pkg-config
python3
mingw-w64-${{ matrix.env }}-python3
git
diffutils
- uses: actions/checkout@v4
Expand All @@ -138,8 +130,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
Expand Down
3 changes: 3 additions & 0 deletions ports/windows/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,9 @@ include $(TOP)/py/mkrules.mk

.PHONY: test test_full

# Note for recent gcc versions like 13.2:
# - mingw64-x86_64 gcc builds will pass the math_domain_special test
# - mingw64-ucrt64 gcc builds will pass all of the below tests
RUN_TESTS_SKIP += -e math_fun -e float2int_double -e float_parse -e math_domain_special

test: $(BUILD)/$(PROG) $(TOP)/tests/run-tests.py
Expand Down
2 changes: 1 addition & 1 deletion ports/windows/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Install MSYS2 from http://repo.msys2.org/distrib, start the msys2.exe shell and
install the build tools:

pacman -Syuu
pacman -S make mingw-w64-x86_64-gcc pkg-config python3
pacman -S make mingw-w64-x86_64-gcc pkg-config mingw-w64-x86_64-python3

Start the mingw64.exe shell and build:

Expand Down
11 changes: 5 additions & 6 deletions tests/run-tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import os
import subprocess
import sys
import sysconfig
import platform
import argparse
import inspect
Expand Down Expand Up @@ -579,14 +580,10 @@ def run_tests(pyb, tests, args, result_dir, num_threads=1):
if os.getenv("GITHUB_ACTIONS") == "true":
skip_tests.add("thread/stress_schedule.py") # has reliability issues

if os.getenv("RUNNER_OS") == "Windows":
if os.getenv("RUNNER_OS") == "Windows" and os.getenv("CI_BUILD_CONFIGURATION") == "Debug":
# fails with stack overflow on Debug builds
skip_tests.add("misc/sys_settrace_features.py")

if os.getenv("MSYSTEM") is not None:
# fails due to wrong path separator
skip_tests.add("import/import_file.py")

if upy_float_precision == 0:
skip_tests.add("extmod/uctypes_le_float.py")
skip_tests.add("extmod/uctypes_native_float.py")
Expand Down Expand Up @@ -711,7 +708,9 @@ def run_tests(pyb, tests, args, result_dir, num_threads=1):

# Some tests use unsupported features on Windows
if os.name == "nt":
skip_tests.add("import/import_file.py") # works but CPython prints forward slashes
if not sysconfig.get_platform().startswith("mingw"):
# Works but CPython uses '\' path separator
skip_tests.add("import/import_file.py")

# Some tests are known to fail with native emitter
# Remove them from the below when they work
Expand Down
Loading
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy