@@ -19,138 +19,139 @@ 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 : Set up Python
31- uses : actions/setup-python@v5
32-
33- - name : Install build, twine, pkginfo, and packaging
34- run : python -m pip install --user --upgrade build twine pkginfo packaging
35-
36- - name : Build sdist
37- run : python -m build --sdist --outdir dist/
38-
39- - name : Validate sdist for Pypi
40- run : python -m twine check dist/*
41-
42- - name : Upload sdist
43- 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
44111 with :
45- name : pypi_archives-sdist
46- path : dist/*
47-
48- build-pypi-distribs-wheels :
49- name : Build and upload wheels on ${{ matrix.os }}
50- runs-on : ${{ matrix.os }}
51-
52- strategy :
53- matrix :
54- os : [ubuntu-latest, windows-latest, macos-13, macos-latest]
112+ name : cyseq-build
113+ pattern : cyseq-*
55114
115+ check-dist :
116+ name : Check distributions are PyPi-correct
117+ needs : merge
118+ runs-on : ubuntu-22.04
56119 steps :
57- - name : Checkout code
58- uses : actions/checkout@v4
59-
60- - name : Set up Python
61- uses : actions/setup-python@v5
62-
63- - name : Install cibuildwheel, twine, pkginfo, and packaging
64- run : python -m pip install --user --upgrade cibuildwheel twine pkginfo packaging
65-
66- - name : Build wheels
67- run : python -m cibuildwheel --output-dir dist/
68-
69- - name : Validate wheels for Pypi
70- run : python -m twine check dist/*
71-
72- - name : Upload wheels
73- uses : actions/upload-artifact@v4
120+ - uses : actions/download-artifact@v4
74121 with :
75- name : pypi_archives-${{ matrix.os }}
76- path : dist/*
77-
122+ path : cyseq-build
123+ - run : find . -ls
124+ - run : pipx run twine check --strict cyseq-build/*/*
78125
79126 create-gh-release :
80127 name : Create GH release
81128 needs :
82- - build-pypi-distribs-sdist
83- - build-pypi-distribs-wheels
129+ - check-dist
84130 runs-on : ubuntu-24.04
85131
86132 steps :
87- - name : Download sdist
88- uses : actions/download-artifact@v4
89- with :
90- name : pypi_archives-sdist
91- path : dist
92-
93- - name : Download ubuntu-latest builds
94- uses : actions/download-artifact@v4
95- with :
96- name : pypi_archives-ubuntu-latest
97- path : dist
98-
99- - name : Download windows-latest builds
100- uses : actions/download-artifact@v4
101- with :
102- name : pypi_archives-windows-latest
103- path : dist
104-
105- - name : Download macos-13 builds
133+ - name : Download builds
106134 uses : actions/download-artifact@v4
107135 with :
108- name : pypi_archives-macos-13
109- path : dist
110-
111- - name : Download macos-latest builds
112- uses : actions/download-artifact@v4
113- with :
114- name : pypi_archives-macos-latest
115- path : dist
136+ path : cyseq-build
116137
117138 - name : Create GH release
118139 uses : softprops/action-gh-release@v2
119140 with :
120141 draft : true
121142 files : dist/*
122143
123-
124144 create-pypi-release :
125145 name : Create PyPI release
126146 needs :
127147 - create-gh-release
128148 runs-on : ubuntu-24.04
129149
130150 steps :
131- - name : Download ubuntu-latest builds
132- uses : actions/download-artifact@v4
133- with :
134- name : pypi_archives-ubuntu-latest
135- path : dist
136-
137- - name : Download windows-latest builds
138- uses : actions/download-artifact@v4
139- with :
140- name : pypi_archives-windows-latest
141- path : dist
142-
143- - name : Download macos-13 builds
144- uses : actions/download-artifact@v4
145- with :
146- name : pypi_archives-macos-13
147- path : dist
148-
149- - name : Download macos-latest builds
151+ - name : Download builds
150152 uses : actions/download-artifact@v4
151153 with :
152- name : pypi_archives-macos-latest
153- path : dist
154+ path : cyseq-build
154155
155156 - name : Publish to PyPI
156157 if : startsWith(github.ref, 'refs/tags')
0 commit comments