diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3f21b8fd..94ffb270 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -29,7 +29,7 @@ jobs: strategy: fail-fast: false matrix: - rust: [1.56.1, stable, beta, nightly] + rust: [stable, beta, nightly] steps: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@master @@ -40,6 +40,23 @@ jobs: - run: cargo build --workspace --bins --tests --verbose --release - run: cargo test --workspace --verbose + build-minimum: + name: Build with minimum supported Rust version + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - run: sudo apt-get install libhidapi-dev + - name: Install Nightly Rust + uses: dtolnay/rust-toolchain@nightly + - run: cargo +nightly -Z minimal-versions update + - name: Install minimum Rust + uses: dtolnay/rust-toolchain@master + with: + # Please adjust README file when bumping version. + toolchain: 1.56.1 + - name: Build + run: cargo build --bins --locked + clippy: name: Lint with clippy runs-on: ubuntu-latest diff --git a/Cargo.lock b/Cargo.lock index 85e1b0f5..79bb6e35 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -205,10 +205,12 @@ dependencies = [ "envy", "grev", "libc", + "log", "merge", "nitrokey", "nitrokey-test", "nitrokey-test-state", + "proc-macro2", "progressing", "regex", "serde", @@ -303,11 +305,11 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.37" +version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec757218438d5fda206afc041538b2f6d889286160d649a86a24d37e1235afd1" +checksum = "f139b0662de085916d1fb67d2b4169d1addddda1919e696f3252b740b629986e" dependencies = [ - "unicode-xid", + "unicode-ident", ] [[package]] @@ -490,6 +492,12 @@ dependencies = [ "serde", ] +[[package]] +name = "unicode-ident" +version = "1.0.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" + [[package]] name = "unicode-segmentation" version = "1.9.0" diff --git a/Cargo.toml b/Cargo.toml index e6f89301..b6f99be1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,6 +7,7 @@ name = "nitrocli" version = "0.4.1" edition = "2021" +rust-version = "1.56" authors = ["Daniel Mueller "] license = "GPL-3.0-or-later" homepage = "https://github.com/d-e-s-o/nitrocli" @@ -63,7 +64,7 @@ version = "0.9.0" version = "3.0.2" [dependencies.serde] -version = "1.0" +version = "1.0.103" features = ["derive"] [dependencies.structopt] @@ -87,3 +88,12 @@ version = "1" [dev-dependencies.tempfile] version = "3.1" + +[dev-dependencies] +# A set of unused dependencies that we require to force correct minimum versions +# of transitive dependencies, for cases where our dependencies have incorrect +# dependency specifications themselves. +# error: cannot find macro `log` in this scope +_log_unused = { package = "log", version = "0.4.4" } +# error[E0635]: unknown feature `proc_macro_span_shrink` +_proc_macro2_unused = { package = "proc-macro2", version = "1.0.60" }