-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
27 additions
and
50 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,20 @@ | ||
#!/bin/bash | ||
set -e -x | ||
|
||
cd bindings/python | ||
|
||
curl https://sh.rustup.rs -sSf | sh -s -- -y | ||
source $HOME/.cargo/env | ||
rustup default 1.78.0 | ||
|
||
free -h | ||
cargo build --jobs 1 --config net.git-fetch-with-cli=true | ||
|
||
for PYBIN in /opt/python/cp3[891]*/bin; do | ||
"${PYBIN}/pip" install maturin | ||
"${PYBIN}/maturin" build -F python -i "${PYBIN}/python" --release | ||
done | ||
|
||
for wheel in target/wheels/*.whl; do | ||
auditwheel repair "${wheel}" | ||
done |
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 |
---|---|---|
|
@@ -9,7 +9,6 @@ on: | |
push: | ||
branches: | ||
- main | ||
- master | ||
tags: | ||
- '*' | ||
pull_request: | ||
|
@@ -19,78 +18,38 @@ permissions: | |
contents: read | ||
|
||
jobs: | ||
linux: | ||
runs-on: ${{ matrix.platform.runner }} | ||
strategy: | ||
matrix: | ||
platform: | ||
- runner: ubuntu-latest | ||
target: x86_64 | ||
#- runner: ubuntu-latest | ||
# target: x86 | ||
- runner: ubuntu-latest | ||
target: aarch64 | ||
#- runner: ubuntu-latest | ||
# target: armv7 | ||
# NOT SUPPORTED with zig | ||
#- runner: ubuntu-latest | ||
# target: s390x | ||
#- runner: ubuntu-latest | ||
# target: ppc64le | ||
linux-x86_64: | ||
runs-on: ubuntu-latest | ||
container: quay.io/pypa/manylinux2014_x86_64 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.10' | ||
- uses: graalvm/[email protected] | ||
with: | ||
java-version: '22' | ||
distribution: 'graalvm-community' | ||
set-java-home: 'true' | ||
- name: Example step | ||
- name: Graalvm check step | ||
run: | | ||
uname -a | ||
echo "GRAALVM_HOME: $GRAALVM_HOME" | ||
echo "JAVA_HOME: $JAVA_HOME" | ||
java --version | ||
native-image --version | ||
- name: Build wheels | ||
uses: PyO3/maturin-action@v1 | ||
with: | ||
target: ${{ matrix.platform.target }} | ||
working-directory: "bindings/python" | ||
args: --release --out dist | ||
sccache: 'true' | ||
manylinux: auto | ||
before-script-linux: ../../.github/workflows/install-graalvm-linux.sh | ||
run: | | ||
bash .github/workflows/build-wheels.sh | ||
- name: Upload wheels | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: wheels-linux-${{ matrix.platform.target }} | ||
name: wheels-linux-x86_64 | ||
path: bindings/python/dist | ||
- name: pytest | ||
if: ${{ startsWith(matrix.platform.target, 'x86_64') }} | ||
shell: bash | ||
run: | | ||
set -e | ||
pip install extract-rs --find-links dist --force-reinstall | ||
pip install pytest | ||
pytest | ||
- name: pytest | ||
if: ${{ !startsWith(matrix.platform.target, 'x86') && matrix.platform.target != 'ppc64' }} | ||
uses: uraimo/[email protected] | ||
with: | ||
arch: ${{ matrix.platform.target }} | ||
distro: ubuntu22.04 | ||
githubToken: ${{ github.token }} | ||
install: | | ||
apt-get update | ||
apt-get install -y --no-install-recommends python3 python3-pip | ||
pip3 install -U pip pytest | ||
run: | | ||
set -e | ||
pip3 install extract-rs --find-links dist --force-reinstall | ||
pytest | ||
windows: | ||
runs-on: ${{ matrix.platform.runner }} | ||
|
@@ -99,8 +58,6 @@ jobs: | |
platform: | ||
- runner: windows-latest | ||
target: x64 | ||
- runner: windows-latest | ||
target: x86 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
|