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 <amp@ampcode.com> * 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 <henryfs@princeton.edu> --------- Signed-off-by: Henry Schreiner <henryfs@princeton.edu> Co-authored-by: Amp <amp@ampcode.com> Co-authored-by: Henry Schreiner <henryfs@princeton.edu>
This commit is contained in:
co-authored by
Amp
Henry Schreiner
parent
3c07d63629
commit
52f77ea3dd
+13
-12
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user