Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: Only require MSRV-check to succeed with -Zminimal-versions #443

Merged
merged 2 commits into from
Oct 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- { name: "ndk-sys", target: "armv7-linux-androideabi" }
- { name: "ndk", target: "armv7-linux-androideabi" }
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
target: ${{ matrix.crate.target }}
Expand Down
29 changes: 21 additions & 8 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ jobs:
formatting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Format
run: cargo fmt --all -- --check

clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- uses: dtolnay/rust-toolchain@stable
with:
Expand All @@ -28,7 +28,7 @@ jobs:
name: Check ndk-sys MSRV (1.60.0)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4

- uses: dtolnay/[email protected]
with:
Expand All @@ -38,17 +38,30 @@ 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: 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
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:
Expand All @@ -73,7 +86,7 @@ jobs:
name: Cross-compile

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Setup Android SDK
uses: android-actions/setup-android@v2
Expand Down Expand Up @@ -101,7 +114,7 @@ jobs:
name: Host-side tests

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Installing Rust ${{ matrix.rust-channel }}
uses: dtolnay/rust-toolchain@master
Expand All @@ -125,7 +138,7 @@ jobs:
name: Build-test docs

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Installing Rust ${{ matrix.rust-channel }}
uses: dtolnay/rust-toolchain@master
Expand Down
8 changes: 4 additions & 4 deletions ndk/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand All @@ -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"]
Expand Down