Skip to content

Commit

Permalink
win64 (#343)
Browse files Browse the repository at this point in the history
  • Loading branch information
Narsil authored Aug 24, 2023
1 parent 215c5e4 commit abc3027
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/python-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,50 @@ jobs:
working-directory: ./bindings/python
run: sh build-wheels.sh

create_wheels_windows:
name: Windows
runs-on: windows-latest
needs: [lock_exists]
strategy:
matrix:
python: ["3.7", "3.8", "3.9", "3.10", "3.11"]
bits: ["32", "64"]
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.bits == '32' && 'stable-i686-pc-windows-msvc' || 'stable-x86_64-pc-windows-msvc' }}
override: true

- name: Override toolchain
shell: bash
working-directory: ./bindings/python
run: echo ${{ matrix.bits == '32' && 'stable-i686-pc-windows-msvc' || 'stable-x86_64-pc-windows-msvc' }} > rust-toolchain

- name: Install Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
architecture: ${{ matrix.bits == '32' && 'x86' || '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 --ignore-installed --force-reinstall
- name: Build wheel
working-directory: ./bindings/python
run: python setup.py bdist_wheel

- name: Upload wheels
shell: bash
run: |
pip install awscli
aws s3 sync --exact-timestamps ./bindings/python/dist "s3://safetensors-releases/python/$DIST_DIR"
create_wheels_windows:
name: Windows
runs-on: windows-latest
Expand Down

0 comments on commit abc3027

Please sign in to comment.