Skip to content

Commit f7d737a

Browse files
committed
ci: added wheel building using Github Actions
1 parent 9070080 commit f7d737a

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

.github/workflows/wheels.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
#Note: This script does not used build-wheels.sh nor the Makefile included in this repo (that's for local usage)
2+
3+
name: Build Wheels
4+
5+
on: [workflow_dispatch]
6+
7+
jobs:
8+
build_wheels:
9+
name: Build wheels on ${{ matrix.os }}
10+
runs-on: ${{ matrix.os }}
11+
strategy:
12+
matrix:
13+
os: [ubuntu-20.04, macOS-11]
14+
15+
steps:
16+
- uses: actions/checkout@v3
17+
18+
# Used to host cibuildwheel
19+
- uses: actions/setup-python@v3
20+
21+
- name: Install cibuildwheel
22+
run: python -m pip install cibuildwheel
23+
24+
- name: Build wheels
25+
run: python -m cibuildwheel --output-dir wheelhouse
26+
env:
27+
CIBW_ARCHS_LINUX: "x86_64"
28+
CIBW_ARCHS_MACOS: "x86_64 arm64"
29+
CIBW_BEFORE_ALL_LINUX: >
30+
if command -v apt-get; then
31+
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
32+
elif command -v yum; then
33+
yum install -y git libicu-devel libxml2-devel libxslt-devel libexttextcat zlib-devel bzip2-devel libtool autoconf-archive autoconf automake m4 wget
34+
elif command -v apk; then
35+
apk add build-base git autoconf-archive autoconf automake libtool bzip2-dev icu-dev libxml2-dev libexttextcat-dev libtool rsync &&
36+
rsync -av --ignore-existing /usr/share/aclocal/*.m4 /usr/local/share/aclocal/
37+
fi &&
38+
./build-deps.sh
39+
CIBW_BEFORE_ALL_MACOS: >
40+
brew tap fbkarsdorp/homebrew-lamachine &&
41+
brew install frog
42+
CIBW_MANYLINUX_X86_64_IMAGE: quay.io/pypa/manylinux_2_28_x86_64
43+
CIBW_SKIP: "*-win* *-manylinux_i686 pp*"
44+
45+
- uses: actions/upload-artifact@v3
46+
with:
47+
path: ./wheelhouse/*.whl

0 commit comments

Comments
 (0)