Skip to content

Commit

Permalink
chore(ci): separate out android builds & disable netbsd (#2435)
Browse files Browse the repository at this point in the history
## Description

Disables the netbsd build due to sudden issues with cross and linking. 
Android separated out for the same reason but now builds directly
without cross.

## Breaking Changes

<!-- Optional, if there are any breaking changes document them,
including how to migrate older code. -->

## Notes & open questions

<!-- Any notes, remarks or open questions you have to make about the PR.
-->

## Change checklist

- [ ] Self-review.
- [ ] Documentation updates if relevant.
- [ ] Tests if relevant.
- [ ] All breaking changes documented.
  • Loading branch information
Arqu authored Jul 1, 2024
1 parent 6aef6aa commit 002f5d5
Showing 1 changed file with 50 additions and 3 deletions.
53 changes: 50 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,13 @@ jobs:
target:
# cross tests are currently broken vor armv7 and aarch64
# see /~https://github.com/cross-rs/cross/issues/1311
- armv7-linux-androideabi
- aarch64-linux-android
# - armv7-linux-androideabi
# - 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,52 @@ 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
- armv7-linux-androideabi
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Set up Rust
uses: dtolnay/rust-toolchain@stable
with:
target: ${{ matrix.target }}
- name: Install rustup target
run: rustup target add ${{ matrix.target }}

- 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 ${{ matrix.target }} build
cross_test:
name: Cross Test
if: "github.event_name != 'pull_request' || ! contains(github.event.pull_request.labels.*.name, 'flaky-test')"
Expand Down

0 comments on commit 002f5d5

Please sign in to comment.