Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name: build wheels with manylinux docker image for aarch64

runs:
using: 'docker'
image: docker://quay.io/pypa/manylinux2014_aarch64
args:
- .github/workflows/entrypoint.sh
13 changes: 11 additions & 2 deletions .github/workflows/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,20 @@
#!/bin/bash
# Install mecab, then build wheels
set -e
manylinux_version=1
plat=x86_64

# install MeCab
# TODO specify the commit used here
git clone --depth=1 git://github.com/taku910/mecab.git
cd mecab/mecab
if [ `uname -m` == 'aarch64' ]; then
manylinux_version=2014
plat=aarch64
yum -y update && yum install -y wget
wget 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD' -O config.guess
wget 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD' -O config.sub
fi
./configure --enable-utf8-only
make
make install
Expand All @@ -23,8 +32,8 @@ done

# fix the wheels (bundles libs)
for wheel in /github/workspace/wheels/*.whl; do
auditwheel repair "$wheel" --plat manylinux1_x86_64 -w /github/workspace/manylinux1-wheels
auditwheel repair "$wheel" --plat manylinux${manylinux_version}_${plat} -w /github/workspace/manylinux-wheels
done

echo "Built wheels:"
ls /github/workspace/manylinux1-wheels
ls /github/workspace/manylinux-wheels
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build manylinux1 wheels
name: Build manylinux wheels

on:
push:
Expand All @@ -9,19 +9,31 @@ on:
jobs:
deploy:
runs-on: ubuntu-latest
strategy:
matrix:
arch: [x86_64, aarch64]
env:
arch: ${{ matrix.arch }}
steps:
- uses: actions/checkout@v1
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Build MeCab
- name: Set up QEMU
if: ${{ matrix.arch == 'aarch64' }}
uses: docker/setup-qemu-action@v1
- name: Build x86_64 MeCab
if: ${{ matrix.arch == 'x86_64' }}
uses: ./.github/workflows/actions/build-manylinux/
- name: Build aarch64 MeCab
if: ${{ matrix.arch == 'aarch64' }}
uses: ./.github/workflows/actions_aarch64/build_manylinux2014/
- name: Upload Wheels
uses: actions/upload-artifact@v1
with:
name: manylinux1-wheels
path: manylinux1-wheels
name: manylinux-wheels
path: manylinux-wheels
- name: Publish to PyPI if tagged
if: startsWith(github.ref, 'refs/tags')
env:
Expand All @@ -32,7 +44,9 @@ jobs:
pip --version
python -m pip install --upgrade pip
pip install twine setuptools-scm
twine upload manylinux1-wheels/mecab*whl
python setup.py sdist
twine upload dist/mecab*.tar.gz
twine upload manylinux-wheels/mecab*whl
if [ $arch == 'x86_64' ]; then
python setup.py sdist
twine upload dist/mecab*.tar.gz
fi