Skip to content

Commit 76ab4e6

Browse files
committed
Update release workflows for Python 3.14, Intel macOS runner, etc
Add Python 3.14 to release workflows and update cibuildwheel to a release that uses 3.14-final. Use the new macos-15-intel. Separate manylinux and musllinux jobs. Move all wheel building to GitHub Actions. Cirrus CI's macos-sonoma-base's default Python can no longer run current cibuildwheel (which requires Python 3.11), so it is time to move the ARM wheels to be built on GitHub Actions, now that that supports both Linux and macOS on ARM.
1 parent 1de219a commit 76ab4e6

File tree

3 files changed

+15
-108
lines changed

3 files changed

+15
-108
lines changed

.cirrus.yml

Lines changed: 0 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -17,90 +17,3 @@ freebsd_ci_task:
1717
1818
test_script: |
1919
PYTHONPATH="$(echo $PWD/build/lib.*)" pytest
20-
21-
22-
build_wheels_task:
23-
only_if: $CIRRUS_BRANCH =~ "release/.*" || $CIRRUS_TAG =~ "v0\..*"
24-
25-
matrix:
26-
- compute_engine_instance:
27-
image_project: cirrus-images
28-
image: family/docker-builder-arm64
29-
architecture: arm64
30-
platform: linux
31-
matrix:
32-
- name: Build ARM Linux py3.8-9 wheels
33-
env:
34-
CIBW_BUILD: "cp38-* cp39-*"
35-
- name: Build ARM Linux py3.10-11 wheels
36-
env:
37-
CIBW_BUILD: "cp310-* cp311-*"
38-
- name: Build ARM Linux py3.12-13 wheels
39-
env:
40-
CIBW_BUILD: "cp312-* cp313-*"
41-
42-
- name: Build ARM macOS wheels
43-
macos_instance:
44-
image: ghcr.io/cirruslabs/macos-sonoma-base:latest
45-
env:
46-
CIBW_BUILD: "cp39-* cp310-* cp311-* cp312-* cp313-*"
47-
48-
alias: build_wheels
49-
50-
env:
51-
CIRRUS_CLONE_DEPTH: 1
52-
53-
VENV: $HOME/relenv
54-
PATH: $VENV/bin:$PATH
55-
56-
CIBW_BUILD_VERBOSITY: 1
57-
58-
# Avoid linking with non-system library libdeflate.dylib
59-
CIBW_ENVIRONMENT_MACOS: HTSLIB_CONFIGURE_OPTIONS="--without-libdeflate"
60-
61-
CIBW_MANYLINUX_AARCH64_IMAGE: manylinux_2_28
62-
CIBW_MUSLLINUX_AARCH64_IMAGE: musllinux_1_2
63-
64-
install_script: |
65-
python3 -m venv $VENV
66-
pip3 install cibuildwheel==2.23.3
67-
68-
build_script: |
69-
cibuildwheel
70-
71-
wheels_artifacts:
72-
path: wheelhouse/*.whl
73-
74-
upload_pypi_task:
75-
only_if: $CIRRUS_BRANCH =~ "release/.*" || $CIRRUS_TAG =~ "v0\..*"
76-
depends_on: build_wheels
77-
78-
name: Publish ARM wheels
79-
80-
container:
81-
image: python:latest
82-
83-
env:
84-
CIRRUS_CLONE_DEPTH: 1
85-
API_BASEURL: https://api.cirrus-ci.com/v1
86-
TWINE_USERNAME: __token__
87-
88-
install_script: |
89-
python3 -m pip install twine
90-
91-
get_artifacts_script: |
92-
curl -sSLO $API_BASEURL/artifact/build/$CIRRUS_BUILD_ID/wheels.zip
93-
unzip -q wheels.zip
94-
95-
upload_script: |
96-
case "$CIRRUS_TAG" in
97-
v0.*)
98-
export TWINE_REPOSITORY=pypi TWINE_PASSWORD=$PYPI_TOKEN ;;
99-
*)
100-
export TWINE_REPOSITORY=testpypi TWINE_PASSWORD=$TESTPYPI_TOKEN ;;
101-
esac
102-
103-
echo Uploading wheels to $TWINE_REPOSITORY...
104-
105-
python3 -m twine check wheelhouse/*.whl
106-
python3 -m twine upload --disable-progress-bar wheelhouse/*.whl

.github/workflows/release.yaml

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,13 @@ on:
99

1010
jobs:
1111
build_wheels:
12-
runs-on: ${{ matrix.os }}
12+
runs-on: ${{ matrix.kind == 'macos' && (matrix.arch == 'arm' && 'macos-latest' || 'macos-15-intel')
13+
|| (matrix.arch == 'arm' && 'ubuntu-24.04-arm' || 'ubuntu-latest') }}
1314
strategy:
1415
matrix:
15-
os: [ubuntu-latest, macos-13]
16-
build: ["cp38-* cp39-*", "cp310-* cp311-*", "cp312-* cp313-*"]
16+
kind: [many, musl, macos]
17+
arch: [arm, intel]
18+
build: ["cp38-* cp39-*", "cp310-* cp311-*", "cp312-* cp313-* cp314-*"]
1719
x64image: [manylinux_2_28]
1820
nametag: [none]
1921

@@ -27,25 +29,27 @@ jobs:
2729
- name: Checkout pysam
2830
uses: actions/checkout@v5
2931

30-
- name: Check platform ${{ matrix.os }} is the expected architecture
31-
run: devtools/check-platform.sh ${{ matrix.os }}
32+
- name: Check platform is the expected ${{ matrix.arch }} architecture
33+
run: devtools/check-platform.sh ${{ matrix.arch }}
3234

3335
- name: Build wheels
34-
uses: pypa/cibuildwheel@v2.23.3
36+
uses: pypa/cibuildwheel@v3.3.0
3537
env:
3638
CIBW_BUILD: ${{ matrix.build }}
39+
CIBW_SKIP_LINUX: ${{ matrix.kind == 'many' && '*-musllinux_*' || '*-manylinux_*' }}
40+
CIBW_SKIP_MACOS: cp38-macosx_arm64
41+
3742
CIBW_BUILD_VERBOSITY: 1
3843

3944
# Avoid linking with non-system library libdeflate.dylib
4045
CIBW_ENVIRONMENT_MACOS: HTSLIB_CONFIGURE_OPTIONS="--without-libdeflate"
4146

42-
CIBW_ARCHS_LINUX: x86_64
43-
CIBW_ARCHS_MACOS: x86_64
47+
CIBW_ARCHS: native
4448

4549
CIBW_MANYLINUX_X86_64_IMAGE: ${{ matrix.x64image }}
46-
CIBW_MANYLINUX_I686_IMAGE: manylinux2014
4750
CIBW_MANYLINUX_AARCH64_IMAGE: manylinux_2_28
4851
CIBW_MUSLLINUX_X86_64_IMAGE: musllinux_1_2
52+
CIBW_MUSLLINUX_AARCH64_IMAGE: musllinux_1_2
4953

5054
- name: Check wheelhouse
5155
run: devtools/artifactname.py wheelhouse/*.whl >> $GITHUB_ENV

devtools/check-platform.sh

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,11 @@
11
#!/bin/sh -e
22

3-
case $1 in
4-
ubuntu-*-arm) expected=arm ;;
5-
macos-13) expected=x86_64 ;;
6-
ubuntu-*) expected=x86_64 ;;
7-
macos-*) expected=arm ;;
8-
windows-*) expected=x86_64 ;;
9-
*)
10-
echo Unknown platform $1 >&2
11-
exit 2
12-
;;
13-
esac
3+
expected=$1
144

155
arch=$(uname -m)
166
case $arch in
177
arm*|aarch*) actual=arm ;;
18-
x86*) actual=x86_64 ;;
8+
x86*) actual=intel ;;
199
*)
2010
echo Unrecognized uname result $arch >&2
2111
exit 2

0 commit comments

Comments
 (0)