From 09a08fd3f097a4136ebbb513dd94c386b822e6eb Mon Sep 17 00:00:00 2001 From: Daniel McCarney Date: Fri, 1 Mar 2024 09:55:35 -0500 Subject: [PATCH] proj: add Cargo.lock, use --locked in CI This matches current best practices and the approach used in other Rustls crates. --- .github/workflows/build.yml | 10 +++++----- .gitignore | 1 - Cargo.lock | 30 ++++++++++++++++++++++++++++++ 3 files changed, 35 insertions(+), 6 deletions(-) create mode 100644 Cargo.lock diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f83db61..3a85a59 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -17,13 +17,13 @@ jobs: with: components: clippy - uses: actions/checkout@v4 - - run: cargo clippy --all-features --all-targets + - run: cargo clippy --locked --all-features --all-targets rustdoc: runs-on: ubuntu-20.04 steps: - uses: dtolnay/rust-toolchain@stable - uses: actions/checkout@v4 - - run: cargo doc --all-features + - run: cargo doc --locked --all-features build: name: "Build and test" runs-on: ${{ matrix.os }} @@ -52,19 +52,19 @@ jobs: targets: x86_64-unknown-none - name: cargo test (debug) - run: cargo test + run: cargo test --locked env: RUST_BACKTRACE: 1 RUSTFLAGS: "-D warnings" - name: cargo test (release) - run: cargo test --release + run: cargo test --locked --release env: RUSTFLAGS: "-D warnings" # this target does _not_ include the libstd crate in its sysroot # it will catch unwanted usage of libstd in _dependencies_ - name: cargo build no-std mode - run: cargo build --no-default-features --target x86_64-unknown-none + run: cargo build --locked --no-default-features --target x86_64-unknown-none env: RUSTFLAGS: "-D warnings" diff --git a/.gitignore b/.gitignore index b471067..3a8cabc 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,2 @@ /target -Cargo.lock .idea diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 0000000..cc6d15e --- /dev/null +++ b/Cargo.lock @@ -0,0 +1,30 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "base64" +version = "0.21.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9" + +[[package]] +name = "bencher" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7dfdb4953a096c551ce9ace855a604d702e6e62d77fac690575ae347571717f5" + +[[package]] +name = "rustls-pemfile" +version = "2.1.0" +dependencies = [ + "base64", + "bencher", + "rustls-pki-types", +] + +[[package]] +name = "rustls-pki-types" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "048a63e5b3ac996d78d402940b5fa47973d2d080c6c6fffa1d0f19c4445310b7"