Skip to content

Commit

Permalink
fix: Use PyO3/maturin-action (#496)
Browse files Browse the repository at this point in the history
* Use PyO3/maturin-action

* Psuh to dist/
  • Loading branch information
mnaser authored Feb 21, 2025
1 parent aab701c commit 5d3b5c0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 32 deletions.
17 changes: 4 additions & 13 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,12 @@ jobs:
if: ${{ steps.release.outputs.release_created }}
uses: actions/checkout@v4

- name: Setup Python
if: ${{ steps.release.outputs.release_created }}
uses: actions/setup-python@v5

- name: Setup Rust
if: ${{ steps.release.outputs.release_created }}
uses: actions-rust-lang/setup-rust-toolchain@v1

- name: Install "uv"
if: ${{ steps.release.outputs.release_created }}
uses: astral-sh/setup-uv@v5

- name: Build package
if: ${{ steps.release.outputs.release_created }}
run: uv build
uses: PyO3/maturin-action@v1
with:
command: build
args: --release --out dist

- name: Publish package distributions to PyPI
if: ${{ steps.release.outputs.release_created }}
Expand Down
29 changes: 10 additions & 19 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,11 @@ jobs:
- name: Checkout project
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v5

- name: Setup Rust
uses: actions-rust-lang/setup-rust-toolchain@v1

- name: Install "uv"
uses: astral-sh/setup-uv@v5

- name: Build package
run: uv build
uses: PyO3/maturin-action@v1
with:
command: build
args: --release

install:
runs-on: ${{ matrix.runs-on }}
Expand All @@ -60,19 +54,16 @@ jobs:
- name: Checkout project
uses: actions/checkout@v4

- name: Build package
uses: PyO3/maturin-action@v1
with:
command: build
args: --release --out dist

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Setup Rust
uses: actions-rust-lang/setup-rust-toolchain@v1

- name: Install "uv"
uses: astral-sh/setup-uv@v5

- name: Build package
run: uv build

- name: Install package using constraints
run: pip install --constraint https://releases.openstack.org/constraints/upper/${{ matrix.openstack-version }} ./dist/*.whl

0 comments on commit 5d3b5c0

Please sign in to comment.