ndk: Add AMidi interface #1630
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Rust | |
on: [push, pull_request] | |
jobs: | |
formatting: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
override: true | |
- name: Format | |
uses: actions-rs/cargo@v1 | |
with: | |
command: fmt | |
args: --all -- --check | |
clippy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
override: true | |
target: aarch64-linux-android | |
- name: Clippy | |
uses: actions-rs/cargo@v1 | |
with: | |
command: clippy | |
# Use a cross-compilation target (that's typical for Android) to lint everything | |
args: --all --all-targets --all-features --target aarch64-linux-android -- -Dwarnings | |
check_ndk_sys_msrv: | |
name: Check ndk-sys MSRV (1.60.0) | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- uses: dtolnay/[email protected] | |
with: | |
target: aarch64-linux-android | |
- uses: actions-rs/cargo@v1 | |
with: | |
command: check | |
args: -p ndk-sys --all-targets --all-features --target aarch64-linux-android | |
check_msrv: | |
name: Check overall MSRV (1.64.0) | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- uses: dtolnay/[email protected] | |
with: | |
target: aarch64-linux-android | |
- uses: actions-rs/cargo@v1 | |
with: | |
command: check | |
args: --workspace --all-targets --all-features --target aarch64-linux-android | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest] | |
rust-channel: ['stable', 'nightly'] | |
rust-target: | |
- { triple: 'armv7-linux-androideabi', abi: armeabi-v7a } | |
- { triple: 'aarch64-linux-android', abi: arm64-v8a } | |
- { triple: 'i686-linux-android', abi: x86 } | |
- { triple: 'x86_64-linux-android', abi: x86_64 } | |
include: | |
- os: windows-latest | |
rust-channel: 'stable' | |
rust-target: { triple: 'aarch64-linux-android', abi: arm64-v8a } | |
- os: windows-latest | |
rust-channel: 'stable' | |
rust-target: { triple: 'x86_64-linux-android', abi: x86_64 } | |
runs-on: ${{ matrix.os }} | |
name: Cross-compile | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup Android SDK | |
uses: android-actions/setup-android@v2 | |
- name: Install cargo-ndk | |
run: cargo install cargo-ndk | |
- name: Installing Rust ${{ matrix.rust-channel }} w/ ${{ matrix.rust-target.triple }} | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: ${{ matrix.rust-channel }} | |
target: ${{ matrix.rust-target.triple }} | |
override: true | |
- name: Compile for ${{ matrix.rust-target.triple }} | |
run: cargo ndk -t ${{ matrix.rust-target.abi }} build | |
build-host: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest] | |
rust-channel: ['stable', 'nightly'] | |
runs-on: ${{ matrix.os }} | |
name: Host-side tests | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Installing Rust ${{ matrix.rust-channel }} | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: ${{ matrix.rust-channel }} | |
override: true | |
- name: Test ndk-sys | |
run: | |
cargo test -p ndk-sys --all-features | |
- name: Test ndk | |
run: | |
cargo test -p ndk --all-features | |
docs: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest] | |
rust-channel: ['stable', 'nightly'] | |
runs-on: ${{ matrix.os }} | |
name: Build-test docs | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Installing Rust ${{ matrix.rust-channel }} | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: ${{ matrix.rust-channel }} | |
override: true | |
- name: Document all crates | |
env: | |
RUSTDOCFLAGS: -Dwarnings | |
run: | |
cargo doc --all --all-features |