Files
cibuildwheel/azure-pipelines.yml
T

92 lines
2.9 KiB
YAML
Raw Normal View History

2023-07-09 15:59:27 +01:00
pr:
paths:
exclude:
2025-06-10 17:57:25 -04:00
- .github/**
- bin/*
- docs/**
- examples/github-*
- examples/ci*
- examples/travis-ci-*
- .ci*
- .pre-commit-config.yaml
2025-06-10 17:57:25 -04:00
- .readthedocs.yml
- .travis.yml
- README.md
- mkdocs.yml
- noxfile.py
2023-07-09 15:59:27 +01:00
2019-03-10 22:50:07 +00:00
jobs:
- job: tests
strategy:
matrix:
2026-06-05 08:09:16 -04:00
linux_313:
imageName: "ubuntu-latest"
2026-06-05 08:09:16 -04:00
pythonVersion: "3.13"
testSelect: "native"
2026-06-05 08:09:16 -04:00
android_313:
imageName: "ubuntu-latest"
2026-06-05 08:09:16 -04:00
pythonVersion: "3.13"
testSelect: "android"
2026-06-05 08:09:16 -04:00
macos_313:
imageName: "macos-latest"
2026-06-05 08:09:16 -04:00
pythonVersion: "3.13"
testSelect: "native"
2026-06-05 08:09:16 -04:00
ios_313:
2025-08-21 07:51:06 +08:00
imageName: "macos-14" # See https://github.com/actions/runner-images/issues/12777
2026-06-05 08:09:16 -04:00
pythonVersion: "3.13"
testSelect: "ios"
2026-06-05 08:09:16 -04:00
android_macos_313:
imageName: "macos-latest"
2026-06-05 08:09:16 -04:00
pythonVersion: "3.13"
testSelect: "android"
2026-06-05 08:09:16 -04:00
windows_313:
imageName: "windows-latest"
2026-06-05 08:09:16 -04:00
pythonVersion: "3.13"
testSelect: "native"
2025-04-29 00:25:17 +02:00
timeoutInMinutes: 180
pool:
vmImage: $(imageName)
2026-06-05 08:09:16 -04:00
variables:
# Relocate cibuildwheel's download cache (interpreters) and the per-worker
# test pip caches (which live under it) to a stable, cacheable path.
CIBW_CACHE_PATH: $(Pipeline.Workspace)/.cibw-cache
steps:
2019-03-10 22:50:07 +00:00
- task: UsePythonVersion@0
2019-11-09 11:19:02 +01:00
inputs:
versionSpec: $(pythonVersion)
2026-06-05 08:09:16 -04:00
- task: Cache@2
displayName: 'Cache cibuildwheel downloads'
inputs:
# build-platforms.toml carries the interpreter pins; bump the version
# prefix to force a cold cache. restoreKeys lets a stale cache still seed
# a new run (cibuildwheel re-downloads only what's missing).
key: 'cibw-cache | v1 | "$(imageName)" | "$(testSelect)" | cibuildwheel/resources/build-platforms.toml'
restoreKeys: |
cibw-cache | v1 | "$(imageName)" | "$(testSelect)"
path: $(CIBW_CACHE_PATH)
- task: JavaToolInstaller@0
condition: and(eq(variables['testSelect'], 'android'), eq(variables['Agent.OS'], 'Linux'))
inputs:
versionSpec: '17'
jdkArchitectureOption: 'x64'
jdkSourceOption: 'PreInstalled'
2019-03-10 22:50:07 +00:00
- bash: docker run --rm --privileged docker.io/tonistiigi/binfmt:latest --install all
condition: and(eq(variables['imageName'], 'ubuntu-latest'), eq(variables['testSelect'], 'native'))
displayName: 'Install binfmt on Linux'
- bash: python -m pip install -U pip && python -m pip install -e. --group test
displayName: 'Update pip and install cibuildwheel --group test'
- bash: echo "##vso[task.setvariable variable=CIBW_ENABLE;]all"
condition: eq(variables['Build.SourceBranch'], 'refs/heads/main')
displayName: Set CIBW_ENABLE to all (main branch)
2019-03-10 22:50:07 +00:00
- bash: |
echo "CIBW_ENABLE = $CIBW_ENABLE"
python ./bin/run_tests.py --test-select $(testSelect)
displayName: 'Run tests'