| 1 |
version: 2.1 |
| 2 |
|
| 3 |
parameters: |
| 4 |
REF: |
| 5 |
type: string |
| 6 |
default: '' |
| 7 |
description: Optional tag to build |
| 8 |
|
| 9 |
jobs: |
| 10 |
arm-wheels: |
| 11 |
parameters: |
| 12 |
build: |
| 13 |
type: string |
| 14 |
image: |
| 15 |
type: string |
| 16 |
|
| 17 |
machine: |
| 18 |
image: ubuntu-2404:current |
| 19 |
resource_class: arm.large # 4 vCPUs |
| 20 |
|
| 21 |
environment: |
| 22 |
CIBW_ARCHS: "aarch64" |
| 23 |
CIBW_MANYLINUX_AARCH64_IMAGE: "<< parameters.image >>" |
| 24 |
CIBW_MUSLLINUX_AARCH64_IMAGE: "<< parameters.image >>" |
| 25 |
CIBW_BUILD: "<< parameters.build >>" |
| 26 |
|
| 27 |
steps: |
| 28 |
- checkout |
| 29 |
- when: |
| 30 |
condition: << pipeline.parameters.REF >> |
| 31 |
steps: |
| 32 |
- run: |
| 33 |
name: Checkout branch/tag << pipeline.parameters.REF >> |
| 34 |
command: | |
| 35 |
echo "Switching to branch/tag << pipeline.parameters.REF >> if it exists" |
| 36 |
git checkout << pipeline.parameters.REF >> || true |
| 37 |
git pull origin << pipeline.parameters.REF >> || true |
| 38 |
- run: |
| 39 |
name: install cibuildwheel and other build reqs |
| 40 |
command: | |
| 41 |
python3 -m pip install --upgrade pip setuptools setuptools_scm[toml] |
| 42 |
python3 -m pip install -rcibw-requirements.txt |
| 43 |
|
| 44 |
- run: |
| 45 |
name: pip freeze |
| 46 |
command: | |
| 47 |
python3 -m pip freeze |
| 48 |
|
| 49 |
- run: |
| 50 |
name: list wheels |
| 51 |
command: | |
| 52 |
python3 -m cibuildwheel . --print-build-identifiers |
| 53 |
|
| 54 |
- run: |
| 55 |
name: cibuildwheel |
| 56 |
command: | |
| 57 |
python3 -m cibuildwheel . |
| 58 |
|
| 59 |
- store_test_results: |
| 60 |
path: test-results/ |
| 61 |
|
| 62 |
- store_artifacts: |
| 63 |
path: wheelhouse/ |
| 64 |
|
| 65 |
# - when: |
| 66 |
# condition: |
| 67 |
# or: |
| 68 |
# - matches: |
| 69 |
# pattern: ".+" |
| 70 |
# value: "<< pipeline.git.tag >>" |
| 71 |
# - << pipeline.parameters.REF >> |
| 72 |
# steps: |
| 73 |
# - run: |
| 74 |
# environment: |
| 75 |
# TWINE_NONINTERACTIVE: "1" |
| 76 |
# command: | |
| 77 |
# python3 -m pip install twine |
| 78 |
# python3 -m twine upload --verbose --skip-existing wheelhouse/* |
| 79 |
|
| 80 |
workflows: |
| 81 |
wheels: # This is the name of the workflow, feel free to change it to better match your workflow. |
| 82 |
# Inside the workflow, you define the jobs you want to run. |
| 83 |
jobs: |
| 84 |
- arm-wheels: |
| 85 |
name: arm-wheels-manylinux_2_28 |
| 86 |
filters: |
| 87 |
branches: |
| 88 |
only: main |
| 89 |
tags: |
| 90 |
only: /.*/ |
| 91 |
build: "*manylinux*" |
| 92 |
image: quay.io/pypa/manylinux_2_28_aarch64 |
| 93 |
- arm-wheels: |
| 94 |
name: arm-wheels-musllinux_1_2 |
| 95 |
filters: |
| 96 |
branches: |
| 97 |
only: main |
| 98 |
tags: |
| 99 |
only: /.*/ |
| 100 |
build: "*musllinux*" |
| 101 |
image: quay.io/pypa/musllinux_1_2_aarch64 |