-
Notifications
You must be signed in to change notification settings - Fork 412
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use Maturin to ship the Rust CLI in the Python package (#564)
- Loading branch information
Showing
2 changed files
with
66 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# This file is was initially generated by maturin generate-ci github, then heavily simplified. | ||
|
||
name: Maturin | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'main' | ||
tags: | ||
- 'rust-v*' | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
build: | ||
name: ${{ matrix.conf.name }} | ||
runs-on: ${{ matrix.conf.runner }} | ||
strategy: | ||
matrix: | ||
conf: | ||
- name: linux | ||
runner: ubuntu-latest | ||
command: build | ||
args: --release --out=../dist | ||
- name: windows | ||
runner: windows-latest | ||
command: build | ||
args: --release --out=../dist | ||
- name: macos | ||
runner: macos-latest | ||
command: build | ||
args: --release --out=../dist | ||
# TODO(https://github.com/PyO3/maturin/issues/2154): Re-enable when fixed. | ||
# - name: sdist | ||
# runner: ubuntu-latest | ||
# command: sdist | ||
# args: --out=../dist | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Build wheels | ||
uses: PyO3/maturin-action@v1 | ||
with: | ||
command: ${{ matrix.conf.command }} | ||
container: off # The build fails in containers. | ||
working-directory: python | ||
args: ${{ matrix.conf.args }} | ||
- name: Upload wheels | ||
if: "startsWith(github.ref, 'refs/tags/')" | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: wheels-${{ matrix.conf.name }} | ||
path: dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters