@@ -19,103 +19,128 @@ on:
1919 - " v*.*.*"
2020
2121jobs :
22- build-pypi-distribs-sdist :
23- name : Build and upload sdist
22+ build-wheels :
23+ name : Build unicode wheels ${{ matrix.type }} ${{ matrix.arch }} on ${{ matrix.os }}
24+ runs-on : ${{ matrix.os }}
25+ defaults :
26+ run :
27+ shell : bash
28+ strategy :
29+ fail-fast : false
30+ matrix :
31+ os : [macos-latest, windows-latest]
32+ arch : [auto64]
33+ build : ["cp{39,310,311,312,313}-*"]
34+
35+ include :
36+ - os : ubuntu-latest
37+ arch : auto64
38+ type : manylinux1
39+ build : " cp39-*"
40+ CIBW_MANYLINUX_X86_64_IMAGE : manylinux1
41+
42+ - os : ubuntu-latest
43+ arch : auto64
44+ type : manylinux2010
45+ build : " cp310-*"
46+ CIBW_MANYLINUX_X86_64_IMAGE : manylinux2010
47+
48+ - os : ubuntu-latest
49+ arch : auto64
50+ type : manylinux2014
51+ build : " cp{311,312,313}-*"
52+ CIBW_MANYLINUX_X86_64_IMAGE : manylinux2014
53+
54+ - os : macos-latest
55+ arch : universal2
56+ build : " cp{39,310,311,312,313}-*"
57+
58+ - os : windows-latest
59+ arch : auto64
60+ build : " cp{39,310,311,312,313}-*"
61+
62+ steps :
63+ - uses : actions/checkout@v4
64+
65+ - name : Build wheels and run tests
66+ uses : pypa/cibuildwheel@v2.23.3
67+ env :
68+ CIBW_BUILD : ${{ matrix.build }}
69+ CIBW_MANYLINUX_I686_IMAGE : ${{ matrix.CIBW_MANYLINUX_I686_IMAGE }}
70+ CIBW_MANYLINUX_X86_64_IMAGE : ${{ matrix.CIBW_MANYLINUX_X86_64_IMAGE }}
71+ CIBW_ARCHS : ${{ matrix.arch }}
72+ CIBW_TEST_REQUIRES : pytest
73+ CIBW_TEST_COMMAND : pytest -vvs {project}/tests
74+ # Skip PyPy wheels
75+ CIBW_SKIP : " pp*"
76+
77+ - name : Collect built wheels
78+ uses : actions/upload-artifact@v4
79+ with :
80+ name : cyseq-wheels-${{ matrix.os }}-${{ strategy.job-index }}
81+ path : ./wheelhouse/*.whl
82+
83+ build-sdist :
84+ name : Build source distribution
2485 runs-on : ubuntu-24.04
2586
2687 steps :
27- - name : Checkout code
28- uses : actions/checkout@v4
29-
30- - name : Install build, twine, pkginfo, and packaging
31- run : python -m pip install --user --upgrade build twine pkginfo packaging
32-
33- - name : Build sdist
34- run : python -m build --sdist --outdir dist/
35-
36- - name : Validate sdist for Pypi
37- run : python -m twine check dist/*
38-
39- - name : Upload sdist
40- uses : actions/upload-artifact@v4
88+ - uses : actions/checkout@v4
89+
90+ - name : Checkout and install reqs
91+ run : |
92+ pip install --upgrade --user build twine pkginfo packaging pip setuptools cython
93+
94+ - name : Build sdist
95+ run : |
96+ python setup.py sdist
97+ twine check dist/*
98+
99+ - name : Collect built sdist
100+ uses : actions/upload-artifact@v4
101+ with :
102+ name : cyseq-sdist
103+ path : dist/*.tar.gz
104+
105+ merge :
106+ runs-on : ubuntu-latest
107+ needs : [build-sdist, build-wheels]
108+ steps :
109+ - name : Merge created wheels and sdist in a single zip
110+ uses : actions/upload-artifact/merge@v4
41111 with :
42- name : pypi_archives-sdist
43- path : dist/*
44-
45- build-pypi-distribs-wheels :
46- name : Build and upload wheels
47- runs-on : ${{ matrix.os }}
48-
49- strategy :
50- matrix :
51- os : [ubuntu-latest, windows-latest, macos-13, macos-latest]
112+ name : cyseq-build
113+ pattern : cyseq-*
52114
115+ check-dist :
116+ name : Check distributions are PyPi-correct
117+ needs : merge
118+ runs-on : ubuntu-22.04
53119 steps :
54- - name : Checkout code
55- uses : actions/checkout@v4
56-
57- - name : Install cibuildwheel, twine, pkginfo, and packaging
58- run : python -m pip install --user --upgrade cibuildwheel twine pkginfo packaging
59-
60- - name : Build wheels
61- env :
62- CIBW_BUILD : " cp39-* cp310-* cp311-* cp312-* cp313-*"
63- CIBW_SKIP : " *_aarch64 *_ppc64le *_s390x *_armv7l *_riscv64 *_aarch64 *_ppc64le *_s390x *_armv7l *_riscv64"
64- run : python -m cibuildwheel --output-dir dist/
65-
66- - name : Validate wheels for Pypi
67- run : python -m twine check dist/*
68-
69- - name : Upload wheels
70- uses : actions/upload-artifact@v4
120+ - uses : actions/download-artifact@v4
71121 with :
72- name : pypi_archives-${{ matrix.os }}
73- path : dist/*
122+ path : cyseq-build
123+ - run : find . -ls
124+ - run : pipx run twine check --strict cyseq-build/*/*
74125
75126 create-gh-release :
76127 name : Create GH release
77128 needs :
78- - build-pypi-distribs-sdist
79- - build-pypi-distribs-wheels
129+ - check-dist
80130 runs-on : ubuntu-24.04
81131
82132 steps :
83- - name : Download sdist
84- uses : actions/download-artifact@v4
85- with :
86- name : pypi_archives-sdist
87- path : dist
88-
89- - name : Download ubuntu-latest builds
90- uses : actions/download-artifact@v4
91- with :
92- name : pypi_archives-ubuntu-latest
93- path : dist
94-
95- - name : Download windows-latest builds
133+ - name : Download builds
96134 uses : actions/download-artifact@v4
97135 with :
98- name : pypi_archives-windows-latest
99- path : dist
100-
101- - name : Download macos-13 builds
102- uses : actions/download-artifact@v4
103- with :
104- name : pypi_archives-macos-13
105- path : dist
106-
107- - name : Download macos-latest builds
108- uses : actions/download-artifact@v4
109- with :
110- name : pypi_archives-macos-latest
111- path : dist
136+ name : cyseq-build
137+ path : cyseq-build
112138
113139 - name : Create GH release
114140 uses : softprops/action-gh-release@v2
115141 with :
116142 draft : true
117- files : dist/*
118-
143+ files : cyseq-build/*
119144
120145 create-pypi-release :
121146 name : Create PyPI release
@@ -124,29 +149,10 @@ jobs:
124149 runs-on : ubuntu-24.04
125150
126151 steps :
127- - name : Download ubuntu-latest builds
128- uses : actions/download-artifact@v4
129- with :
130- name : pypi_archives-ubuntu-latest
131- path : dist
132-
133- - name : Download windows-latest builds
134- uses : actions/download-artifact@v4
135- with :
136- name : pypi_archives-windows-latest
137- path : dist
138-
139- - name : Download macos-13 builds
140- uses : actions/download-artifact@v4
141- with :
142- name : pypi_archives-macos-13
143- path : dist
144-
145- - name : Download macos-latest builds
152+ - name : Download builds
146153 uses : actions/download-artifact@v4
147154 with :
148- name : pypi_archives-macos-latest
149- path : dist
155+ path : cyseq-build
150156
151157 - name : Publish to PyPI
152158 if : startsWith(github.ref, 'refs/tags')
0 commit comments