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

Fixing macos 13 release script (by prebuilding). #315

Merged
merged 2 commits into from
Aug 9, 2023
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
47 changes: 45 additions & 2 deletions .github/workflows/python-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:


create_wheels_others_64bit:
name: Create wheels for other OSes
name: Other OSes
env:
MACOSX_DEPLOYMENT_TARGET: 10.11
runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -115,6 +115,49 @@ jobs:
pip install awscli
aws s3 sync --exact-timestamps ./bindings/python/dist "s3:https://safetensors-releases/python/$DIST_DIR"

create_wheels_macos_13:
name: MacOS 13
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-13]
python: ["3.7", "3.8", "3.9", "3.10", "3.11"]
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true

- name: Install Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
architecture: x64

- name: Install dependencies
run: |
# On old versions of python there is an old version of setuptools already installed
pip install setuptools wheel setuptools-rust==0.11.3 --ignore-installed --force-reinstall

- name: Build wheel
working-directory: ./bindings/python
run: python setup.py bdist_wheel

- name: Rename wheels
shell: bash
working-directory: ./bindings/python/dist
run: for file in *.whl ; do mv $file ${file//macosx_10_1[0-9]/macosx_10_11} || true; done

- name: Upload wheels
shell: bash
run: |
pip install awscli
aws s3 sync --exact-timestamps ./bindings/python/dist "s3:https://safetensors-releases/python/$DIST_DIR"

create_wheels_macos_arm64:
name: Create wheels for MacOS M1
runs-on: macos-arm64
Expand Down Expand Up @@ -150,7 +193,7 @@ jobs:
Upload_package:
name: Upload package to PyPi
runs-on: ubuntu-latest
needs: [create_wheels_manylinux, create_wheels_windows_32bit, create_wheels_others_64bit, create_wheels_macos_arm64]
needs: [create_wheels_manylinux, create_wheels_windows_32bit, create_wheels_others_64bit, create_wheels_macos_arm64, create_wheels_macos_13]

steps:
- uses: actions/checkout@v3
Expand Down
Loading