Skip to content

Commit 64d2b7c

Browse files
committed
ci: fix actions versions and pinned deps for MSRV
1 parent 9fd3939 commit 64d2b7c

File tree

10 files changed

+86
-79
lines changed

10 files changed

+86
-79
lines changed

.github/workflows/audit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
security_audit:
1717
runs-on: ubuntu-20.04
1818
steps:
19-
- uses: actions/checkout@v2
19+
- uses: actions/checkout@v4
2020
- uses: actions-rs/audit-check@v1
2121
with:
2222
token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/code_coverage.yml

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,16 @@ jobs:
2121

2222
steps:
2323
- name: Checkout
24-
uses: actions/checkout@v2
24+
uses: actions/checkout@v4
2525
- name: Install lcov tools
2626
run: sudo apt-get install lcov -y
27-
- name: Install rustup
28-
run: curl https://sh.rustup.rs -sSf | sh -s -- -y
29-
- name: Set default toolchain
30-
run: rustup default nightly
31-
- name: Set profile
32-
run: rustup set profile minimal
33-
- name: Add llvm tools
34-
run: rustup component add llvm-tools-preview
35-
- name: Update toolchain
36-
run: rustup update
27+
- name: Install Rust toolchain
28+
uses: actions-rs/toolchain@v1
29+
with:
30+
toolchain: nightly
31+
override: true
32+
components: llvm-tools-preview
33+
profile: minimal
3734
- name: Cache cargo
3835
uses: actions/cache@v3
3936
with:
@@ -52,7 +49,7 @@ jobs:
5249
# For more info, see:
5350
# - https://github.com/bitcoindevkit/bdk/issues/696
5451
# - https://github.com/bitcoindevkit/bdk/pull/748#issuecomment-1242721040
55-
run: cargo test --features all-keys,compact_filters,compiler,key-value-db,sqlite,sqlite-bundled,test-electrum,test-rpc,verify
52+
run: cargo test --features all-keys,compact_filters,compiler,key-value-db,sqlite,sqlite-bundled,test-electrum,test-rpc,verify -- --test-threads=1
5653
- name: Run grcov
5754
run: mkdir coverage; grcov . --binary-path ./target/debug/ -s . -t lcov --branch --ignore-not-existing --ignore '/*' -o ./coverage/lcov.info
5855
- name: Generate HTML coverage report
@@ -63,7 +60,7 @@ jobs:
6360
with:
6461
github-token: ${{ secrets.GITHUB_TOKEN }}
6562
- name: Upload artifact
66-
uses: actions/upload-artifact@v2
63+
uses: actions/upload-artifact@v4
6764
with:
6865
name: coverage-report
6966
path: coverage-report.html

.github/workflows/cont_integration.yml

Lines changed: 54 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -39,31 +39,32 @@ jobs:
3939
- sqlite-bundled
4040
steps:
4141
- name: checkout
42-
uses: actions/checkout@v2
42+
uses: actions/checkout@v4
4343
- name: Generate cache key
4444
run: echo "${{ matrix.rust.version }} ${{ matrix.features }}" | tee .cache_key
4545
- name: cache
46-
uses: actions/cache@v2
46+
uses: actions/cache@v4
4747
with:
4848
path: |
4949
~/.cargo/registry
5050
~/.cargo/git
5151
target
5252
key: ${{ runner.os }}-cargo-${{ hashFiles('.cache_key') }}-${{ hashFiles('**/Cargo.toml','**/Cargo.lock') }}
53-
- name: Set default toolchain
54-
run: rustup default ${{ matrix.rust.version }}
55-
- name: Set profile
56-
run: rustup set profile minimal
57-
- name: Add clippy
58-
if: ${{ matrix.rust.clippy }}
59-
run: rustup component add clippy
60-
- name: Update toolchain
61-
run: rustup update
53+
- name: Install Rust toolchain
54+
uses: actions-rs/toolchain@v1
55+
with:
56+
toolchain: ${{ matrix.rust.version }}
57+
override: true
58+
components: clippy
59+
profile: minimal
6260
- name: Pin dependencies for MSRV
6361
if: matrix.rust.version == '1.63.0'
6462
run: |
65-
cargo update -p regex --precise "1.7.3"
63+
cargo update -p tokio --precise "1.38.1"
64+
cargo update -p tokio-util --precise "0.7.11"
6665
cargo update -p home --precise "0.5.5"
66+
cargo update -p regex --precise "1.7.3"
67+
cargo update -p security-framework-sys --precise "2.11.1"
6768
- name: Build
6869
run: cargo build --features bitcoin/std,miniscript/std,${{ matrix.features }} --no-default-features
6970
- name: Clippy
@@ -77,21 +78,22 @@ jobs:
7778
runs-on: ubuntu-latest
7879
steps:
7980
- name: checkout
80-
uses: actions/checkout@v2
81+
uses: actions/checkout@v4
8182
- name: cache
82-
uses: actions/cache@v2
83+
uses: actions/cache@v4
8384
with:
8485
path: |
8586
~/.cargo/registry
8687
~/.cargo/git
8788
target
8889
key: ${{ runner.os }}-cargo-test-md-docs-${{ hashFiles('**/Cargo.toml','**/Cargo.lock') }}
89-
- name: Set default toolchain
90-
run: rustup default nightly
91-
- name: Set profile
92-
run: rustup set profile minimal
93-
- name: Update toolchain
94-
run: rustup update
90+
- name: Install Rust toolchain
91+
uses: actions-rs/toolchain@v1
92+
with:
93+
toolchain: nightly
94+
override: true
95+
components: clippy
96+
profile: minimal
9597
- name: Test
9698
run: cargo test --features bitcoin/std,miniscript/std,test-md-docs --no-default-features -- doctest::ReadmeDoctests
9799

@@ -100,6 +102,7 @@ jobs:
100102
runs-on: ubuntu-20.04
101103
strategy:
102104
fail-fast: false
105+
max-parallel: 1
103106
matrix:
104107
blockchain:
105108
- name: electrum
@@ -119,22 +122,23 @@ jobs:
119122
features: test-esplora,use-esplora-blocking,verify,bitcoin/std,miniscript/std
120123
steps:
121124
- name: Checkout
122-
uses: actions/checkout@v2
125+
uses: actions/checkout@v4
123126
- name: Cache
124-
uses: actions/cache@v2
127+
uses: actions/cache@v4
125128
with:
126129
path: |
127130
~/.cargo/registry
128131
~/.cargo/git
129132
target
130133
key: ${{ runner.os }}-cargo-${{ github.job }}-${{ hashFiles('**/Cargo.toml','**/Cargo.lock') }}
131-
- name: Setup rust toolchain
134+
- name: Install Rust toolchain
132135
uses: actions-rs/toolchain@v1
133136
with:
134137
toolchain: stable
135138
override: true
139+
profile: minimal
136140
- name: Test
137-
run: cargo test --no-default-features --features bitcoin/std,miniscript/std,${{ matrix.blockchain.features }} ${{ matrix.blockchain.testprefix }}::bdk_blockchain_tests
141+
run: cargo test --no-default-features --features bitcoin/std,miniscript/std,${{ matrix.blockchain.features }} ${{ matrix.blockchain.testprefix }}::bdk_blockchain_tests -- --test-threads=1
138142

139143
check-wasm:
140144
name: Check WASM
@@ -144,9 +148,9 @@ jobs:
144148
CFLAGS: -I/usr/include
145149
steps:
146150
- name: Checkout
147-
uses: actions/checkout@v2
151+
uses: actions/checkout@v4
148152
- name: Cache
149-
uses: actions/cache@v2
153+
uses: actions/cache@v4
150154
with:
151155
path: |
152156
~/.cargo/registry
@@ -158,14 +162,14 @@ jobs:
158162
- run: sudo apt-add-repository "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-10 main" || exit 1
159163
- run: sudo apt-get update || exit 1
160164
- run: sudo apt-get install -y libclang-common-10-dev clang-10 libc6-dev-i386 || exit 1
161-
- name: Set default toolchain
162-
run: rustup default stable
163-
- name: Set profile
164-
run: rustup set profile minimal
165+
- name: Install Rust toolchain
166+
uses: actions-rs/toolchain@v1
167+
with:
168+
toolchain: stable
169+
override: true
170+
profile: minimal
165171
- name: Add target wasm32
166172
run: rustup target add wasm32-unknown-unknown
167-
- name: Update toolchain
168-
run: rustup update
169173
- name: Check
170174
run: cargo check --target wasm32-unknown-unknown --features bitcoin/no-std,miniscript/no-std,async-interface,use-esplora-async,dev-getrandom-wasm --no-default-features
171175

@@ -174,15 +178,14 @@ jobs:
174178
runs-on: ubuntu-latest
175179
steps:
176180
- name: Checkout
177-
uses: actions/checkout@v2
178-
- name: Set default toolchain
179-
run: rustup default nightly
180-
- name: Set profile
181-
run: rustup set profile minimal
182-
- name: Add rustfmt
183-
run: rustup component add rustfmt
184-
- name: Update toolchain
185-
run: rustup update
181+
uses: actions/checkout@v4
182+
- name: Install Rust toolchain
183+
uses: actions-rs/toolchain@v1
184+
with:
185+
toolchain: stable
186+
override: true
187+
components: rustfmt
188+
profile: minimal
186189
- name: Check fmt
187190
run: cargo fmt --all -- --config format_code_in_doc_comments=true --check
188191

@@ -206,16 +209,19 @@ jobs:
206209
python-version: '3.9'
207210
- name: Install python dependencies
208211
run: pip install hwi==2.1.1 protobuf==3.20.1
209-
- name: Set default toolchain
210-
run: rustup default ${{ matrix.rust.version }}
211-
- name: Set profile
212-
run: rustup set profile minimal
213-
- name: Update toolchain
214-
run: rustup update
212+
- name: Install Rust toolchain
213+
uses: actions-rs/toolchain@v1
214+
with:
215+
toolchain: ${{ matrix.rust.version }}
216+
override: true
217+
profile: minimal
215218
- name: Pin dependencies for MSRV
216219
if: matrix.rust.version == '1.63.0'
217220
run: |
218-
cargo update -p regex --precise "1.7.3"
221+
cargo update -p tokio --precise "1.38.1"
222+
cargo update -p tokio-util --precise "0.7.11"
219223
cargo update -p home --precise "0.5.5"
224+
cargo update -p regex --precise "1.7.3"
225+
cargo update -p security-framework-sys --precise "2.11.1"
220226
- name: Test
221227
run: cargo test --features test-hardware-signer

.github/workflows/nightly_docs.yml

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,25 +16,26 @@ jobs:
1616
runs-on: ubuntu-latest
1717
steps:
1818
- name: Checkout sources
19-
uses: actions/checkout@v2
19+
uses: actions/checkout@v4
2020
- name: Setup cache
21-
uses: actions/cache@v2
21+
uses: actions/cache@v4
2222
with:
2323
path: |
2424
~/.cargo/registry
2525
~/.cargo/git
2626
target
2727
key: nightly-docs-${{ hashFiles('**/Cargo.toml','**/Cargo.lock') }}
28-
- name: Set default toolchain
29-
run: rustup default nightly-2022-12-14
30-
- name: Set profile
31-
run: rustup set profile minimal
32-
- name: Update toolchain
33-
run: rustup update
28+
- name: Install Rust toolchain
29+
uses: actions-rs/toolchain@v1
30+
with:
31+
toolchain: nightly
32+
override: true
33+
components: clippy
34+
profile: minimal
3435
- name: Build docs
3536
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
3637
- name: Upload artifact
37-
uses: actions/upload-artifact@v2
38+
uses: actions/upload-artifact@v4
3839
with:
3940
name: built-docs
4041
path: ./target/doc/*
@@ -46,7 +47,7 @@ jobs:
4647
runs-on: ubuntu-latest
4748
steps:
4849
- name: Checkout `bitcoindevkit.org`
49-
uses: actions/checkout@v2
50+
uses: actions/checkout@v4
5051
with:
5152
ssh-key: ${{ secrets.DOCS_PUSH_SSH_KEY }}
5253
repository: bitcoindevkit/bitcoindevkit.org

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ miniscript = { version = "10.0", features = ["std"] }
111111
bitcoin = { version = "0.30", features = ["std"] }
112112
lazy_static = "1.4"
113113
env_logger = { version = "0.7", default-features = false }
114-
electrsd = "0.24"
114+
electrsd = "0.24.0"
115115
assert_matches = "1.5.0"
116116

117117
[[example]]
@@ -130,7 +130,7 @@ path = "examples/policy.rs"
130130
[[example]]
131131
name = "rpcwallet"
132132
path = "examples/rpcwallet.rs"
133-
required-features = ["keys-bip39", "key-value-db", "rpc", "electrsd/bitcoind_22_0"]
133+
required-features = ["keys-bip39", "key-value-db", "rpc", "electrsd/bitcoind_23_0"]
134134

135135
[[example]]
136136
name = "psbt_signer"

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,9 @@ This library should compile with any combination of features with Rust 1.63.0.
209209
To build with the MSRV you will need to pin dependencies as follows:
210210

211211
```shell
212-
cargo update -p regex --precise "1.7.3"
212+
cargo update -p tokio --precise "1.38.1"
213+
cargo update -p tokio-util --precise "0.7.11"
213214
cargo update -p home --precise "0.5.5"
215+
cargo update -p regex --precise "1.7.3"
216+
cargo update -p security-framework-sys --precise "2.11.1"
214217
```

examples/electrum_backend.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,5 +83,5 @@ fn run(network: &Network, electrum_url: &str, xpriv: &str) {
8383
.map_err(bdk::Error::Generic)
8484
.unwrap();
8585

86-
println!("------\nWallet Backup: {}", export.to_string());
86+
println!("------\nWallet Backup: {}", export);
8787
}

src/database/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ pub trait BatchOperations {
114114
pub trait Database: BatchOperations {
115115
/// Read and checks the descriptor checksum for a given keychain.
116116
///
117-
/// Should return [`Error::ChecksumMismatch`](crate::error::Error::ChecksumMismatch) if the
117+
/// Should return [`Error::ChecksumMismatch`] if the
118118
/// checksum doesn't match. If there's no checksum in the database, simply store it for the
119119
/// next time.
120120
fn check_descriptor_checksum<B: AsRef<[u8]>>(

src/keys/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ impl<Ctx: ScriptContext> From<bip32::ExtendedPrivKey> for ExtendedKey<Ctx> {
410410
/// }
411411
/// ```
412412
///
413-
/// Types that don't internally encode the [`Network`](bitcoin::Network) in which they are valid need some extra
413+
/// Types that don't internally encode the [`Network`] in which they are valid need some extra
414414
/// steps to override the set of valid networks, otherwise only the network specified in the
415415
/// [`ExtendedPrivKey`] or [`ExtendedPubKey`] will be considered valid.
416416
///

src/wallet/tx_builder.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@ impl<'a, D: BatchDatabase, Cs: CoinSelectionAlgorithm<D>, Ctx: TxBuilderContext>
504504

505505
/// Choose the coin selection algorithm
506506
///
507-
/// Overrides the [`DefaultCoinSelectionAlgorithm`](super::coin_selection::DefaultCoinSelectionAlgorithm).
507+
/// Overrides the [`DefaultCoinSelectionAlgorithm`].
508508
///
509509
/// Note that this function consumes the builder and returns it so it is usually best to put this as the first call on the builder.
510510
pub fn coin_selection<P: CoinSelectionAlgorithm<D>>(

0 commit comments

Comments
 (0)