fixup! Choreographer #2114
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@v4 | |
- name: Format | |
run: cargo fmt --all -- --check | |
clippy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
target: aarch64-linux-android | |
- name: Clippy | |
# Use a cross-compilation target (that's typical for Android) to lint everything | |
run: cargo clippy --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@v4 | |
- uses: dtolnay/[email protected] | |
with: | |
target: aarch64-linux-android | |
- name: cargo check | |
run: cargo check -p ndk-sys --all-targets --all-features --target aarch64-linux-android | |
check_msrv: | |
strategy: | |
matrix: | |
minimal-versions: [true, false] | |
name: Check overall MSRV (1.66.0) | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@nightly | |
if: ${{ matrix.minimal-versions }} | |
- name: Generate lockfile with minimal dependency versions | |
run: cargo +nightly generate-lockfile -Zminimal-versions | |
if: ${{ matrix.minimal-versions }} | |
- uses: dtolnay/[email protected] | |
with: | |
target: aarch64-linux-android | |
- name: cargo check | |
run: > | |
cargo check --workspace --all-targets --all-features --target aarch64-linux-android | |
|| (echo "::warning::MSRV test failed for minimal-versions: ${{ matrix.minimal-versions }}"; false) | |
continue-on-error: ${{ !matrix.minimal-versions }} | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest] | |
rust-channel: [stable, nightly] | |
rust-target: | |
- armv7-linux-androideabi | |
- aarch64-linux-android | |
- i686-linux-android | |
- x86_64-linux-android | |
include: | |
- os: windows-latest | |
rust-channel: stable | |
rust-target: aarch64-linux-android | |
- os: windows-latest | |
rust-channel: stable | |
rust-target: x86_64-linux-android | |
runs-on: ${{ matrix.os }} | |
name: Cross-compile | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Installing Rust ${{ matrix.rust-channel }} w/ ${{ matrix.rust-target }} | |
uses: dtolnay/rust-toolchain@master | |
with: | |
target: ${{ matrix.rust-target }} | |
toolchain: ${{ matrix.rust-channel }} | |
- name: Compile for ${{ matrix.rust-target }} | |
run: cargo build --target ${{ matrix.rust-target }} | |
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@v4 | |
- name: Installing Rust ${{ matrix.rust-channel }} | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.rust-channel }} | |
- 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@v4 | |
- name: Installing Rust ${{ matrix.rust-channel }} | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.rust-channel }} | |
- name: Document all crates | |
env: | |
RUSTDOCFLAGS: -Dwarnings | |
run: cargo doc --all --all-features |