Skip to content

Commit

Permalink
Add Windows and macOS support
Browse files Browse the repository at this point in the history
  • Loading branch information
quackzar committed Apr 18, 2024
1 parent 710cdad commit c7763d7
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 2 deletions.
58 changes: 57 additions & 1 deletion .github/workflows/pyo3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
args: --release --out dist --find-interpreter --zig
args: --release --out dist --zig
sccache: 'true'
container: 'off'
working-directory: pycare
Expand All @@ -44,3 +44,59 @@ jobs:
with:
name: wheels
path: pycare/dist

windows:
runs-on: self-hosted
steps:
- uses: actions/checkout@v3
- uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Install C compiler
run: sudo apt-get update && sudo apt-get install -y build-essential
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install Zigbuild
run: pip install cargo-zigbuild
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: x86_64-pc-windows-msvc
args: --release --out dist --zig
sccache: 'true'
container: 'off'
working-directory: pycare
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
name: wheels
path: pycare/dist

macos:
runs-on: self-hosted
strategy:
matrix:
target: [x86_64-apple-darwin, aarch64-apple-darwin]
steps:
- uses: actions/checkout@v3
- uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Install C compiler
run: sudo apt-get update && sudo apt-get install -y build-essential
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install Zigbuild
run: pip install cargo-zigbuild
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
args: --release --out dist --zig
sccache: 'true'
container: 'off'
working-directory: pycare
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
name: wheels
path: pycare/dist

10 changes: 10 additions & 0 deletions pycare/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pycare/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ name = "caring"
crate-type = ["cdylib"]

[dependencies]
pyo3 = { version = "0.21", features = ["abi3-py37"]}
pyo3 = { version = "0.21", features = ["abi3-py37", "generate-import-lib"]}
wecare = { path = "../wecare" }

0 comments on commit c7763d7

Please sign in to comment.