diff --git a/bitcoind/contrib/extra_tests.sh b/bitcoind/contrib/extra_tests.sh deleted file mode 100755 index e5be55dd3..000000000 --- a/bitcoind/contrib/extra_tests.sh +++ /dev/null @@ -1,42 +0,0 @@ -#!/usr/bin/env bash -# -# Run Bitcoin Core version specific tests. -# -# The `node` crate features are different from a normal crate because: -# -# - `node` cannot be built with --no-default-features -# - `node` expects at least one version feature e.g., --features=28_0 -# - `node` supports downloading the Bitcoin Core binary and also running `bitcoind` from the host. -# -# In CI we always want to download the Bitcoin Core binary. This means we always enable `download`. -# Also, we always enable exactly one feature (even though multiple features will just cause the -# higher one to override the lower one). - -set -euox pipefail - -FEATURES=("30_2" "30_0" "29_0" "28_2" "28_1" "28_0" "27_1" "27_0" "26_2" "25_2" \ - "24_2" "23_2" "22_1" "0_21_2" "0_20_2" "0_19_1" "0_18_1" "0_17_2") - -# Use the current `Cargo.lock` file without updating it. -cargo="cargo --locked" - - -main() { - $cargo check --all-features - $cargo check --doc - - # Build every version. - for feature in "${FEATURES[@]}"; do - $cargo build --features="$feature" - done - - # But only run tests for the latest version. This is ok because we are mainly checking - # MSRV and docs with this script. Integration test will check every Core version. - $cargo test --features=download,29_0 -} - -# -# Main script -# -main "$@" -exit 0 diff --git a/contrib/crates.sh b/contrib/crates.sh deleted file mode 100755 index c084fcb15..000000000 --- a/contrib/crates.sh +++ /dev/null @@ -1,5 +0,0 @@ -# No shebang, this file should not be executed. -# shellcheck disable=SC2148 - -# Crates in this workspace to test. -CRATES=("bitreq" "client" "jsonrpc" "types") diff --git a/contrib/update-lock-files.sh b/contrib/update-lock-files.sh deleted file mode 100755 index 672e9197b..000000000 --- a/contrib/update-lock-files.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/usr/bin/env bash -# -# Update the minimal/recent lock file - -set -euo pipefail - -REPO_DIR="$(git rev-parse --show-toplevel)" - -# Targets where `--all-features` is used. -ALL_FEATURE_CRATES=(bitreq client fuzz jsonrpc types verify) - -# Targets with conflicting features and only speficic features are used. -SPECIFIC_FEATURES_CRATES=(integration_test bitcoind) -SPECIFIC_FEATURES=(latest) - -update_lock_files() { - for crate in "${ALL_FEATURE_CRATES[@]}"; do - cargo check --manifest-path "$REPO_DIR/$crate/Cargo.toml" --all-features - done - - for crate in "${SPECIFIC_FEATURES_CRATES[@]}"; do - cargo check --manifest-path "$REPO_DIR/$crate/Cargo.toml" --no-default-features --features="${SPECIFIC_FEATURES[*]}" - done -} - -for file in Cargo-minimal.lock Cargo-recent.lock; do - cp --force "$file" Cargo.lock - update_lock_files - cp --force Cargo.lock "$file" -done diff --git a/justfile b/justfile index 702445609..ffd0f6fbd 100644 --- a/justfile +++ b/justfile @@ -59,4 +59,22 @@ docsrs *flags: # Update the recent and minimal lock files. update-lock-files: - contrib/update-lock-files.sh + just update-lock-file Cargo-minimal.lock + just update-lock-file Cargo-recent.lock + +update-lock-file file: + cp --force {{file}} Cargo.lock + for crate in {{ALL_FEATURE_CRATES}}; do \ + cargo check \ + --manifest-path "$REPO_DIR/$crate/Cargo.toml" \ + --all-features \ + || exit 1; \ + done + for crate in {{SPECIFIC_FEATURES_CRATES}}; do \ + cargo check \ + --manifest-path "$REPO_DIR/$crate/Cargo.toml" \ + --no-default-features \ + --features="{{SPECIFIC_FEATURES}}" \ + || exit 1; \ + done + cp --force Cargo.lock {{file}}