Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 2 commits into from
Aug 25, 2022
Merged
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
34 changes: 33 additions & 1 deletion .github/workflows/python-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,42 @@ jobs:
pip install awscli
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:
name: Upload package to PyPi
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:
- uses: actions/checkout@v1
Expand Down