-
Notifications
You must be signed in to change notification settings - Fork 273
/
.cirrus.yml
79 lines (60 loc) · 1.87 KB
/
.cirrus.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
build_wheels_task:
only_if: $CIRRUS_BRANCH =~ "release/.*" || $CIRRUS_TAG =~ "v0\..*"
matrix:
- compute_engine_instance:
image_project: cirrus-images
image: family/docker-builder-arm64
architecture: arm64
platform: linux
matrix:
- name: Build ARM Linux py3.6-9 wheels
env:
CIBW_BUILD: "cp36-* cp37-* cp38-* cp39-*"
- name: Build ARM Linux py3.10-12 wheels
env:
CIBW_BUILD: "cp310-* cp311-* cp312-*"
- name: Build ARM macOS wheels
macos_instance:
image: ghcr.io/cirruslabs/macos-sonoma-base:latest
env:
CIBW_BUILD: "cp39-* cp310-* cp311-* cp312-*"
alias: build_wheels
env:
CIRRUS_CLONE_DEPTH: 1
VENV: $HOME/relenv
PATH: $VENV/bin:$PATH
CIBW_SKIP: "*-musllinux_*"
CIBW_BUILD_VERBOSITY: 1
CIBW_MANYLINUX_AARCH64_IMAGE: manylinux_2_28
install_script: |
python3 -m venv $VENV
pip3 install cibuildwheel==2.17.0
build_script: |
cibuildwheel
wheels_artifacts:
path: wheelhouse/*.whl
upload_pypi_task:
only_if: $CIRRUS_BRANCH =~ "release/.*" || $CIRRUS_TAG =~ "v0\..*"
depends_on: build_wheels
name: Publish ARM wheels
container:
image: python:latest
env:
CIRRUS_CLONE_DEPTH: 1
API_BASEURL: https://api.cirrus-ci.com/v1
TWINE_USERNAME: __token__
install_script: |
python3 -m pip install twine
get_artifacts_script: |
curl -sSLO $API_BASEURL/artifact/build/$CIRRUS_BUILD_ID/wheels.zip
unzip -q wheels.zip
upload_script: |
case "$CIRRUS_TAG" in
v0.*)
export TWINE_REPOSITORY=pypi TWINE_PASSWORD=$PYPI_TOKEN ;;
*)
export TWINE_REPOSITORY=testpypi TWINE_PASSWORD=$TESTPYPI_TOKEN ;;
esac
echo Uploading wheels to $TWINE_REPOSITORY...
python3 -m twine check wheelhouse/*.whl
python3 -m twine upload --disable-progress-bar wheelhouse/*.whl