Use Cargo.lock for CI builds

This commit is contained in:
Dirkjan Ochtman 2023-09-15 13:39:56 +02:00
parent c7970af179
commit 78c8ff4d96
4 changed files with 37 additions and 37 deletions

View File

@ -40,15 +40,15 @@ jobs:
toolchain: ${{ matrix.rust }}
- name: cargo build (debug; default features)
run: cargo build
run: cargo build --locked
- name: cargo test (debug; all features)
run: cargo test --all-features
run: cargo test --locked --all-features
env:
RUST_BACKTRACE: 1
- name: cargo build (debug; rustls-provider-example)
run: cargo build -p rustls-provider-example
run: cargo build --locked -p rustls-provider-example
msrv:
name: MSRV
@ -63,7 +63,7 @@ jobs:
with:
toolchain: "1.60"
- run: cargo check --lib --all-features -p rustls
- run: cargo check --locked --lib --all-features -p rustls
features:
name: Features
@ -78,21 +78,21 @@ jobs:
uses: dtolnay/rust-toolchain@stable
- name: cargo build (debug; default features)
run: cargo build
run: cargo build --locked
- name: cargo test (debug; default features)
run: cargo test
run: cargo test --locked
env:
RUST_BACKTRACE: 1
- name: cargo test (debug; no default features)
run: cargo test --no-default-features
run: cargo test --locked --no-default-features
- name: cargo test (debug; no default features; tls12)
run: cargo test --no-default-features --features tls12
run: cargo test --locked --no-default-features --features tls12
- name: cargo test (release; no run)
run: cargo test --release --no-run
run: cargo test --locked --release --no-run
bogo:
name: BoGo test suite
@ -152,10 +152,10 @@ jobs:
uses: dtolnay/rust-toolchain@nightly
- name: Smoke-test benchmark program
run: cargo run --release --example bench
run: cargo run --release --locked --example bench
- name: Run micro-benchmarks
run: cargo bench
run: cargo bench --locked
env:
RUSTFLAGS: --cfg=bench
@ -172,13 +172,13 @@ jobs:
uses: dtolnay/rust-toolchain@nightly
- name: cargo doc (rustls; all features)
run: cargo doc --all-features --no-deps --document-private-items --package rustls
run: cargo doc --locked --all-features --no-deps --document-private-items --package rustls
env:
RUSTDOCFLAGS: -Dwarnings
- name: Check README.md
run: |
cargo build --all-features
cargo build --locked --all-features
./admin/pull-readme
./admin/pull-usage
git diff --exit-code
@ -244,7 +244,7 @@ jobs:
uses: dtolnay/rust-toolchain@stable
- name: Install cross
uses: taiki-e/install-action@cross
- run: cross build --target i686-unknown-linux-gnu
- run: cross build --locked --target i686-unknown-linux-gnu
semver:
name: Check semver compatibility
@ -289,11 +289,11 @@ jobs:
uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- run: cargo clippy --package rustls --all-features --all-targets -- --deny warnings
- run: cargo clippy --package rustls --no-default-features --all-targets -- --deny warnings
- run: cargo clippy --manifest-path=connect-tests/Cargo.toml --all-features --all-targets -- --deny warnings
- run: cargo clippy --manifest-path=fuzz/Cargo.toml --all-features --all-targets -- --deny warnings
- run: cargo clippy --manifest-path=provider-example/Cargo.toml --all-features --all-targets -- --deny warnings
- run: cargo clippy --locked --package rustls --all-features --all-targets -- --deny warnings
- run: cargo clippy --locked --package rustls --no-default-features --all-targets -- --deny warnings
- run: cargo clippy --locked --manifest-path=connect-tests/Cargo.toml --all-features --all-targets -- --deny warnings
- run: cargo clippy --locked --manifest-path=fuzz/Cargo.toml --all-features --all-targets -- --deny warnings
- run: cargo clippy --locked --manifest-path=provider-example/Cargo.toml --all-features --all-targets -- --deny warnings
clippy-nightly:
name: Clippy (Nightly)
@ -307,8 +307,8 @@ jobs:
uses: dtolnay/rust-toolchain@nightly
with:
components: clippy
- run: cargo clippy --package rustls --all-features --all-targets
- run: cargo clippy --package rustls --no-default-features --all-targets
- run: cargo clippy --manifest-path=connect-tests/Cargo.toml --all-features --all-targets
- run: cargo clippy --manifest-path=fuzz/Cargo.toml --all-features --all-targets
- run: cargo clippy --manifest-path=provider-example/Cargo.toml --all-features --all-targets
- run: cargo clippy --locked --package rustls --all-features --all-targets
- run: cargo clippy --locked --package rustls --no-default-features --all-targets
- run: cargo clippy --locked --manifest-path=connect-tests/Cargo.toml --all-features --all-targets
- run: cargo clippy --locked --manifest-path=fuzz/Cargo.toml --all-features --all-targets
- run: cargo clippy --locked --manifest-path=provider-example/Cargo.toml --all-features --all-targets

View File

@ -40,10 +40,10 @@ jobs:
toolchain: ${{ matrix.rust }}
- name: Build main crate
run: cargo build
run: cargo build --locked
- name: Run connect tests
run: cargo test --manifest-path=connect-tests/Cargo.toml
run: cargo test --locked --manifest-path=connect-tests/Cargo.toml
env:
RUST_BACKTRACE: 1
@ -76,21 +76,21 @@ jobs:
toolchain: ${{ matrix.rust }}
- name: Check simple client
run: cargo run --bin simpleclient
run: cargo run --locked --bin simpleclient
- name: Check limited client
run: cargo run --bin limitedclient
run: cargo run --locked --bin limitedclient
- name: Check simple 0rtt client
run: cargo run --bin simple_0rtt_client
run: cargo run --locked --bin simple_0rtt_client
# Test the server_acceptor binary builds - we invoke with --help since it
# will run a server process that doesn't exit when invoked with no args
- name: Check server acceptor
run: cargo run --bin server_acceptor -- --help
run: cargo run --locked --bin server_acceptor -- --help
- name: Check provider-example client
run: cargo run -p rustls-provider-example --example client
run: cargo run --locked -p rustls-provider-example --example client
feature-powerset:
@ -109,4 +109,4 @@ jobs:
uses: taiki-e/install-action@cargo-hack
- name: Check feature powerset
run: cargo hack check --feature-powerset --no-dev-deps
run: cargo hack check --locked --feature-powerset --no-dev-deps

View File

@ -22,7 +22,7 @@ jobs:
persist-credentials: false
- name: Run icount benchmarks for ${{ github.base_ref }}
run: cd ci-bench && cargo run --release -- run-all --output-dir ${{ runner.temp }}/base
run: cd ci-bench && cargo run --locked --release -- run-all --output-dir ${{ runner.temp }}/base
- name: Checkout PR
uses: actions/checkout@v4
@ -31,7 +31,7 @@ jobs:
persist-credentials: false
- name: Run icount benchmarks for PR
run: cd ci-bench && cargo run --release -- run-all --output-dir ${{ runner.temp }}/pr
run: cd ci-bench && cargo run --locked --release -- run-all --output-dir ${{ runner.temp }}/pr
- name: Compare results
run: cd ci-bench && cargo run --release -- compare ${{ runner.temp }}/base ${{ runner.temp }}/pr > $GITHUB_STEP_SUMMARY
run: cd ci-bench && cargo run --locked --release -- compare ${{ runner.temp }}/base ${{ runner.temp }}/pr > $GITHUB_STEP_SUMMARY

View File

@ -5,6 +5,6 @@ set -e
source <(cargo llvm-cov show-env --export-prefix)
cargo llvm-cov clean --workspace
cargo build --all-targets --all-features
cargo test --all-features
cargo build --locked --all-targets --all-features
cargo test --locked --all-features
cargo llvm-cov report "$@"