Skip to content

Commit

Permalink
Add: x86_64-linux-androidを追加 (#13)
Browse files Browse the repository at this point in the history
* Add: x86_64-linux-androidを追加

* Add: x86_64の設定を追加

* Update gen_bind.yml

* Add: binding作成周りをx86_64対応

* Add: test.ymlにx86_64処理を追加

* Fix: 変え忘れを修正

* Fix: Typo修正
  • Loading branch information
sevenc-nanashi authored Apr 23, 2023
1 parent 4a81257 commit d766a52
Show file tree
Hide file tree
Showing 6 changed files with 3,543 additions and 9 deletions.
4 changes: 3 additions & 1 deletion .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
[target.aarch64-linux-android]
linker = "aarch64-linux-android29-clang"
linker = "aarch64-linux-android29-clang"
[target.x86_64-linux-android]
linker = "x86_64-linux-android29-clang"
7 changes: 4 additions & 3 deletions .github/actions/auto_gen_bind_pr/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,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: dtolnay/rust-toolchain@stable
- name: install triple
run: rustup target add ${{ inputs.triple }}
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/gen_bind.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ jobs:
- os: ubuntu-latest
triple: aarch64-unknown-linux-gnu
- os: ubuntu-latest
triple: aarch64-linux-android
triple: aarch64-linux-android
- os: ubuntu-latest
triple: x86_64-linux-android
- os: macos-latest
triple: x86_64-apple-darwin
- os: macos-latest
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ jobs:
target: aarch64-unknown-linux-gnu
- os: ubuntu-latest
target: aarch64-linux-android
- os: ubuntu-latest
target: x86_64-linux-android
- os: macos-latest
target: aarch64-apple-darwin
- os: macos-latest
Expand All @@ -77,15 +79,16 @@ jobs:
sudo apt update
sudo apt install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
- uses: nttld/setup-ndk@v1
if: matrix.target == 'aarch64-linux-android'
if: endsWith(matrix.target, '-linux-android')
with:
ndk-version: r25b
- name: Set path for android
if: matrix.target == 'aarch64-linux-android'
if: endsWith(matrix.target, '-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' <<< "${{ matrix.target }}")
echo "AR_$UNDERSCORED_TRIPLE=llvm-ar" >> "$GITHUB_ENV"
- uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
Expand Down
Loading

0 comments on commit d766a52

Please sign in to comment.