Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: migrate to pyo3 #3520

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .codecov.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
ignore:
- "relay-cabi/**/*.rs"
- "relay-general/derive/**/*.rs"
64 changes: 29 additions & 35 deletions .github/workflows/build_library.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,27 +14,30 @@ jobs:
strategy:
fail-fast: false
matrix:
build-arch:
target:
- x86_64
- aarch64

name: Python Linux ${{ matrix.build-arch }}
name: Python Linux ${{ matrix.target }}
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- if: matrix.build-arch == 'aarch64'
uses: docker/setup-qemu-action@v3
with:
platforms: arm64
- run: rustup toolchain install stable --profile minimal --no-self-update

- uses: actions/setup-python@v5

- name: Build in Docker
run: scripts/docker-manylinux.sh
env:
TARGET: ${{ matrix.build-arch }}
- name: Build wheels
uses: PyO3/maturin-action@v1
working-directory: py
with:
target: ${{ matrix.target }}
args: --release --out dist --find-interpreter
sccache: "true"
manylinux: auto

- uses: actions/upload-artifact@v3
with:
Expand All @@ -45,39 +48,29 @@ jobs:
strategy:
fail-fast: false
matrix:
include:
- target: x86_64-apple-darwin
py-platform: macosx-13_0_x86_64
- target: aarch64-apple-darwin
py-platform: macosx-14_0_arm64
target:
- x86_64
- aarch64

name: Python macOS ${{ matrix.py-platform }}
runs-on: macos-14
name: Python macOS ${{ matrix.target }}
runs-on: macos-latest

steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- name: Install Rust Toolchain
run: |
rustup set profile minimal
rustup toolchain install stable
rustup override set stable
rustup target add --toolchain stable ${{ matrix.target }}
- run: rustup toolchain install stable --profile minimal --no-self-update

- uses: actions/setup-python@v5
with:
python-version: '3.10'

- name: Build Wheel
run: |
pip install wheel
python setup.py bdist_wheel -p ${{ matrix.py-platform }}
- name: Build wheels
uses: PyO3/maturin-action@v1
working-directory: py
env:
# consumed by cargo and setup.py to obtain the target dir
CARGO_BUILD_TARGET: ${{ matrix.target }}
with:
target: ${{ matrix.target }}
args: --release --out dist --find-interpreter
sccache: "true"

- uses: actions/upload-artifact@v3
with:
Expand All @@ -94,12 +87,13 @@ jobs:
submodules: recursive

- uses: actions/setup-python@v5
with:
python-version: '3.10'

- name: Build sdist
run: python setup.py sdist --format=zip
uses: PyO3/maturin-action@v1
working-directory: py
with:
command: sdist
args: --out dist

- uses: actions/upload-artifact@v3
with:
Expand Down
Loading
Loading