From 5af3b273753c5db4c4dc6770558a6ddb971a6bd5 Mon Sep 17 00:00:00 2001 From: Benedikt Reinartz Date: Sun, 26 Oct 2025 18:35:06 +0100 Subject: [PATCH 1/3] Disable 32bit tests for now --- .github/workflows/main.yml | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 11762a875..46b1c0c7c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -16,9 +16,11 @@ jobs: fail-fast: false matrix: os: - - category: windows - platform: x86 - instance: windows-latest + # Disabled for now, will require some work (#2653) + # + # - category: windows + # platform: x86 + # instance: windows-latest - category: windows platform: x64 @@ -38,14 +40,6 @@ jobs: python: ["3.10", "3.11", "3.12", "3.13"] - # This fails in pytest with: - # CSC : error CS4023: /platform:anycpu32bitpreferred can only be used with /t:exe, /t:winexe and /t:appcontainerexe [D:\a\pythonnet\pythonnet\src\runtime\Python.Runtime.csproj] - exclude: - - os: - category: windows - platform: x86 - python: "3.13" - steps: - name: Set Environment on macOS uses: maxim-lobanov/setup-xamarin@v1 From ec651f13e42fcb32346f371bd1fd5df50ff8a85e Mon Sep 17 00:00:00 2001 From: Benedikt Reinartz Date: Sun, 26 Oct 2025 18:38:39 +0100 Subject: [PATCH 2/3] Always run the embedding tests, and run them separately for Mono and .NET Core --- .github/workflows/main.yml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 46b1c0c7c..57ef57682 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -63,18 +63,21 @@ jobs: activate-environment: true enable-cache: true - - name: Embedding tests - run: dotnet test --runtime any-${{ matrix.os.platform }} --logger "console;verbosity=detailed" src/embed_tests/ + - name: Embedding tests (Mono/.NET Framework) + run: dotnet test --runtime any-${{ matrix.os.platform }} --framework net472 --logger "console;verbosity=detailed" src/embed_tests/ + if: always() env: MONO_THREADS_SUSPEND: preemptive # https://github.com/mono/mono/issues/21466 + - name: Embedding tests (.NET Core) + run: dotnet test --runtime any-${{ matrix.os.platform }} --framework net8.0 --logger "console;verbosity=detailed" src/embed_tests/ + if: always() + - name: Python Tests (Mono) if: ${{ matrix.os.category != 'windows' }} run: pytest --runtime mono - # TODO: Run these tests on Windows x86 - name: Python Tests (.NET Core) - if: ${{ matrix.os.platform == 'x64' }} run: pytest --runtime coreclr - name: Python Tests (.NET Framework) @@ -82,6 +85,4 @@ jobs: run: pytest --runtime netfx - name: Python tests run from .NET - run: uv run dotnet test --runtime any-${{ matrix.os.platform }} src/python_tests_runner/ - - # TODO: Run mono tests on Windows? + run: dotnet test --runtime any-${{ matrix.os.platform }} src/python_tests_runner/ From 13dff92a39e2d3b13331171c6b9db269cfa242ba Mon Sep 17 00:00:00 2001 From: Benedikt Reinartz Date: Sun, 26 Oct 2025 18:54:21 +0100 Subject: [PATCH 3/3] Synchronize the environment --- .github/workflows/main.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 57ef57682..8c700af49 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -63,6 +63,9 @@ jobs: activate-environment: true enable-cache: true + - name: Synchronize the virtual environment + run: uv sync + - name: Embedding tests (Mono/.NET Framework) run: dotnet test --runtime any-${{ matrix.os.platform }} --framework net472 --logger "console;verbosity=detailed" src/embed_tests/ if: always()