From f8677ad03f51221f8583ecf65194f920da96bf4b Mon Sep 17 00:00:00 2001 From: Marijn Suijten Date: Mon, 23 Oct 2023 23:54:06 +0200 Subject: [PATCH] CI: Only require MSRV-check to succeed with `-Zminimal-versions` --- .github/workflows/rust.yml | 11 +++++++++++ ndk/Cargo.toml | 8 ++++---- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 6317f4af..a79f0ef3 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -38,17 +38,28 @@ jobs: 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@v1 + - uses: dtolnay/rust-toolchain@nightly + if: ${{ matrix.minimal_versions }} + + - name: Select minimal crate versions + run: cargo +nightly generate-lockfile -Zminimal-versions + if: ${{ matrix.minimal_versions }} + - uses: dtolnay/rust-toolchain@1.66.0 with: target: aarch64-linux-android - name: cargo check run: cargo check --workspace --all-targets --all-features --target aarch64-linux-android + continue-on-error: ${{ !matrix.minimal_versions }} build: strategy: diff --git a/ndk/Cargo.toml b/ndk/Cargo.toml index 9214506a..06a4f598 100644 --- a/ndk/Cargo.toml +++ b/ndk/Cargo.toml @@ -34,9 +34,9 @@ api-level-31 = ["api-level-30"] test = ["ffi/test", "jni", "all"] [dependencies] -bitflags = "2.0.0" -jni-sys = "0.3.0" -log = "0.4" +bitflags = "2.2" +jni-sys = "0.3" +log = "0.4.6" num_enum = "0.7" rwh_04 = { package = "raw-window-handle", version = "0.4", optional = true } rwh_05 = { package = "raw-window-handle", version = "0.5", optional = true } @@ -54,7 +54,7 @@ version = "0.5.0" [dev-dependencies] # Only for use in documentation and doc-tests -libc = "0.2" +libc = "0.2.3" [package.metadata.docs.rs] features = ["jni", "all"]