Skip to content

Commit

Permalink
also build for Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
ruihe774 committed Jul 20, 2024
1 parent e7648cb commit a73422c
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 1 deletion.
11 changes: 10 additions & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,21 @@ jobs:
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
rustflags: "-C target-cpu=x86-64-v3"
target: x86_64-unknown-linux-gnu,x86_64-pc-windows-msvc
components: llvm-tools
- name: Cache XWin
uses: actions/cache@v4
with:
path: ~/.cache/cargo-xwin/xwin
key: xwin
- name: Install dependencies
run: python -mpip install maturin[zig]
- name: Build sdist
run: maturin sdist --out dist
- name: Build wheels
- name: Build wheels for Linux
run: maturin build --release --out dist --compatibility manylinux2014 --zig
- name: Build wheels for Windows
run: maturin build --release --out dist --target x86_64-pc-windows-msvc
- name: Upload dist
uses: actions/upload-artifact@v4
with:
Expand Down
10 changes: 10 additions & 0 deletions Cargo.lock

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

3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ polars-arrow = { version = "0.41.0", features = ["arrow_rs"] }
pyo3 = { version = "0.21.0", features = ["extension-module", "abi3-py38"] }
pyo3-polars = "0.15.0"

[target.'cfg(target_os="windows")'.dependencies]
pyo3 = { version = "0.21.0", features = ["extension-module", "abi3-py38", "generate-import-lib"] }

[profile.release]
opt-level = "s"
strip = "symbols"
Expand Down

0 comments on commit a73422c

Please sign in to comment.