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

Commit Cargo.lock to repository #346

Merged
merged 2 commits into from
Sep 28, 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
6 changes: 3 additions & 3 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ jobs:
uses: dtolnay/rust-toolchain@nightly

- name: cargo test (debug; all features; -Z minimal-versions)
run: cargo -Z minimal-versions test --all-features
run: cargo -Z minimal-versions test --all-features --locked

format:
name: Format
Expand Down Expand Up @@ -190,7 +190,7 @@ jobs:
# (below) will have a new lint that we want to suppress.
# If we suppress (e.g. #![allow(clippy::arc_with_non_send_sync)]),
# we would get an unknown-lint error from older clippy versions.
run: cargo clippy --workspace -- -D warnings -A unknown-lints
run: cargo clippy --locked --workspace -- -D warnings -A unknown-lints

clippy-nightly-optional:
name: Clippy nightly (optional)
Expand All @@ -205,7 +205,7 @@ jobs:
with:
components: clippy
- name: Check clippy
run: cargo clippy --workspace -- -D warnings
run: cargo clippy --locked --workspace -- -D warnings

clang-tidy:
name: Clang Tidy
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
target
Cargo.lock
/build
.idea
.venv
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ ExternalProject_Add(
DOWNLOAD_COMMAND ""
CONFIGURE_COMMAND ""
BUILD_COMMAND cbindgen --lang C --output "${CMAKE_SOURCE_DIR}/src/rustls.h" "${CMAKE_SOURCE_DIR}"
COMMAND cargo build "$<IF:$<CONFIG:Release>,--release,-->"
COMMAND cargo build --locked "$<IF:$<CONFIG:Release>,--release,-->"
# Rely on cargo checking timestamps, rather than tell CMake where every
# output is.
BUILD_ALWAYS true
Expand All @@ -20,5 +20,5 @@ ExternalProject_Add(
# of "error" in stdout as an error, and we have some test functions that
# end in "_error". Quiet mode suppresses test names, so this is a
# sufficient workaround.
TEST_COMMAND cargo test "$<IF:$<CONFIG:Release>,--release,-->" --quiet
TEST_COMMAND cargo test --locked "$<IF:$<CONFIG:Release>,--release,-->" --quiet
)
265 changes: 265 additions & 0 deletions Cargo.lock

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

3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ else
endif

CARGO ?= cargo
CARGOFLAGS += --locked

CFLAGS := -Werror -Wall -Wextra -Wpedantic -g -I src/
PROFILE := release
Expand Down Expand Up @@ -32,7 +33,7 @@ test: all test-rust
./tests/client-server.py ./target/client ./target/server

test-rust:
${CARGO} test
${CARGO} test --locked

target:
mkdir -p $@
Expand Down
4 changes: 2 additions & 2 deletions Makefile.Windows
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ test: all
$(call green_msg, getting 'https://httpbin.org/headers' ...)
target/client.exe httpbin.org 443 /headers
$(call green_msg, Running 'cargo test')
cargo test
cargo test --locked

$(RUSTLS_LIB): src/lib.rs Cargo.toml
$(call green_msg, Building '$@')
RUSTFLAGS="--print native-static-libs" cargo build --release
RUSTFLAGS="--print native-static-libs" cargo build --release --locked
@echo

%.obj: tests/%.c
Expand Down