Skip to content

Commit 5754de3

Browse files
committed
Merge release workflow updates
2 parents 8ab5287 + 75654b6 commit 5754de3

File tree

4 files changed

+61
-23
lines changed

4 files changed

+61
-23
lines changed

.cirrus.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ build_wheels_task:
1717

1818
- name: Build ARM macOS wheels
1919
macos_instance:
20-
image: ghcr.io/cirruslabs/macos-ventura-base:latest
20+
image: ghcr.io/cirruslabs/macos-sonoma-base:latest
2121
env:
2222
CIBW_BUILD: "cp39-* cp310-* cp311-* cp312-*"
2323

@@ -26,11 +26,17 @@ build_wheels_task:
2626
env:
2727
CIRRUS_CLONE_DEPTH: 1
2828

29+
VENV: $HOME/relenv
30+
PATH: $VENV/bin:$PATH
31+
2932
CIBW_SKIP: "*-musllinux_*"
33+
CIBW_BUILD_VERBOSITY: 1
34+
3035
CIBW_MANYLINUX_AARCH64_IMAGE: manylinux_2_28
3136

3237
install_script: |
33-
python3 -m pip install cibuildwheel==2.16.2
38+
python3 -m venv $VENV
39+
pip3 install cibuildwheel==2.17.0
3440
3541
build_script: |
3642
cibuildwheel

.github/workflows/release.yaml

Lines changed: 23 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,13 @@ jobs:
1818
os: [ubuntu, macos]
1919
build: ["cp36-* cp37-* cp38-* cp39-*", "cp310-* cp311-* cp312-*"]
2020
x64image: [manylinux_2_28]
21+
nametag: [none]
2122

2223
include:
2324
- os: ubuntu
2425
build: "cp38-manylinux_x86_64"
2526
x64image: manylinux2014
27+
nametag: focal
2628

2729
steps:
2830
- name: Checkout pysam
@@ -32,7 +34,8 @@ jobs:
3234
uses: pypa/[email protected]
3335
env:
3436
CIBW_BUILD: ${{ matrix.build }}
35-
CIBW_SKIP: "*musllinux*"
37+
CIBW_SKIP: "*-musllinux_*"
38+
CIBW_BUILD_VERBOSITY: 1
3639

3740
CIBW_ARCHS_LINUX: x86_64
3841
CIBW_ARCHS_MACOS: x86_64
@@ -41,42 +44,46 @@ jobs:
4144
CIBW_MANYLINUX_I686_IMAGE: manylinux2014
4245
CIBW_MANYLINUX_AARCH64_IMAGE: manylinux_2_28
4346

47+
- name: Check wheelhouse
48+
run: devtools/artifactname.py wheelhouse/*.whl >> $GITHUB_ENV
49+
env:
50+
NAMETAG: ${{ matrix.nametag }}
51+
4452
- name: Upload artifacts
45-
uses: actions/upload-artifact@v3
53+
uses: actions/upload-artifact@v4
4654
with:
55+
name: ${{ env.artifactname }}
4756
path: wheelhouse/*.whl
4857

4958
build_sdist:
50-
runs-on: ${{ matrix.os }}-latest
51-
strategy:
52-
matrix:
53-
os: [ubuntu, macos]
54-
python-version: [3.9]
59+
runs-on: ubuntu-latest
60+
env:
61+
job_python_version: "3.10"
5562

5663
steps:
5764
- name: Checkout pysam
5865
uses: actions/checkout@v4
5966

60-
- name: Set up Python ${{ matrix.python-version }}
67+
- name: Set up Python ${{ env.job_python_version }}
6168
uses: actions/setup-python@v5
6269
with:
63-
python-version: ${{ matrix.python-version }}
70+
python-version: ${{ env.job_python_version }}
6471

6572
- name: Install prerequisite Python libraries
66-
run: pip install cython pytest pytest-pep8
73+
run: pip install cython
6774

6875
- name: Install build prerequisites
69-
if: runner.os == 'Linux'
7076
run: |
7177
sudo apt-get update
7278
sudo apt-get install -q --no-install-recommends --no-install-suggests libcurl4-openssl-dev
7379
7480
- name: Create source distribution
75-
run: python setup.py sdist
81+
run: python setup.py sdist --owner=root --group=root
7682

77-
- uses: actions/upload-artifact@v3
83+
- uses: actions/upload-artifact@v4
7884
with:
79-
path: dist/*.tar.gz
85+
name: sdist
86+
path: dist/pysam-*.tar.gz
8087

8188
upload_pypi:
8289
needs: [build_wheels, build_sdist]
@@ -88,9 +95,9 @@ jobs:
8895

8996
steps:
9097
- name: Get artifacts
91-
uses: actions/download-artifact@v3
98+
uses: actions/download-artifact@v4
9299
with:
93-
name: artifact
100+
merge-multiple: true
94101
path: dist
95102

96103
- name: Publish distribution to Test PyPI

devtools/artifactname.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/usr/bin/env python3
2+
3+
import os
4+
import re
5+
import sys
6+
7+
pattern = re.compile(r'-cp([^-]*)-cp[^-]*-([^_]*)[0-9_]*_([^.]*)')
8+
vers = set()
9+
plats = set()
10+
arches = set()
11+
12+
for fname in sys.argv[1:]:
13+
m = pattern.search(fname)
14+
vers.add(int(m[1]))
15+
plats.add(m[2])
16+
arches.add(m[3])
17+
18+
plat = '-'.join(sorted(plats))
19+
arch = '-'.join(sorted(arches))
20+
ver = '-'.join(map(str, sorted(vers)))
21+
22+
tag = os.environ.get('NAMETAG', 'none')
23+
tag = f'-{tag}' if tag != 'none' else ''
24+
25+
print(f'artifactname=wheels-{plat}-{arch}-{ver}{tag}')

devtools/install-prerequisites.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,26 @@
33
if test -x /usr/bin/dnf; then
44
echo Installing prerequisites via dnf...
55
dnf -y install epel-release
6-
dnf -y install zlib-devel bzip2-devel xz-devel curl-devel samtools bcftools htslib-tools
6+
dnf -y install zlib-devel bzip2-devel xz-devel curl-devel openssl-devel samtools bcftools htslib-tools
77

88
elif test -x /usr/bin/yum; then
99
if yum -y install epel-release; then
1010
echo Installing prerequisites via yum...
11-
yum -y install zlib-devel bzip2-devel xz-devel curl-devel samtools bcftools htslib-tools
11+
yum -y install zlib-devel bzip2-devel xz-devel curl-devel openssl-devel samtools bcftools htslib-tools
1212
else
1313
echo Installing non-test prerequisites via yum...
14-
yum -y install zlib-devel bzip2-devel xz-devel curl-devel
14+
yum -y install zlib-devel bzip2-devel xz-devel curl-devel openssl-devel
1515
fi
1616

1717
elif test -d /etc/dpkg; then
1818
echo Installing prerequisites via apt-get...
1919
apt-get update
20-
apt-get install -y --no-install-recommends --no-install-suggests libcurl4-openssl-dev zlib1g-dev libbz2-dev liblzma-dev samtools bcftools tabix
20+
apt-get install -y --no-install-recommends --no-install-suggests libcurl4-openssl-dev libssl-dev zlib1g-dev libbz2-dev liblzma-dev samtools bcftools tabix
2121

2222
elif test -x /sbin/apk; then
2323
echo Installing non-test prerequisites via apk...
2424
apk update
25-
apk add zlib-dev bzip2-dev xz-dev curl-dev
25+
apk add zlib-dev bzip2-dev xz-dev curl-dev openssl-dev
2626

2727
elif test -x ${HOMEBREW_PREFIX-/usr/local}/bin/brew; then
2828
echo Installing prerequisites via brew...

0 commit comments

Comments
 (0)