|
| 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