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

Add: x86_64-linux-android用のバインディングを追加 #21

Merged
merged 11 commits into from
Apr 23, 2023
7 changes: 4 additions & 3 deletions .github/actions/auto_gen_bind_pr/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,16 @@ runs:
sudo apt update
sudo apt install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
- uses: nttld/setup-ndk@v1
if: inputs.triple == 'aarch64-linux-android'
if: endsWith(inputs.triple, '-linux-android')
with:
ndk-version: r25b
- name: Set path for android
if: inputs.triple == 'aarch64-linux-android'
if: endsWith(inputs.triple, '-linux-android')
shell: bash
run: |
echo "$ANDROID_NDK/toolchains/llvm/prebuilt/linux-x86_64/bin" >> "$GITHUB_PATH"
echo "AR_aarch64_linux_android=llvm-ar" >> "$GITHUB_ENV"
UNDERSCORED_TRIPLE=$(sed 's/-/_/g' <<< "${{ inputs.triple }}")
echo "AR_$UNDERSCORED_TRIPLE=llvm-ar" >> "$GITHUB_ENV"
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/gen_bind.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,17 @@ jobs:
triple: aarch64-unknown-linux-gnu
- os: ubuntu-latest
triple: aarch64-linux-android
- os: ubuntu-latest
triple: x86_64-linux-android

- os: windows-latest
triple: x86_64-pc-windows-msvc
- os: windows-latest
triple: x86_64-pc-windows-msvc
additional_features: directml
- os: windows-latest
triple: i686-pc-windows-msvc

- os: macos-latest
triple: x86_64-apple-darwin
- os: macos-latest
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/general.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ jobs:
- run: rustup target install i686-pc-windows-msvc
- run: rustup target install x86_64-pc-windows-msvc
- run: rustup target install aarch64-linux-android
- run: rustup target install x86_64-linux-android
# ******************************************************************
- name: Download prebuilt archive (CPU, x86_64-unknown-linux-gnu)
uses: actions-rs/cargo@v1
Expand All @@ -56,6 +57,14 @@ jobs:
- name: Verify prebuilt archive downloaded (CPU, aarch64-linux-android)
run: ls -lh target/aarch64-linux-android/debug/build/onnxruntime-sys-*/out/onnxruntime*.aar
# ******************************************************************
- name: Download prebuilt archive (CPU, x86_64-linux-android)
uses: actions-rs/cargo@v1
with:
command: build
args: --target x86_64-linux-android
- name: Verify prebuilt archive downloaded (CPU, x86_64-linux-android)
run: ls -lh target/x86_64-linux-android/debug/build/onnxruntime-sys-*/out/onnxruntime*.aar
# ******************************************************************
- name: Download prebuilt archive (CPU, x86_64-apple-darwin)
uses: actions-rs/cargo@v1
with:
Expand Down
1 change: 1 addition & 0 deletions onnxruntime-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,7 @@ impl OnnxPrebuiltArchive for Triplet {
}
(Os::Windows, Architecture::X86, Accelerator::None)
| (Os::MacOs, Architecture::X86_64, Accelerator::None)
| (Os::Android, Architecture::X86_64, Accelerator::None)
| (Os::Android, Architecture::Arm64, Accelerator::None)
| (Os::Linux, Architecture::Arm64, Accelerator::None) => Cow::from(format!(
"{}-{}",
Expand Down
Loading