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