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

chore(ci): separate out android builds & disable netbsd #2435

Merged
merged 18 commits into from
Jul 1, 2024
50 changes: 48 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,12 @@ jobs:
# cross tests are currently broken vor armv7 and aarch64
# see https://github.com/cross-rs/cross/issues/1311
- armv7-linux-androideabi
- aarch64-linux-android
# - aarch64-linux-android
# Freebsd execution fails in cross
# - i686-unknown-freebsd # Linking fails :/
- x86_64-unknown-freebsd
- x86_64-unknown-netbsd
# Netbsd execution fails to link in cross
# - x86_64-unknown-netbsd
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -68,6 +69,51 @@ jobs:
env:
RUST_LOG: ${{ runner.debug && 'TRACE' || 'DEBUG'}}

android_build:
name: Android Build Only
if: "github.event_name != 'pull_request' || ! contains(github.event.pull_request.labels.*.name, 'flaky-test')"
timeout-minutes: 30
# runs-on: ubuntu-latest
runs-on: [self-hosted, linux, X64]
strategy:
fail-fast: false
matrix:
target:
- aarch64-linux-android
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Set up Rust
uses: dtolnay/rust-toolchain@stable
with:
target: aarch64-linux-android
- name: Install rustup target
run: rustup target add aarch64-linux-android

- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'

- name: Setup Android SDK
uses: android-actions/setup-android@v2

- name: Setup Android NDK
uses: arqu/setup-ndk@main
id: setup-ndk
with:
ndk-version: r23
add-to-path: true

- name: Build
env:
ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}
run: |
cargo install cargo-ndk
cargo ndk --target aarch64-linux-android build
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can do the other android targets in this setup as well, would be more consistent

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lemme try


cross_test:
name: Cross Test
if: "github.event_name != 'pull_request' || ! contains(github.event.pull_request.labels.*.name, 'flaky-test')"
Expand Down
Loading