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 bindings for arm64 Linux (aarch64-unknown-linux-gnu) #133

Merged
merged 2 commits into from
Feb 23, 2023
Merged
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
17 changes: 14 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,11 @@ jobs:
# TODO: Remove no-test-targets when aarch64 runner is available
- {os: macOS-latest, r: 'release', rust-version: 'stable', targets: ['default', 'aarch64-apple-darwin'], no-test-targets: 'aarch64-apple-darwin', emit-bindings: 'true'}

- {os: ubuntu-latest, r: 'release', rust-version: 'stable', emit-bindings: 'true'}
- {os: ubuntu-latest, r: 'release', rust-version: 'nightly'}
- {os: ubuntu-latest, r: 'devel', rust-version: 'stable', emit-bindings: 'true'}
- {os: ubuntu-latest, r: 'oldrel', rust-version: 'stable', emit-bindings: 'true'}
# TODO: Remove no-test-targets when aarch64 runner is available
- {os: ubuntu-latest, r: 'release', rust-version: 'stable', targets: ['default', 'aarch64-unknown-linux-gnu'], no-test-targets: 'aarch64-unknown-linux-gnu', emit-bindings: 'true'}
- {os: ubuntu-latest, r: 'devel', rust-version: 'stable', targets: ['default', 'aarch64-unknown-linux-gnu'], no-test-targets: 'aarch64-unknown-linux-gnu', emit-bindings: 'true'}
- {os: ubuntu-latest, r: 'oldrel', rust-version: 'stable', targets: ['default', 'aarch64-unknown-linux-gnu'], no-test-targets: 'aarch64-unknown-linux-gnu', emit-bindings: 'true'}



Expand Down Expand Up @@ -169,6 +170,16 @@ jobs:
Del alias:R
echo "LD_LIBRARY_PATH=$(R -s -e 'cat(normalizePath(R.home()))')/lib" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append

- name: Install gcc linux/aarch64 cross compiler
if: matrix.config.no-test-targets == 'aarch64-unknown-linux-gnu'
run: |
sudo apt-get update
sudo apt-get install gcc-aarch64-linux-gnu binutils-aarch64-linux-gnu
# https://github.com/rust-lang/rust-bindgen/issues/1229
echo 'BINDGEN_EXTRA_CLANG_ARGS=--sysroot=/usr/aarch64-linux-gnu' >> $GITHUB_ENV
# https://github.com/rust-lang/rust/issues/28924
echo 'CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc' >> $GITHUB_ENV

# Build and emit bindings to './generated_bindings'
- name: Build & Emit bindings
id: build
Expand Down
Loading