Adding m1 build to the release process for Python. (#1055)

* Adding m1 build to the release process for Python.

* typo.
This commit is contained in:
Nicolas Patry
2022-08-25 11:06:03 +02:00
committed by GitHub
parent 6878ab028d
commit c174b5bd34

View File

@ -117,10 +117,42 @@ jobs:
pip install awscli pip install awscli
aws s3 sync --exact-timestamps ./bindings/python/dist "s3://tokenizers-releases/python/$DIST_DIR" aws s3 sync --exact-timestamps ./bindings/python/dist "s3://tokenizers-releases/python/$DIST_DIR"
create_wheels_macos_arm64:
name: Create wheels for MacOS M1
runs-on: macos-arm64
strategy:
matrix:
python: ["3.9.13", "3.10.6"]
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Install Python
shell: bash
run: |
echo $HOME
export PYENV_ROOT="$HOME/.pyenv"
command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"
pyenv shell ${{ matrix.python }}
which pyenv
which python
pip install -U setuptools wheel setuptools-rust awscli
cd ./bindings/python
python setup.py bdist_wheel
cd ../../
aws s3 sync --exact-timestamps ./bindings/python/dist "s3://tokenizers-releases/python/$DIST_DIR"
upload_package: upload_package:
name: Upload package to PyPi name: Upload package to PyPi
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: [create_wheels_manylinux, create_wheels_windows_32bit, create_wheels_others_64bit] needs: [create_wheels_manylinux, create_wheels_windows_32bit, create_wheels_others_64bit, create_wheels_macos_arm64]
steps: steps:
- uses: actions/checkout@v1 - uses: actions/checkout@v1