Skip to content

Bump version of cache action #38

Bump version of cache action

Bump version of cache action #38

Workflow file for this run

name: Build manylinux wheels
on: [push]
jobs:
build_sdist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: |
3.8
3.9
3.10
3.11
3.12
3.13
- name: Cache mecab
id: cache-mecab
uses: actions/cache@v4
with:
path: mecab
key: mecab-build
- name: install MeCab
if: steps.cache-mecab.outputs.cache-hit != 'true'
run: |
git clone --depth=1 https://github.com/taku910/mecab.git
cd mecab/mecab
./configure --enable-utf8-only
make
sudo make install
cd ../..
- name: build sdist
run: |
python -m pip install --upgrade pip
pip install twine setuptools-scm
python setup.py sdist
- name: upload to pypi if tagged
if: startsWith(github.ref, 'refs/tags') && github.repository_owner == 'polm'
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: |
twine upload dist/mecab*.tar.gz
build_manylinux:
runs-on: ubuntu-latest
strategy:
matrix:
arch: [x86_64, aarch64]
env:
arch: ${{ matrix.arch }}
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: |
3.8
3.9
3.10
3.11
3.12
3.13
- name: Cache mecab
id: cache-mecab
uses: actions/cache@v4
with:
path: ${{ github.workspace }}/mecab_${{ matrix.arch }}
key: mecab-build-${{ matrix.arch }}
# The verbosity and indirection here seems to be a required side effect of
# using Docker.
- name: Build x86_64 MeCab
if: matrix.arch == 'x86_64' && steps.cache-mecab.outputs.cache-hit != 'true'
uses: ./.github/workflows/actions/build-manylinux/
- name: Build x86_64 wheels
if: matrix.arch == 'x86_64'
uses: ./.github/workflows/actions/build-wheels/
- name: Set up QEMU
if: matrix.arch == 'aarch64'
uses: docker/setup-qemu-action@v1
- name: Build aarch64 MeCab
if: matrix.arch == 'aarch64' && steps.cache-mecab.outputs.cache-hit != 'true'
uses: ./.github/workflows/actions_aarch64/build_manylinux2014/
- name: Build aarch64 wheels
if: matrix.arch == 'aarch64'
uses: ./.github/workflows/actions_aarch64/build_wheels/
- name: Upload Wheels
uses: actions/upload-artifact@v4
with:
name: manylinux-wheels-${{ matrix.arch }}
path: manylinux-wheels
- name: Publish to PyPI if tagged
if: startsWith(github.ref, 'refs/tags') && github.repository_owner == 'polm'
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: |
python --version
pip --version
python -m pip install --upgrade pip
pip install twine setuptools-scm
twine upload manylinux-wheels/mecab*whl