Skip to content

Commit

Permalink
Fixing macos 13 release script (by prebuilding). (#315)
Browse files Browse the repository at this point in the history
* Fixing macos 13 release script (by prebuilding).

* Yaml indent...
  • Loading branch information
Narsil authored Aug 9, 2023
1 parent 0d14aff commit 65ed8c6
Showing 1 changed file with 45 additions and 2 deletions.
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 @@ -151,7 +194,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

0 comments on commit 65ed8c6

Please sign in to comment.