1919 strategy :
2020 fail-fast : false
2121 matrix :
22- os : [ubuntu-latest, windows-latest, macos-latest]
22+ os : [ubuntu-latest, ubuntu-24.04-arm, windows-latest, macos-latest]
2323
2424 steps :
2525 - uses : actions/checkout@v4
3434 - uses : actions/setup-python@v5
3535 name : Install Python
3636 with :
37- python-version : ' 3.7 '
37+ python-version : ' 3.12 '
3838
3939 - name : Install cibuildwheel
4040 run : |
@@ -50,34 +50,58 @@ jobs:
5050 # prepare build dependencies
5151 CIBW_BEFORE_ALL_LINUX : |
5252 git config --global url.https://github.com/.insteadOf git://github.com/
53- yum install -y libuuid-devel
53+ dnf install -y libuuid-devel
5454 # make sure afdko submodule is not "dirty" before starting a new build
5555 CIBW_BEFORE_BUILD : " git submodule foreach git clean -fdx"
56- # The embedded 'tx' C executable is independent of Python ABI so we only need to build it once.
57- # Here we choose the minimum supported version, i.e. Python 3.7
58- CIBW_BUILD : " cp37-* cp38-macosx_universal2"
59- # build using the manylinux2014 image to ensure manylinux2014 wheels are produced
60- CIBW_MANYLINUX_X86_64_IMAGE : manylinux2014
56+ # The embedded 'tx' C executable is independent of Python ABI, but we build
57+ # and test for all supported Python versions (3.10+).
58+ CIBW_BUILD : " cp310-* cp311-* cp312-* cp313-* cp314-*"
59+ # build using the manylinux_2_28 image
60+ CIBW_MANYLINUX_X86_64_IMAGE : manylinux_2_28
61+ CIBW_MANYLINUX_AARCH64_IMAGE : manylinux_2_28
6162 # Only build Universal2 on Mac
6263 CIBW_ARCHS_MACOS : universal2
6364 CIBW_ENVIRONMENT_MACOS : " CFLAGS='-arch arm64 -arch x86_64' CXXFLAGS='-arch arm64 -arch x86_64' LDFLAGS='-arch arm64 -arch x86_64'"
64- # skip PyPy (no manylinux2014) , 32-bit linux, musl linux, and other architectures
65- CIBW_SKIP : " pp* cp*manylinux_i686 cp*manylinux_aarch64 cp* manylinux_ppc64le cp*manylinux_s390x *-musllinux*"
65+ # skip PyPy, 32-bit linux, musl linux, and unsupported architectures
66+ CIBW_SKIP : " pp* cp*manylinux_i686 cp*manylinux_ppc64le cp*manylinux_s390x *-musllinux*"
6667 # Force static link of libxml2
6768 CIBW_ENVIRONMENT : " FORCE_BUILD_LIBXML2=ON"
6869 CIBW_TEST_REQUIRES : " pytest"
6970 # run test suite with pytest, no coverage
7071 # TODO: run with coverage and publish to codecov.io
7172 CIBW_TEST_COMMAND : " pytest {project}/tests"
7273
73- - uses : actions/upload-artifact@v3
74+ - uses : actions/upload-artifact@v4
7475 with :
75- name : cffsubr-dist
76+ name : cffsubr-dist-${{ matrix.os }}
7677 path : ./dist
7778
79+ publish :
80+ name : Publish to PyPI
81+ needs : build_wheels
82+ runs-on : ubuntu-latest
83+ if : github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
84+
85+ steps :
86+ - uses : actions/checkout@v4
87+ with :
88+ fetch-depth : 0 # unshallow fetch for setuptools-scm
89+ submodules : recursive
90+
91+ - uses : actions/setup-python@v5
92+ name : Install Python
93+ with :
94+ python-version : ' 3.12'
95+
7896 - name : Build sdist
7997 run : pipx run build --sdist
80- if : matrix.os == 'ubuntu-latest' && github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
98+
99+ - name : Download all artifacts
100+ uses : actions/download-artifact@v4
101+ with :
102+ pattern : cffsubr-dist-*
103+ merge-multiple : true
104+ path : ./dist
81105
82106 - name : Publish package to PyPI
83107 run : |
86110 env :
87111 TWINE_USERNAME : __token__
88112 TWINE_PASSWORD : ${{ secrets.pypi_password }}
89- if : github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
0 commit comments