Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
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
22 changes: 20 additions & 2 deletions contrib/update-lock-files.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,25 @@
set -euo pipefail

for file in Cargo-minimal.lock Cargo-recent.lock; do
cp --force "$file" Cargo.lock
cargo check --all-features
cp "$file" Cargo.lock

# Workspace crates with all features
workspace_crates=("client" "types" "jsonrpc")
for crate in "${workspace_crates[@]}"; do
(cd "$crate" && cargo check --all-features)
done

# Crates with version features (use latest)
version_crates=("node" "integration_test")
for crate in "${version_crates[@]}"; do
(cd "$crate" && cargo check --features=latest)
done

# Other crates
other_crates=("verify")
for crate in "${other_crates[@]}"; do
(cd "$crate" && cargo check)
done

cp --force Cargo.lock "$file"
done
2 changes: 2 additions & 0 deletions integration_test/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ edition = "2021"
[features]
download = ["node/download"]

latest = ["29_0"]

# Enable the same feature in `node` and the version feature here.
# All minor releases of the latest three versions.
29_0 = ["v29_and_below", "node/29_0"]
Expand Down
24 changes: 24 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ default:

# Cargo build everything.
build:
<<<<<<< HEAD
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this from? your merge editor?

cargo build --workspace --all-targets --all-features

# Cargo check everything.
Expand All @@ -21,6 +22,29 @@ check:
# Lint everything.
lint: lint-verify lint-integration-tests
cargo +$(cat ./nightly-version) clippy --workspace --all-targets --all-features -- --deny warnings
=======
cargo build -p corepc-client --all-targets --all-features
cargo build -p corepc-types --all-targets --all-features
cargo build -p jsonrpc --all-targets --all-features
cargo build -p corepc-node --all-targets --features=latest
cargo build --manifest-path verify/Cargo.toml --all-targets

# Cargo check everything.
check:
cargo check -p corepc-client --all-targets --all-features
cargo check -p corepc-types --all-targets --all-features
cargo check -p jsonrpc --all-targets --all-features
cargo check -p corepc-node --all-targets --features=latest
cargo check --manifest-path verify/Cargo.toml --all-targets

# Lint everything.
lint: lint-verify lint-integration-tests
cargo +$(cat ./nightly-version) clippy -p corepc-client --all-targets --all-features -- --deny warnings
cargo +$(cat ./nightly-version) clippy -p corepc-types --all-targets --all-features -- --deny warnings
cargo +$(cat ./nightly-version) clippy -p jsonrpc --all-targets --all-features -- --deny warnings
cargo +$(cat ./nightly-version) clippy -p corepc-node --all-targets --features=latest -- --deny warnings
cargo +$(cat ./nightly-version) clippy --manifest-path verify/Cargo.toml --all-targets -- --deny warnings
>>>>>>> 2d0ee43 (Add latest feature to avoid hardcoded versions in build scripts)

lint-verify:
$REPO_DIR/contrib/lint-verify.sh
Expand Down
3 changes: 2 additions & 1 deletion node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,14 @@ zip = { version = "0.6.6", default-features = false, features = ["bzip2", "defla
# - `cargo test --features=27_2,download` to download Bitcoin Core binary `v27.2`.
# - `cargo test --features=28_0` to use `bitcoind` from the host environment.
# - `cargo test` is equivalent to `cargo test --features=0_17_2`.
# - `cargo test --all-features`: Same as using latest version.
# - `cargo test --no-default-features` does not work, you MUST enable a version feature.
[features]
default = ["0_17_2"]

download = ["anyhow", "bitcoin_hashes", "flate2", "tar", "minreq", "zip"]

latest = ["29_0"]

# We support all minor releases of the latest three versions.
29_0 = ["28_2"]
28_2 = ["28_1"]
Expand Down