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 aarch64-linux-android #291

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
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
23 changes: 21 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,12 @@ jobs:
matrix:
include:
# Generate bindings
- task: bindings
os: ubuntu-latest
rust: stable
target: aarch64-linux-android
features: exports
optimization: false
- task: bindings
os: ubuntu-latest
rust: stable
Expand Down Expand Up @@ -299,12 +305,25 @@ jobs:
- uses: actions/checkout@v3
with:
submodules: true
- name: Setup cross linux toolchain
if: contains(matrix.target, '-linux-') && !startsWith(matrix.target, 'aarch64') && !startsWith(matrix.target, 'x86_64-') && !endsWith(matrix.target, '-musl')
- name: Setup android toolchain
if: contains(matrix.target, 'android')
run: |
case "${{ matrix.target }}" in
i686-*) SYSTEM_ARCH=i386 ;;
esac
SYSTEM_ARCH=aarch64
sudo apt-get update -y
sudo apt-get install -y

GCC_TARGET=$(printf "${{ matrix.target }}" | sed 's/-unknown-/-/' | sed 's/arm[^-]*/arm/g')
ENV_TARGET=$(printf "${{ matrix.target }}" | tr '[:lower:]' '[:upper:]' | tr '-' '_')
sudo dpkg --add-architecture ${SYSTEM_ARCH}
sudo apt-get install -y gcc-multilib libc6-dev:${SYSTEM_ARCH} gcc-${GCC_TARGET} libgcc-s1:${SYSTEM_ARCH}
echo "CARGO_TARGET_${ENV_TARGET}_LINKER=${GCC_TARGET}-gcc" >> $GITHUB_ENV
- name: Setup cross linux toolchain
if: contains(matrix.target, '-linux-') && !startsWith(matrix.target, 'aarch64') && !startsWith(matrix.target, 'x86_64-') && !endsWith(matrix.target, '-musl')
run: |
SYSTEM_ARCH=aarch64
GCC_TARGET=$(printf "${{ matrix.target }}" | sed 's/-unknown-/-/' | sed 's/arm[^-]*/arm/g')
ENV_TARGET=$(printf "${{ matrix.target }}" | tr '[:lower:]' '[:upper:]' | tr '-' '_')
sudo dpkg --add-architecture ${SYSTEM_ARCH}
Expand Down
Loading
Loading