Add android build

This commit is contained in:
Σrebe - Romain GERARD 2024-05-25 11:03:17 +02:00
parent 7e6975e5be
commit 714022af1f
No known key found for this signature in database
GPG key ID: 7A42B4B97E0332F4

View file

@ -1,8 +1,8 @@
on:
# Indicates I want to run this workflow on all branches, PR, and tags
push:
branches: ["main", "draft"]
tags: ["*"]
branches: [ "main", "draft" ]
tags: [ "*" ]
pull_request:
branches: [ "main" ]
@ -40,11 +40,13 @@ jobs:
target: i686-unknown-freebsd
build-args: "--release"
# - name: Android aarch64
# target: aarch64-linux-android
- name: Android aarch64
target: aarch64-linux-android
build-args: "--release"
# - name: Android armv7
# target: armv7-linux-androideabi
- name: Android armv7
target: armv7-linux-androideabi
build-args: "--release"
#- name: Linux mips
# target: mips-unknown-linux-musl
@ -91,6 +93,10 @@ jobs:
if: contains(matrix.platform.target, 'android')
run: sudo apt install android-libunwind libunwind8
- name: Setup Android SDK
if: contains(matrix.platform.target, 'android')
uses: android-actions/setup-android@v3
- name: Checkout Git repo
uses: actions/checkout@v3
@ -105,18 +111,6 @@ jobs:
target: ${{ matrix.platform.target }}
components: rustfmt, clippy
- name: Install rust toolchain for Android
if: ${{ contains(matrix.platform.target, 'android') }}
uses: actions-rs/toolchain@v1
with:
# Need new release of cross to target rust > 1.68.0
# https://github.com/cross-rs/cross/issues/1222
profile: minimal
toolchain: 1.67.0
override: true
target: ${{ matrix.platform.target }}
components: rustfmt, clippy
- name: Show command used for Cargo
run: |
echo "cargo command is: ${{ env.CARGO }}"
@ -140,7 +134,7 @@ jobs:
release:
name: Release
needs: [build]
needs: [ build ]
# We run the release job only if a tag starts with 'v' letter
if: startsWith( github.ref, 'refs/tags/v' )
runs-on: ubuntu-22.04