Build Wheels #25
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Note: This script does not used build-wheels.sh nor the Makefile included in this repo (that's for local usage) | |
name: Build Wheels | |
on: [workflow_dispatch] | |
jobs: | |
build_wheels: | |
name: Build wheels on for ${{matrix.python.cp}}-${{ matrix.buildplat.sys }} | |
runs-on: ${{ matrix.buildplat.runs_on }} | |
strategy: | |
matrix: | |
buildplat: | |
- { runs_on: ubuntu-20.04, sys: manylinux, arch: x86_64, benv: "" } | |
- { runs_on: ubuntu-20.04, sys: musllinux, arch: x86_64, benv: "" } | |
- { runs_on: macos-14, sys: macosx, arch: arm64, benv: "14.0" } | |
python: | |
- { cp: "cp38", rel: "3.8" } | |
- { cp: "cp39", rel: "3.9" } | |
- { cp: "cp310", rel: "3.10" } | |
- { cp: "cp311", rel: "3.11" } | |
- { cp: "cp312", rel: "3.12" } | |
- { cp: "cp313", rel: "3.13" } | |
steps: | |
- uses: actions/[email protected] | |
# Used to host cibuildwheel | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: 3.11 | |
- name: Install cibuildwheel | |
run: python -m pip install cibuildwheel | |
- name: Build wheels (Linux glibc) | |
if: ${{ matrix.buildplat.sys == 'manylinux' }} | |
run: python -m cibuildwheel --output-dir wheelhouse | |
env: | |
CIBW_BUILD: ${{ matrix.python.cp }}-${{ matrix.buildplat.sys }}* | |
CIBW_ARCHS_LINUX: "x86_64" | |
CIBW_BEFORE_ALL_LINUX: > | |
if command -v apt-get; then | |
apt-get -y git libicu-dev libxml2-dev libexttextcat-dev libxslt1-dev libbz2-dev zlib1g-dev autoconf automake autoconf-archive libtool autotools-dev gcc g++ make | |
elif command -v yum; then | |
yum install -y git libicu-devel libxml2-devel libxslt-devel libexttextcat zlib-devel bzip2-devel libtool autoconf-archive autoconf automake m4 wget | |
#on CentOS 7 we also have libtar-devel libexttextcat-devel which will be installed by build-deps.sh, on 8 they are missing and will be installed from source or otherwise | |
elif command -v apk; then | |
apk add build-base git autoconf-archive autoconf automake libtool bzip2-dev icu-dev libxml2-dev libexttextcat-dev libtool rsync && | |
rsync -av --ignore-existing /usr/share/aclocal/*.m4 /usr/local/share/aclocal/ | |
fi && | |
./build-deps.sh | |
CIBW_MANYLINUX_X86_64_IMAGE: quay.io/pypa/manylinux_2_28_x86_64 | |
CIBW_SKIP: "*-win* *-manylinux_i686 pp*" | |
- name: Build wheels (Linux musl) | |
if: ${{ matrix.buildplat.sys == 'musllinux' }} | |
run: python -m cibuildwheel --output-dir wheelhouse | |
env: | |
CIBW_BUILD: ${{ matrix.python.cp }}-${{ matrix.buildplat.sys }}* | |
CIBW_ARCHS_LINUX: "x86_64" | |
CIBW_BEFORE_ALL_LINUX: > | |
apk add build-base git autoconf-archive autoconf automake libtool bzip2-dev icu-dev libxml2-dev libexttextcat-dev libtool rsync && | |
mkdir -p /usr/local/share/aclocal/ && rsync -av --ignore-existing /usr/share/aclocal/*.m4 /usr/local/share/aclocal/ && | |
./build-deps.sh | |
CIBW_MUSLLINUX_X86_64_IMAGE: quay.io/pypa/musllinux_1_1_x86_64 | |
CIBW_MUSLLINUX_AARCH64_IMAGE: quay.io/pypa/musllinux_1_1_aarch64 | |
CIBW_SKIP: "*-win* *-manylinux_i686 pp*" | |
- name: Build wheels (macOS) | |
if: ${{ runner.os == 'macOS' && matrix.python.cp != 'cp38' }} | |
run: python -m cibuildwheel --output-dir wheelhouse | |
env: | |
CIBW_BUILD: ${{ matrix.python.cp }}-${{ matrix.buildplat.sys }}* | |
CIBW_ARCHS: ${{ matrix.buildplat.arch }} | |
CIBW_ENVIRONMENT: "MACOSX_DEPLOYMENT_TARGET=${{ matrix.buildplat.benv }}" | |
CIBW_BEFORE_ALL_MACOS: > | |
brew tap fbkarsdorp/homebrew-lamachine && | |
brew install frog | |
- uses: actions/upload-artifact@v4 | |
if: ${{ ! (runner.os == 'macOS' && matrix.python.cp == '3.8') }} | |
with: | |
name: ${{matrix.python.cp}}-${{matrix.buildplat.sys}}-${{matrix.buildplat.arch}} | |
path: ./wheelhouse/*.whl |