Skip to content

Commit

Permalink
do not have a globally-set warnings=deny, but set it locally in CI on…
Browse files Browse the repository at this point in the history
…ly (#10738)
  • Loading branch information
Ekleog-NEAR authored and bowenwang1996 committed Mar 12, 2024
1 parent 76e8060 commit ec3dcab
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/master_fuzzer_binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,6 @@ jobs:
- name: "Compile fuzzers and upload to GCS"
run: |
NAME="nearcore-${{ github.ref_name }}-$(env TZ=Etc/UTC date +"%Y%m%d%H%M%S")"
RUSTFLAGS="-A warnings --cfg fuzz" cargo +nightly bolero build-clusterfuzz --all-features --profile fuzz
# Our Clusterfuzz setup currently (2024-02) runs on Cascade Lake CPUs
RUSTFLAGS="--cfg fuzz -C target-cpu=cascadelake" cargo +nightly bolero build-clusterfuzz --all-features --profile fuzz
gsutil cp -Z target/fuzz/clusterfuzz.tar "gs://fuzzer_targets/${{ github.ref_name }}/$NAME.tar.gz"
2 changes: 1 addition & 1 deletion .github/workflows/ondemand_fuzzer_binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,5 +86,5 @@ jobs:
- name: "Compile fuzzers and upload to GCS"
run: |
NAME="nearcore-$branch_type-$(env TZ=Etc/UTC date +"%Y%m%d%H%M%S")"
RUSTFLAGS="-A warnings --cfg fuzz" cargo +nightly bolero build-clusterfuzz --all-features --profile fuzz
RUSTFLAGS="--cfg fuzz" cargo +nightly bolero build-clusterfuzz --all-features --profile fuzz
gsutil cp -Z target/fuzz/clusterfuzz.tar "gs://fuzzer_targets/$branch_type/$NAME.tar.gz"
3 changes: 0 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,6 @@ members = [
"utils/stdx",
]

[workspace.lints.rust]
warnings = "deny"

[workspace.lints.clippy]
all = { level = "allow", priority = -1 }
clone_on_copy = "deny"
Expand Down
29 changes: 29 additions & 0 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ nextest TYPE *FLAGS: (nextest-unit TYPE FLAGS) (nextest-integration TYPE FLAGS)

# cargo unit tests, TYPE is "stable" or "nightly"
nextest-unit TYPE *FLAGS:
RUSTFLAGS="-D warnings" \
cargo nextest run \
--locked \
--workspace \
Expand All @@ -40,6 +41,7 @@ nextest-unit TYPE *FLAGS:
# cargo integration tests, TYPE is "stable" or "nightly"
[linux]
nextest-integration TYPE *FLAGS:
RUSTFLAGS="-D warnings" \
cargo nextest run \
--locked \
--package integration-tests \
Expand All @@ -54,6 +56,33 @@ nextest-integration TYPE *FLAGS:
nextest-integration TYPE *FLAGS:
@echo "Nextest integration tests are currently disabled on macos!"

<<<<<<< HEAD
=======
# check various build configurations compile as anticipated
check-non-default:
# Ensure that near-vm-runner always builds without default features enabled
RUSTFLAGS="-D warnings" \
cargo check -p near-vm-runner --no-default-features

# check rust formatting
check-cargo-fmt:
cargo fmt -- --check

# check clippy lints
check-cargo-clippy:
CARGO_TARGET_DIR="target/clippy" \
RUSTFLAGS="-D warnings" \
cargo clippy --all-features --all-targets --locked

# check cargo deny lints
check-cargo-deny:
cargo deny --all-features --locked check bans

# themis-based checks
check-themis:
env CARGO_TARGET_DIR="target/themis" cargo run --locked -p themis

>>>>>>> b03bfffa4 (do not have a globally-set warnings=deny, but set it locally in CI only (#10738))
# generate a codecov report for RULE
codecov RULE:
#!/usr/bin/env bash
Expand Down

0 comments on commit ec3dcab

Please sign in to comment.