@@ -15,33 +15,45 @@ jobs:
1515
1616 steps :
1717 - uses : actions/checkout@v4
18- - uses : actions/setup-python@v3
1918
20- - name : Install cibuildwheel
21- run : python -m pip install cibuildwheel
19+ - name : Set up Python
20+ uses : actions/setup-python@v3
2221
23- - name : Build wheels
24- uses : pypa/cibuildwheel@d04cacbc9866d432033b1d09142936e6a0e2121a # v2.23.2
25- env :
26- CIBW_BUILD : " cp310-* cp311-* cp312-* cp313-*"
27- CIBW_ARCHS : auto64
28- CIBW_SKIP : " *-win32 *-manylinux_i686"
29- with :
30- output-dir : wheelhouse
22+ - name : Install dependencies
23+ run : python -m pip install --upgrade pip twine flake8
24+
25+ - name : Build wheels (Linux)
26+ if : matrix.os == 'ubuntu-latest'
27+ run : |
28+ for PYVER in cp310-cp310 cp311-cp311 cp312-cp312 cp313-cp313; do
29+ docker run --rm -v ${{ github.workspace }}:/io quay.io/pypa/manylinux2014_x86_64 \
30+ /opt/python/${PYVER}/bin/pip install cython numpy build
31+ docker run --rm -v ${{ github.workspace }}:/io quay.io/pypa/manylinux2014_x86_64 \
32+ /opt/python/${PYVER}/bin/python -m build --wheel --outdir /io/wheelhouse/
33+ done
34+
35+ - name : Build wheels (Windows)
36+ if : matrix.os == 'windows-2022'
37+ run : |
38+ pip install cython numpy build
39+ python -m build --wheel --outdir wheelhouse/
3140
32- - name : Get wheel filename
33- id : wheel-name
41+ - name : Get wheel filenames
42+ id : wheel-names
3443 run : |
35- WHEEL_NAME=$(ls ./wheelhouse/pycmsgen-*.whl | xargs -n 1 basename)
36- echo "wheel_name=${WHEEL_NAME}" >> $GITHUB_OUTPUT
44+ ls ./wheelhouse/pycmsgen-*.whl | xargs -n 1 basename > wheel_names.txt
45+ echo "wheel_names<<EOF" >> $GITHUB_OUTPUT
46+ cat wheel_names.txt >> $GITHUB_OUTPUT
47+ echo "EOF" >> $GITHUB_OUTPUT
3748
3849 - uses : actions/upload-artifact@v4
3950 with :
4051 path : ./wheelhouse/pycmsgen-*.whl
41- name : cmsgen-${{ matrix.os }}_${{ steps.wheel-name.outputs.wheel-name }}
52+ name : cmsgen-${{ matrix.os }}
4253
4354 - name : Install twine
4455 run : python -m pip install twine
56+
4557 - name : Publish wheels to PyPI
4658 env :
4759 TWINE_USERNAME : " __token__"
0 commit comments