From 8bb99bc3aeb72eac55604eb69f4bb4502caec774 Mon Sep 17 00:00:00 2001 From: Benedikt Reinartz Date: Tue, 9 Dec 2025 08:17:32 +0100 Subject: [PATCH 01/10] Be explicit about Python version to use --- .github/workflows/main.yml | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 53c0934ae..03bd5b44e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -18,25 +18,35 @@ jobs: os: # Disabled for now, will require some work (#2653) # - # - category: windows - # platform: x86 - # instance: windows-latest + - category: windows + platform: x86 + instance: windows-latest + suffix: -windows-x86-none - category: windows platform: x64 instance: windows-latest + suffix: -windows-x86_64-none - category: ubuntu platform: x64 instance: ubuntu-22.04 + suffix: "" - category: ubuntu platform: arm64 instance: ubuntu-22.04-arm + suffix: "" - category: macos platform: x64 - instance: macos-13 + instance: macos-15 + suffix: -macos-x86_64-none + + - category: macos + platform: arm64 + instance: macos-15 + suffix: -macos-aarch64-none python: ["3.10", "3.11", "3.12", "3.13"] @@ -58,8 +68,7 @@ jobs: - name: Set up Python ${{ matrix.python }} uses: astral-sh/setup-uv@v7 with: - architecture: ${{ matrix.os.platform }} - python-version: ${{ matrix.python }} + python-version: cpython-${{ matrix.python }}${{ matrix.os.suffix }} cache-python: true activate-environment: true enable-cache: true From 35d0f04a0f512662b9592eda29a1b2139e9aa9f6 Mon Sep 17 00:00:00 2001 From: Benedikt Reinartz Date: Tue, 9 Dec 2025 08:25:49 +0100 Subject: [PATCH 02/10] Use generic package installer --- .github/workflows/main.yml | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 03bd5b44e..011fe8c52 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -51,12 +51,6 @@ jobs: python: ["3.10", "3.11", "3.12", "3.13"] steps: - - name: Set Environment on macOS - uses: maxim-lobanov/setup-xamarin@v1 - if: ${{ matrix.os.category == 'macos' }} - with: - mono-version: latest - - name: Checkout code uses: actions/checkout@v6 @@ -65,6 +59,13 @@ jobs: with: dotnet-version: '8.0.x' + - name: Install Mono + uses: ConorMacBride/install-package@v1.1.0 + with: + brew: mono + choco: mono + apt: mono-runtime-sgen + - name: Set up Python ${{ matrix.python }} uses: astral-sh/setup-uv@v7 with: @@ -76,9 +77,6 @@ jobs: - name: Synchronize the virtual environment run: uv sync --managed-python - - name: Show pyvenv.cfg - run: cat .venv/pyvenv.cfg - - 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() From d2ae011f2347ced4d2b453eafa6e42aa6834ed11 Mon Sep 17 00:00:00 2001 From: Benedikt Reinartz Date: Tue, 9 Dec 2025 08:37:15 +0100 Subject: [PATCH 03/10] Use workspace cache for Nuget --- .github/workflows/main.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 011fe8c52..e74c98e36 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -49,7 +49,8 @@ jobs: suffix: -macos-aarch64-none python: ["3.10", "3.11", "3.12", "3.13"] - + env: + NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages steps: - name: Checkout code uses: actions/checkout@v6 From a69412262736cd9c7bd387e2a7e93b6f1b832c37 Mon Sep 17 00:00:00 2001 From: Benedikt Reinartz Date: Tue, 9 Dec 2025 08:38:43 +0100 Subject: [PATCH 04/10] Reorder steps --- .github/workflows/main.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e74c98e36..64602350c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -75,6 +75,8 @@ jobs: activate-environment: true enable-cache: true + - run: dotnet restore + - name: Synchronize the virtual environment run: uv sync --managed-python From abd9192a4e182b3d7127cf0cef16ee58b02ff9e1 Mon Sep 17 00:00:00 2001 From: Benedikt Reinartz Date: Tue, 9 Dec 2025 08:39:31 +0100 Subject: [PATCH 05/10] Disable always() on embed tests and reenable Mono on Windows --- .github/workflows/main.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 64602350c..328c28bdc 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -82,16 +82,13 @@ jobs: - 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 - name: Python Tests (.NET Core) From 23976182294e0c214ae76a855eb06f531232b444 Mon Sep 17 00:00:00 2001 From: Benedikt Reinartz Date: Tue, 9 Dec 2025 09:00:23 +0100 Subject: [PATCH 06/10] Use custom install-mono --- .github/actions/install-mono/action.yml | 43 +++++++++++++++++++++++++ .github/workflows/main.yml | 6 ++-- 2 files changed, 45 insertions(+), 4 deletions(-) create mode 100644 .github/actions/install-mono/action.yml diff --git a/.github/actions/install-mono/action.yml b/.github/actions/install-mono/action.yml new file mode 100644 index 000000000..6a1b9af2f --- /dev/null +++ b/.github/actions/install-mono/action.yml @@ -0,0 +1,43 @@ +name: 'Install Mono' +description: 'Install Mono' +branding: + icon: package + color: blue +inputs: + arch: + description: Architecture to install for + required: true +runs: + using: "composite" + steps: + - name: Install on macOS (x86_64) + if: runner.os == 'macOS' && inputs.arch == 'x64' + run: | + brew update + arch -x86_64 /usr/local/bin/brew install mono + shell: sh + + - name: Install on macOS + if: runner.os == 'macOS' && inputs.arch != 'x64' + run: | + brew update + brew install mono + shell: sh + + - name: Install on Linux + if: runner.os == 'Linux' + run: | + sudo apt update + sudo apt install -y mono-runtime-sgen + shell: sh + + - name: Install on Windows (x86) + if: runner.os == 'Windows' && inputs.arch == 'x86' + run: choco install --x86 -y mono + shell: sh + + - name: Install on Windows + if: runner.os == 'Windows' && inputs.arch != 'x86' + run: choco install -y mono + shell: sh + diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 328c28bdc..923fa1b03 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -61,11 +61,9 @@ jobs: dotnet-version: '8.0.x' - name: Install Mono - uses: ConorMacBride/install-package@v1.1.0 + uses: ./.github/actions/install-mono with: - brew: mono - choco: mono - apt: mono-runtime-sgen + arch: ${{ matrix.os.platform }} - name: Set up Python ${{ matrix.python }} uses: astral-sh/setup-uv@v7 From 8378487f23cb8d1bfd14fc50199ca99eb76d2121 Mon Sep 17 00:00:00 2001 From: Benedikt Reinartz Date: Tue, 9 Dec 2025 09:09:58 +0100 Subject: [PATCH 07/10] Disable 32bit tests again, require changes to setup-dotnet --- .github/workflows/main.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 923fa1b03..c2b855df6 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -17,11 +17,12 @@ jobs: matrix: os: # Disabled for now, will require some work (#2653) + # The main issue is setup-dotnet stubbornly installing for x64 only # - - category: windows - platform: x86 - instance: windows-latest - suffix: -windows-x86-none + # - category: windows + # platform: x86 + # instance: windows-latest + # suffix: -windows-x86-none - category: windows platform: x64 From 8ffc1faefd7cfca81980d7f19bf5baedb4a7a679 Mon Sep 17 00:00:00 2001 From: Benedikt Reinartz Date: Sat, 13 Dec 2025 09:07:31 +0100 Subject: [PATCH 08/10] Try with arch --- .github/actions/install-mono/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/install-mono/action.yml b/.github/actions/install-mono/action.yml index 6a1b9af2f..b8b64ed30 100644 --- a/.github/actions/install-mono/action.yml +++ b/.github/actions/install-mono/action.yml @@ -14,7 +14,7 @@ runs: if: runner.os == 'macOS' && inputs.arch == 'x64' run: | brew update - arch -x86_64 /usr/local/bin/brew install mono + arch -x86_64 brew install mono shell: sh - name: Install on macOS From 843854ffa4ec637fa65563adaaf929a5762ddc60 Mon Sep 17 00:00:00 2001 From: Benedikt Reinartz Date: Sat, 13 Dec 2025 15:21:52 +0100 Subject: [PATCH 09/10] Temporarily add upterm to ssh into macos node --- .github/workflows/main.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c2b855df6..79399fa78 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -66,6 +66,14 @@ jobs: with: arch: ${{ matrix.os.platform }} + - name: Setup upterm session + uses: owenthereal/action-upterm@v1 + if: ${{ failure() }} + with: + ## Shut down the server if unconnected after 5 minutes. + limit-access-to-actor: true + wait-timeout-minutes: 5 + - name: Set up Python ${{ matrix.python }} uses: astral-sh/setup-uv@v7 with: From aa4ea92597b980482896c063cc22fa7c08103e96 Mon Sep 17 00:00:00 2001 From: Benedikt Reinartz Date: Sat, 13 Dec 2025 15:27:58 +0100 Subject: [PATCH 10/10] Explicitly install brew on x64 macos --- .github/actions/install-mono/action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/install-mono/action.yml b/.github/actions/install-mono/action.yml index b8b64ed30..7f0a1f775 100644 --- a/.github/actions/install-mono/action.yml +++ b/.github/actions/install-mono/action.yml @@ -13,8 +13,8 @@ runs: - name: Install on macOS (x86_64) if: runner.os == 'macOS' && inputs.arch == 'x64' run: | - brew update - arch -x86_64 brew install mono + arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" + arch -x86_64 /usr/local/bin/brew install mono shell: sh - name: Install on macOS