-
Notifications
You must be signed in to change notification settings - Fork 27
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
5 changed files
with
72 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 |
---|---|---|
@@ -1,20 +1,33 @@ | ||
#!/bin/bash | ||
set -e -x | ||
|
||
cd bindings/python | ||
# # install graalvm | ||
# yum install -y zip | ||
# curl -s "https://get.sdkman.io" | sh -s -- -y | ||
# source "$HOME/.sdkman/bin/sdkman-init.sh" | ||
|
||
curl https://sh.rustup.rs -sSf | sh -s -- -y | ||
source $HOME/.cargo/env | ||
rustup default 1.78.0 | ||
# sdk install java 22.0.1-graalce | ||
# sdk use java 22.0.1-graalce | ||
# echo "JAVA_HOME: $JAVA_HOME" | ||
|
||
# # install rust | ||
# curl https://sh.rustup.rs -sSf | sh -s -- -y | ||
# source $HOME/.cargo/env | ||
# rustup default 1.78.0 | ||
|
||
cd /workspace/bindings/python | ||
|
||
free -h | ||
cargo build --jobs 1 --config net.git-fetch-with-cli=true | ||
#cargo build --jobs 1 --config net.git-fetch-with-cli=true | ||
|
||
for PYBIN in /opt/python/cp3[891]*/bin; do | ||
for PYBIN in /opt/python/cp310*/bin; do | ||
"${PYBIN}/pip" install maturin | ||
"${PYBIN}/maturin" build -F python -i "${PYBIN}/python" --release | ||
"${PYBIN}/pip" install wheel | ||
"${PYBIN}/maturin" build -i "${PYBIN}/python" --release --out /workspace/bindings/python/dist --compatibility manylinux_2_34 | ||
done | ||
|
||
for wheel in target/wheels/*.whl; do | ||
auditwheel repair "${wheel}" | ||
done | ||
#/workspace/.github/workflows/patch-wheel-lib-linux.sh /workspace/bindings/python/dist manylinux_2_28 | ||
|
||
# for wheel in /workspace/bindings/python/dist/*.whl; do | ||
# auditwheel repair "${wheel}" | ||
# done |
This file was deleted.
Oops, something went wrong.
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,27 @@ | ||
#!/bin/bash | ||
set -e -x | ||
|
||
# Check for correct number of arguments | ||
if [ "$#" -ne 1 ]; then | ||
echo "Usage: $0 <graalvm-sdkman-version>" | ||
echo " example: $0 22.0.1-graalce" | ||
exit 1 | ||
fi | ||
|
||
# Get the architecture from the input argument | ||
jdk_version=$1 | ||
|
||
uname -a | ||
yum install -y zip | ||
|
||
curl -s "https://get.sdkman.io" | sh -s -- -y | ||
source "root/.sdkman/bin/sdkman-init.sh" | ||
|
||
sdk install java $jdk_version | ||
sdk default java $jdk_version | ||
#sdk default java 22.0.1-graalce | ||
|
||
echo "GRAALVM_HOME: $GRAALVM_HOME" | ||
echo "JAVA_HOME: $JAVA_HOME" | ||
java --version | ||
native-image --version |
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
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 |
---|---|---|
|
@@ -32,34 +32,34 @@ jobs: | |
- 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: Graalvm install step | ||
# run: | | ||
# bash .github/workflows/install-graalvm.sh ${{ matrix.platform.target }} graalvm-ce | ||
|
||
- name: Graalvm check step | ||
run: | | ||
uname -a | ||
echo "GRAALVM_HOME: $GRAALVM_HOME" | ||
echo "JAVA_HOME: $JAVA_HOME" | ||
java --version | ||
native-image --version | ||
# - uses: graalvm/[email protected] | ||
# with: | ||
# java-version: '22' | ||
# distribution: 'graalvm-community' | ||
# set-java-home: 'true' | ||
|
||
# - 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: | ||
command: build | ||
args: --manifest-path bindings/python/Cargo.toml --release --out bindings/python/dist -i python3.10 --compatibility manylinux_2_34 | ||
#args: --manifest-path bindings/python/Cargo.toml --release --out bindings/python/dist -i python3.10 | ||
#working-directory: "bindings/python" # dont use | ||
#working-directory: "bindings/python" # dont use working dir with docker fails to reapply permission on target dir | ||
#args: --manifest-path bindings/python/Cargo.toml --release --out bindings/python/dist -i python3.10 --compatibility manylinux_2_34 | ||
args: --manifest-path bindings/python/Cargo.toml --release --out bindings/python/dist -i python3.10 | ||
sccache: 'false' | ||
target: ${{ matrix.platform.target }} | ||
#manylinux: '2_34' | ||
container: 'off' | ||
manylinux: '2_34' | ||
#before-script-linux: .github/workflows/install-graalvm.sh ${{ matrix.platform.target }} graalvmce | ||
before-script-linux: .github/workflows/install-graalvm-sdkman.sh 22.0.1-graalce | ||
docker-options: "-e JAVA_HOME=/root/.sdkman/candidates/java/22.0.1-graalce -e GRAALVM_HOME=/root/.sdkman/candidates/java/22.0.1-graalce" | ||
#docker-options: "--mount type=bind,source=/opt/hostedtoolcache,target=/opt/hostedtoolcache -e JAVA_HOME -e GRAALVM_HOME" | ||
|
||
- name: Patch wheel lib | ||
|