@@ -34,33 +34,37 @@ jobs:
3434 runs-on : ${{ matrix.platform }}
3535 steps :
3636 - name : Checkout source code
37- uses : actions/checkout@v3
37+ uses : actions/checkout@v6
3838 - name : Install Rust ${{ matrix.toolchain }} toolchain
3939 run : |
4040 curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile=minimal --default-toolchain ${{ matrix.toolchain }}
4141 - name : Check formatting on Rust ${{ matrix.toolchain }}
4242 if : matrix.check-fmt
4343 run : rustup component add rustfmt && cargo fmt --all -- --check
44+ - name : Pin packages to allow for MSRV
45+ if : matrix.msrv
46+ run : |
47+ cargo update -p idna_adapter --precise "1.2.0" --verbose # idna_adapter 1.2.1 uses ICU4X 2.2.0, requiring 1.86 and newer
4448 - name : Set RUSTFLAGS to deny warnings
4549 if : " matrix.toolchain == 'stable'"
4650 run : echo "RUSTFLAGS=-D warnings" >> "$GITHUB_ENV"
4751 - name : Enable caching for bitcoind
4852 id : cache-bitcoind
49- uses : actions/cache@v4
53+ uses : actions/cache@v5
5054 with :
5155 path : bin/bitcoind-${{ runner.os }}-${{ runner.arch }}
52- key : bitcoind-${{ runner.os }}-${{ runner.arch }}
56+ key : bitcoind-29.0- ${{ runner.os }}-${{ runner.arch }}
5357 - name : Enable caching for electrs
5458 id : cache-electrs
55- uses : actions/cache@v4
59+ uses : actions/cache@v5
5660 with :
5761 path : bin/electrs-${{ runner.os }}-${{ runner.arch }}
5862 key : electrs-${{ runner.os }}-${{ runner.arch }}
5963 - name : Download bitcoind/electrs
6064 if : " matrix.platform != 'windows-latest' && (steps.cache-bitcoind.outputs.cache-hit != 'true' || steps.cache-electrs.outputs.cache-hit != 'true')"
6165 run : |
6266 source ./scripts/download_bitcoind_electrs.sh
63- mkdir bin
67+ mkdir -p bin
6468 mv "$BITCOIND_EXE" bin/bitcoind-${{ runner.os }}-${{ runner.arch }}
6569 mv "$ELECTRS_EXE" bin/electrs-${{ runner.os }}-${{ runner.arch }}
6670 - name : Set bitcoind/electrs environment variables
8690 run : |
8791 RUSTFLAGS="--cfg no_download --cfg cycle_tests" cargo test --features uniffi
8892
93+ linting :
94+ name : Linting
95+ runs-on : ubuntu-latest
96+ steps :
97+ - name : Checkout source code
98+ uses : actions/checkout@v6
99+ - name : Install Rust and clippy
100+ run : |
101+ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile=minimal --default-toolchain stable
102+ rustup component add clippy
103+ - name : Ban `unwrap` in library code
104+ run : |
105+ cargo clippy --lib --verbose --color always -- -A warnings -D clippy::unwrap_used -A clippy::tabs_in_doc_comments
106+ cargo clippy --lib --features uniffi --verbose --color always -- -A warnings -D clippy::unwrap_used -A clippy::tabs_in_doc_comments
107+
89108 doc :
90109 name : Documentation
91110 runs-on : ubuntu-latest
95114 - uses : actions/checkout@v6
96115 - uses : dtolnay/rust-toolchain@nightly
97116 - uses : dtolnay/install@cargo-docs-rs
98- - run : cargo docs-rs
117+ - run : cargo docs-rs
0 commit comments