* 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>
59 lines
2.1 KiB
YAML
59 lines
2.1 KiB
YAML
linux:
|
|
image: python:3.13
|
|
services:
|
|
- name: docker:dind
|
|
entrypoint: ["env", "-u", "DOCKER_HOST"]
|
|
command: ["dockerd-entrypoint.sh"]
|
|
variables:
|
|
DOCKER_HOST: tcp://docker:2375/
|
|
DOCKER_DRIVER: overlay2
|
|
# See https://github.com/docker-library/docker/pull/166
|
|
DOCKER_TLS_CERTDIR: ""
|
|
|
|
# skip all but the basic tests
|
|
# (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" || $CI_COMMIT_BRANCH =~ /^gitlab/'
|
|
variables:
|
|
CIBW_ENABLE: "all"
|
|
script:
|
|
- curl -sSL https://get.docker.com/ | sh
|
|
- docker run --rm --privileged docker.io/tonistiigi/binfmt:latest --install all
|
|
- python -m pip install -U pip
|
|
- python -m pip install -e. pytest-custom-exit-code --group test
|
|
- python ./bin/run_tests.py
|
|
|
|
windows:
|
|
variables:
|
|
PYTEST_ADDOPTS: -k "unit_test or test_0_basic" --suppress-no-test-exit-code
|
|
rules:
|
|
- if: '$CI_COMMIT_BRANCH == "main" || $CI_COMMIT_BRANCH =~ /^gitlab/'
|
|
variables:
|
|
# 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:
|
|
- 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-15-xcode-16
|
|
variables:
|
|
PYTEST_ADDOPTS: -k "unit_test or test_0_basic" --suppress-no-test-exit-code
|
|
rules:
|
|
- if: '$CI_COMMIT_BRANCH == "main" || $CI_COMMIT_BRANCH =~ /^gitlab/'
|
|
variables:
|
|
CIBW_ENABLE: "all"
|
|
script:
|
|
- python3 -m pip install -U pip
|
|
- python3 -m pip install -e. pytest-custom-exit-code --group test
|
|
- python3 ./bin/run_tests.py
|
|
tags:
|
|
- saas-macos-medium-m1
|