Skip to content

Commit

Permalink
proj: add Cargo.lock, use --locked in CI
Browse files Browse the repository at this point in the history
This matches current best practices and the approach used in other
Rustls crates.
  • Loading branch information
cpu committed Mar 1, 2024
1 parent 95152b4 commit 09a08fd
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 6 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down Expand Up @@ -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"
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
/target
Cargo.lock
.idea
30 changes: 30 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 09a08fd

Please sign in to comment.