name: Test
on:
push:
branches:
- master
pull_request: {}
env:
CARGO_TERM_COLOR: always
jobs:
test:
runs-on: ${{ matrix.os }}
env:
RUST_LOG: bitcoind=debug
strategy:
fail-fast: false
matrix:
os: ["ubuntu-20.04", "macos-12"]
feature:
- "bitcoind_0_19_1,0_18_1_12"
- "bitcoind_23_1,22_1_1"
- "bitcoind_24_0_1,22_1_1"
- "bitcoind_25_1,22_1_1"
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
with:
key: ${{ matrix.feature }}${{ matrix.os }}
if: ${{ matrix.os != 'macos-12' }} - uses: dtolnay/rust-toolchain@stable
- run: cargo test --features ${{ matrix.feature }}
- run: echo "BITCOIND_EXE=$(find ./target/debug -name bitcoind)" >> $GITHUB_ENV
- run: echo "ELEMENTSD_EXE=$(find ./target/debug -name elementsd)" >> $GITHUB_ENV
- run: cargo test
cosmetics:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- run: cargo fmt -- --check
- run: cargo clippy -- -D warnings
rust-version:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
toolchain: ["1.56.1", "stable", "nightly"]
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
with:
key: ${{ matrix.toolchain }}
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.toolchain }}
- name: pinning deps
run: |
cargo update -p which --precise 4.3.0
cargo update -p tempfile --precise 3.3.0
cargo update -p serde_json --precise 1.0.99
cargo update -p serde --precise 1.0.156
cargo update -p quote --precise 1.0.30
cargo update -p proc-macro2 --precise 1.0.65
cargo update -p log --precise 0.4.18
cargo update -p regex --precise 1.7.3
if: ${{ matrix.toolchain == '1.56.1' }}
- run: cargo build