Skip to content

Commit

Permalink
Support Windows for Python binding
Browse files Browse the repository at this point in the history
  • Loading branch information
neet committed Mar 30, 2024
1 parent 9f16d04 commit 4da5fb9
Showing 1 changed file with 34 additions and 10 deletions.
44 changes: 34 additions & 10 deletions .github/workflows/python_release.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This file is autogenerated by maturin v1.5.0
# To update, run
#
# maturin generate-ci github -m ./ainu-utils-python/Cargo.toml -o ./.github/workflows/python.yaml --platform linux macos --pytest
# maturin generate-ci github -m ./ainu-utils-python/Cargo.toml -o ./.github/workflows/python_release.yaml --platform linux macos windows --pytest
#
name: CI

Expand All @@ -19,14 +19,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
target: [
x86_64,
aarch64,
# x86,
# armv7,
# s390x,
# ppc64le
]
target: [x86_64, x86, aarch64, armv7, s390x, ppc64le]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
Expand Down Expand Up @@ -68,6 +61,37 @@ jobs:
pip3 install ainu-utils --find-links dist --force-reinstall
cd ./ainu-utils-python && pytest
windows:
runs-on: windows-latest
strategy:
matrix:
target: [x64, x86]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.10'
architecture: ${{ matrix.target }}
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
args: --release --out dist --find-interpreter --manifest-path ./ainu-utils-python/Cargo.toml
sccache: 'true'
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-windows-${{ matrix.target }}
path: dist
- name: pytest
if: ${{ !startsWith(matrix.target, 'aarch64') }}
shell: bash
run: |
set -e
pip install ainu-utils --find-links dist --force-reinstall
pip install pytest
cd ./ainu-utils-python && pytest
macos:
runs-on: macos-latest
strategy:
Expand Down Expand Up @@ -117,7 +141,7 @@ jobs:
name: Release
runs-on: ubuntu-latest
if: "startsWith(github.ref, 'refs/tags/')"
needs: [linux, macos, sdist]
needs: [linux, windows, macos, sdist]
steps:
- uses: actions/download-artifact@v4
- name: Publish to PyPI
Expand Down

0 comments on commit 4da5fb9

Please sign in to comment.