From ee3cfe8fa35a5f05dafc2d14ba69cfbac241d85b Mon Sep 17 00:00:00 2001 From: Steve Myers Date: Sun, 20 Oct 2024 22:55:38 -0500 Subject: [PATCH] ci: fix mutually exclusive build, audit, actions update rust stable to 1.82, msrv to 1.63.0 --- .github/workflows/audit.yml | 2 +- .github/workflows/code_coverage.yml | 4 +- .github/workflows/cont_integration.yml | 70 +++++++------------------- .github/workflows/nightly_docs.yml | 10 ++-- Cargo.toml | 10 ++-- src/database/mod.rs | 1 + src/lib.rs | 8 +-- 7 files changed, 37 insertions(+), 68 deletions(-) diff --git a/.github/workflows/audit.yml b/.github/workflows/audit.yml index 3c61162df..8a41b8846 100644 --- a/.github/workflows/audit.yml +++ b/.github/workflows/audit.yml @@ -16,7 +16,7 @@ jobs: security_audit: runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - uses: actions-rs/audit-check@v1 with: token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/code_coverage.yml b/.github/workflows/code_coverage.yml index 9ec5965c0..2836cd0b4 100644 --- a/.github/workflows/code_coverage.yml +++ b/.github/workflows/code_coverage.yml @@ -21,7 +21,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Install lcov tools run: sudo apt-get install lcov -y - name: Install rustup @@ -63,7 +63,7 @@ jobs: with: github-token: ${{ secrets.GITHUB_TOKEN }} - name: Upload artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: coverage-report path: coverage-report.html diff --git a/.github/workflows/cont_integration.yml b/.github/workflows/cont_integration.yml index bc2c88442..90880cb7b 100644 --- a/.github/workflows/cont_integration.yml +++ b/.github/workflows/cont_integration.yml @@ -18,9 +18,9 @@ jobs: strategy: matrix: rust: - - version: 1.65.0 # STABLE + - version: 1.82.0 # STABLE clippy: true - - version: 1.57.0 # MSRV + - version: 1.63.0 # MSRV features: - default - minimal @@ -39,11 +39,11 @@ jobs: - sqlite-bundled steps: - name: checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Generate cache key run: echo "${{ matrix.rust.version }} ${{ matrix.features }}" | tee .cache_key - name: cache - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: | ~/.cargo/registry @@ -60,26 +60,10 @@ jobs: - name: Update toolchain run: rustup update - name: Pin dependencies for MSRV - if: matrix.rust.version == '1.57.0' + if: matrix.rust.version == '1.63.0' run: | - cargo update -p log --precise "0.4.18" - cargo update -p tempfile --precise "3.6.0" - cargo update -p hashlink --precise "0.8.1" cargo update -p regex --precise "1.7.3" - cargo update -p zip:0.6.6 --precise "0.6.3" - cargo update -p rustix --precise "0.37.23" - cargo update -p tokio --precise "1.29.1" - cargo update -p tokio-util --precise "0.7.8" - cargo update -p cc --precise "1.0.81" - cargo update -p rustls:0.20.9 --precise "0.20.8" - cargo update -p rustls:0.21.7 --precise "0.21.1" - cargo update -p flate2:1.0.27 --precise "1.0.26" - cargo update -p reqwest --precise "0.11.18" - cargo update -p h2 --precise "0.3.20" - cargo update -p rustls-webpki:0.100.3 --precise "0.100.1" - cargo update -p rustls-webpki:0.101.6 --precise "0.101.1" - cargo update -p byteorder --precise "1.4.3" - cargo update -p webpki --precise "0.22.2" + cargo update -p home --precise "0.5.5" - name: Build run: cargo build --features ${{ matrix.features }} --no-default-features - name: Clippy @@ -93,9 +77,9 @@ jobs: runs-on: ubuntu-latest steps: - name: checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: cache - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: | ~/.cargo/registry @@ -135,9 +119,9 @@ jobs: features: test-esplora,use-esplora-blocking,verify steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Cache - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: | ~/.cargo/registry @@ -160,9 +144,9 @@ jobs: CFLAGS: -I/usr/include steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Cache - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: | ~/.cargo/registry @@ -175,7 +159,7 @@ jobs: - run: sudo apt-get update || exit 1 - run: sudo apt-get install -y libclang-common-10-dev clang-10 libc6-dev-i386 || exit 1 - name: Set default toolchain - run: rustup default 1.65.0 # STABLE + run: rustup default 1.82.0 # STABLE - name: Set profile run: rustup set profile minimal - name: Add target wasm32 @@ -190,7 +174,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Set default toolchain run: rustup default nightly - name: Set profile @@ -207,8 +191,8 @@ jobs: strategy: matrix: rust: - - version: 1.65.0 # STABLE - - version: 1.57.0 # MSRV + - version: 1.82.0 # STABLE + - version: 1.63.0 # MSRV steps: - name: Checkout uses: actions/checkout@v3 @@ -229,25 +213,9 @@ jobs: - name: Update toolchain run: rustup update - name: Pin dependencies for MSRV - if: matrix.rust.version == '1.57.0' + if: matrix.rust.version == '1.63.0' run: | - cargo update -p log --precise "0.4.18" - cargo update -p tempfile --precise "3.6.0" - cargo update -p hashlink --precise "0.8.1" - cargo update -p regex --precise "1.7.3" - cargo update -p zip:0.6.6 --precise "0.6.3" - cargo update -p rustix --precise "0.37.23" - cargo update -p tokio --precise "1.29.1" - cargo update -p tokio-util --precise "0.7.8" - cargo update -p cc --precise "1.0.81" - cargo update -p rustls:0.20.9 --precise "0.20.8" - cargo update -p rustls:0.21.7 --precise "0.21.1" - cargo update -p flate2:1.0.27 --precise "1.0.26" - cargo update -p reqwest --precise "0.11.18" - cargo update -p h2 --precise "0.3.20" - cargo update -p rustls-webpki:0.100.3 --precise "0.100.1" - cargo update -p rustls-webpki:0.101.6 --precise "0.101.1" - cargo update -p byteorder --precise "1.4.3" - cargo update -p webpki --precise "0.22.2" + cargo update -p regex --precise "1.7.3" + cargo update -p home --precise "0.5.5" - name: Test run: cargo test --features test-hardware-signer diff --git a/.github/workflows/nightly_docs.yml b/.github/workflows/nightly_docs.yml index f122d068f..70cb8d6bf 100644 --- a/.github/workflows/nightly_docs.yml +++ b/.github/workflows/nightly_docs.yml @@ -16,9 +16,9 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout sources - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Setup cache - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: | ~/.cargo/registry @@ -26,7 +26,7 @@ jobs: target key: nightly-docs-${{ hashFiles('**/Cargo.toml','**/Cargo.lock') }} - name: Set default toolchain - run: rustup default nightly-2022-12-14 + run: rustup default 1.82.0 - name: Set profile run: rustup set profile minimal - name: Update toolchain @@ -34,7 +34,7 @@ jobs: - name: Build docs run: cargo rustdoc --verbose --features=compiler,electrum,esplora,use-esplora-blocking,compact_filters,rpc,key-value-db,sqlite,all-keys,verify,hardware-signer -- --cfg docsrs -Dwarnings - name: Upload artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: built-docs path: ./target/doc/* @@ -46,7 +46,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout `bitcoindevkit.org` - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: ssh-key: ${{ secrets.DOCS_PUSH_SSH_KEY }} repository: bitcoindevkit/bitcoindevkit.org diff --git a/Cargo.toml b/Cargo.toml index 2e8b02cf9..e1425b7ec 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -94,10 +94,10 @@ reqwest-default-tls = ["esplora-client/async-https"] # Debug/Test features test-blockchains = ["bitcoincore-rpc", "electrum-client"] -test-electrum = ["electrum", "electrsd/electrs_0_8_10", "electrsd/bitcoind_22_0", "test-blockchains"] -test-rpc = ["rpc", "electrsd/electrs_0_8_10", "electrsd/bitcoind_22_0", "test-blockchains"] -test-rpc-legacy = ["rpc", "electrsd/electrs_0_8_10", "electrsd/bitcoind_0_20_0", "test-blockchains"] -test-esplora = ["electrsd/legacy", "electrsd/esplora_a33e97e1", "electrsd/bitcoind_22_0", "test-blockchains"] +test-electrum = ["electrum", "electrsd/electrs_0_8_10", "electrsd/bitcoind_22_1", "test-blockchains"] +test-rpc = ["rpc", "electrsd/electrs_0_8_10", "electrsd/bitcoind_22_1", "test-blockchains"] +test-rpc-legacy = ["rpc", "electrsd/electrs_0_8_10", "electrsd/bitcoind_0_20_2", "test-blockchains"] +test-esplora = ["electrsd/legacy", "electrsd/esplora_a33e97e1", "electrsd/bitcoind_22_1", "test-blockchains"] test-md-docs = ["electrum"] test-hardware-signer = ["hardware-signer"] @@ -111,7 +111,7 @@ miniscript = { version = "10.0", features = ["std"] } bitcoin = { version = "0.30", features = ["std"] } lazy_static = "1.4" env_logger = { version = "0.7", default-features = false } -electrsd = "0.24" +electrsd = "0.25" assert_matches = "1.5.0" [[example]] diff --git a/src/database/mod.rs b/src/database/mod.rs index fd835300d..caab9b943 100644 --- a/src/database/mod.rs +++ b/src/database/mod.rs @@ -188,6 +188,7 @@ pub(crate) trait DatabaseUtils: Database { .map(|o| o.is_some()) } + #[allow(dead_code)] fn get_raw_tx_or(&self, txid: &Txid, default: D) -> Result, Error> where D: FnOnce() -> Result, Error>, diff --git a/src/lib.rs b/src/lib.rs index 084314552..fd13c5fb4 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -206,17 +206,17 @@ extern crate serde_json; #[cfg(feature = "hardware-signer")] pub extern crate hwi; -#[cfg(all(feature = "reqwest", feature = "ureq"))] -compile_error!("Features reqwest and ureq are mutually exclusive and cannot be enabled together"); +#[cfg(all(feature = "use-esplora-async", feature = "use-esplora-blocking"))] +compile_error!("Features use-esplora-async and use-esplora-blocking are mutually exclusive and cannot be enabled together"); #[cfg(all(feature = "async-interface", feature = "electrum"))] compile_error!( "Features async-interface and electrum are mutually exclusive and cannot be enabled together" ); -#[cfg(all(feature = "async-interface", feature = "ureq"))] +#[cfg(all(feature = "async-interface", feature = "use-esplora-blocking"))] compile_error!( - "Features async-interface and ureq are mutually exclusive and cannot be enabled together" + "Features async-interface and use-esplora-blocking are mutually exclusive and cannot be enabled together" ); #[cfg(all(feature = "async-interface", feature = "compact_filters"))]