Skip to content

Commit 33991c0

Browse files
committed
ci: updaded wheel building
1 parent 9768017 commit 33991c0

File tree

1 file changed

+32
-10
lines changed

1 file changed

+32
-10
lines changed

.github/workflows/wheels.yml

Lines changed: 32 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,42 +6,64 @@ on: [workflow_dispatch]
66

77
jobs:
88
build_wheels:
9-
name: Build wheels on ${{ matrix.os }}
10-
runs-on: ${{ matrix.os }}
9+
name: Build wheels on for ${{matrix.python.cp}}-${{ matrix.buildplat.sys }}
10+
runs-on: ${{ matrix.buildplat.runs_on }}
1111
strategy:
1212
matrix:
13-
os: [ubuntu-20.04, macOS-11]
13+
buildplat:
14+
- { runs_on: ubuntu-20.04, sys: manylinux, arch: x86_64, benv: "" }
15+
- { runs_on: macos-12, sys: macosx, arch: x86_64, benv: "12.0" }
16+
- { runs_on: macos-14, sys: macosx, arch: arm64, benv: "14.0" }
17+
python:
18+
- { cp: "cp38", rel: "3.8" }
19+
- { cp: "cp39", rel: "3.9" }
20+
- { cp: "cp310", rel: "3.10" }
21+
- { cp: "cp311", rel: "3.11" }
22+
- { cp: "cp312", rel: "3.12" }
1423

1524
steps:
16-
- uses: actions/checkout@v3
25+
- uses: actions/checkout@v4.1.1
1726

1827
# Used to host cibuildwheel
19-
- uses: actions/setup-python@v3
28+
- uses: actions/setup-python@v5
29+
with:
30+
python-version: 3.11
2031

2132
- name: Install cibuildwheel
2233
run: python -m pip install cibuildwheel
2334

24-
- name: Build wheels
35+
- name: Build wheels (Linux)
36+
if: ${{ runner.os != 'macOS' }}
2537
run: python -m cibuildwheel --output-dir wheelhouse
2638
env:
39+
CIBW_BUILD: ${{ matrix.python.cp }}-${{ matrix.buildplat.sys }}*
2740
CIBW_ARCHS_LINUX: "x86_64"
28-
CIBW_ARCHS_MACOS: "x86_64"
2941
CIBW_BEFORE_ALL_LINUX: >
3042
if command -v apt-get; then
3143
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
3244
elif command -v yum; then
3345
yum install -y git libicu-devel libxml2-devel libxslt-devel libexttextcat zlib-devel bzip2-devel libtool autoconf-archive autoconf automake m4 wget
46+
#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
3447
elif command -v apk; then
3548
apk add build-base git autoconf-archive autoconf automake libtool bzip2-dev icu-dev libxml2-dev libexttextcat-dev libtool rsync &&
3649
rsync -av --ignore-existing /usr/share/aclocal/*.m4 /usr/local/share/aclocal/
3750
fi &&
3851
./build-deps.sh
52+
CIBW_MANYLINUX_X86_64_IMAGE: quay.io/pypa/manylinux2014_x86_64
53+
CIBW_SKIP: "*-win* *-manylinux_i686 pp*"
54+
55+
- name: Build wheels (macOS)
56+
if: ${{ runner.os == 'macOS' }}
57+
run: python -m cibuildwheel --output-dir wheelhouse
58+
env:
59+
CIBW_BUILD: ${{ matrix.python.cp }}-${{ matrix.buildplat.sys }}*
60+
CIBW_ARCHS: ${{ matrix.buildplat.arch }}
61+
CIBW_ENVIRONMENT: "MACOSX_DEPLOYMENT_TARGET=${{ matrix.buildplat.benv }}"
3962
CIBW_BEFORE_ALL_MACOS: >
4063
brew tap fbkarsdorp/homebrew-lamachine &&
4164
brew install frog
42-
CIBW_MANYLINUX_X86_64_IMAGE: quay.io/pypa/manylinux2014_x86_64
43-
CIBW_SKIP: "*-win* *-manylinux_i686 pp*"
4465
45-
- uses: actions/upload-artifact@v3
66+
- uses: actions/upload-artifact@v4
4667
with:
68+
name: ${{matrix.python.cp}}-${{matrix.buildplat.sys}}-${{matrix.buildplat.arch}}
4769
path: ./wheelhouse/*.whl

0 commit comments

Comments
 (0)