diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 9cf66715..d234e0a9 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -34,6 +34,7 @@ jobs: rust-target: 'aarch64-linux-android' runs-on: ${{ matrix.os }} + name: Build apk steps: - uses: actions/checkout@v2 @@ -45,13 +46,40 @@ jobs: target: ${{ matrix.rust-target }} override: true - - if: runner.os != 'Windows' - name: Test ndk-sys + - name: Install cargo-apk + run: + cargo install --path cargo-apk + + - name: Cargo check for target ${{ matrix.rust-target }} + run: cargo check -p ndk --target ${{ matrix.rust-target }} --all-features + + - name: Cargo apk build for target ${{ matrix.rust-target }} + run: cargo apk build -p ndk-examples --target ${{ matrix.rust-target }} --examples + + 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 - - if: runner.os != 'Windows' - name: Test ndk + - name: Test ndk run: cargo test -p ndk --all-features @@ -59,13 +87,11 @@ jobs: run: cargo test -p ndk-build --all-features - - if: runner.os != 'Windows' - name: Test ndk-glue + - name: Test ndk-glue run: cargo test -p ndk-glue --all-features - - if: runner.os != 'Windows' - name: Test ndk-macro + - name: Test ndk-macro run: cargo test -p ndk-macro --all-features @@ -73,19 +99,27 @@ jobs: run: cargo test -p cargo-apk --all-features - - if: runner.os != 'Windows' - name: Document all crates + 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 - - - name: Install cargo-apk - run: - cargo install --path cargo-apk - - - name: Cargo check for target ${{ matrix.rust-target }} - run: cargo check -p ndk --target ${{ matrix.rust-target }} --all-features - - - name: Cargo apk build for target ${{ matrix.rust-target }} - run: cargo apk build -p ndk-examples --target ${{ matrix.rust-target }} --examples