From 52f77ea3dd85dcef38bf23d4882b0d8b54550891 Mon Sep 17 00:00:00 2001 From: Joe Rickerby Date: Mon, 1 Jun 2026 04:23:33 +0100 Subject: [PATCH] ci: fix Windows Gitlab test running (#2870) * Try to fix the problem with py trying to execute the shebang * run whenever the branch name starts with gitlab * Modernise GitLab CI config - Windows: remove stale servercore:1809 image and choco install (runners are now Windows 2022 VMs with Python 3.13 pre-installed) - macOS: update deprecated macos-14-xcode-15 to macos-15-xcode-16 - Linux: bump Python image from 3.12 to 3.13 - All jobs: also run on gitlab* branches with CIBW_ENABLE=all Generated with the help of AI (Amp/Claude Opus 4.7) Amp-Thread-ID: https://ampcode.com/threads/T-019e6496-f89a-74e7-9f6b-655574290e68 Co-authored-by: Amp * ci: exclude graalpy on GitLab Windows runners GraalPy is JVM-based and slow to start; on the small (2-core) GitLab SaaS Windows runners, virtualenv's interpreter query for graalpy.exe times out, failing test_0_basic::test[pip]. Restrict the Windows job's CIBW_ENABLE to all groups except graalpy (other platforms keep "all"). CIBW_ENABLE rather than CIBW_SKIP is used so the test's expected-wheel set (derived from CIBW_ENABLE) stays consistent with what is built. Assisted-by: ClaudeCode:claude-opus-4.8 Signed-off-by: Henry Schreiner --------- Signed-off-by: Henry Schreiner Co-authored-by: Amp Co-authored-by: Henry Schreiner --- .gitlab-ci.yml | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a5a7cf48..e33f4d4b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,5 +1,5 @@ linux: - image: python:3.12 + image: python:3.13 services: - name: docker:dind entrypoint: ["env", "-u", "DOCKER_HOST"] @@ -14,7 +14,7 @@ linux: # (comment the below line in a PR to debug a Gitlab-specific issue) PYTEST_ADDOPTS: -k "unit_test or test_0_basic" --suppress-no-test-exit-code rules: - - if: '$CI_COMMIT_BRANCH == "main"' + - if: '$CI_COMMIT_BRANCH == "main" || $CI_COMMIT_BRANCH =~ /^gitlab/' variables: CIBW_ENABLE: "all" script: @@ -25,28 +25,29 @@ linux: - python ./bin/run_tests.py windows: - image: mcr.microsoft.com/windows/servercore:1809 variables: PYTEST_ADDOPTS: -k "unit_test or test_0_basic" --suppress-no-test-exit-code - before_script: - - choco install python -y --allow-downgrade --version 3.12.4 rules: - - if: '$CI_COMMIT_BRANCH == "main"' + - if: '$CI_COMMIT_BRANCH == "main" || $CI_COMMIT_BRANCH =~ /^gitlab/' variables: - CIBW_ENABLE: "all" + # Everything except graalpy. GraalPy is JVM-based and very slow to + # start; on the small (2-core) GitLab SaaS Windows runners, + # virtualenv's interpreter query for graalpy.exe times out, failing + # the build. (Other platforms run the full "all" group.) + CIBW_ENABLE: "cpython-prerelease pypy pypy-eol pyodide-eol pyodide-prerelease" script: - - py -m pip install -U pip - - py -m pip install -e. pytest-custom-exit-code --group test - - py bin\run_tests.py + - python -m pip install -U pip + - python -m pip install -e. pytest-custom-exit-code --group test + - python bin\run_tests.py tags: - saas-windows-medium-amd64 macos: - image: macos-14-xcode-15 + image: macos-15-xcode-16 variables: PYTEST_ADDOPTS: -k "unit_test or test_0_basic" --suppress-no-test-exit-code rules: - - if: '$CI_COMMIT_BRANCH == "main"' + - if: '$CI_COMMIT_BRANCH == "main" || $CI_COMMIT_BRANCH =~ /^gitlab/' variables: CIBW_ENABLE: "all" script: