name: Test
on: [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 ]
feature: [ "23_0", "22_0", "0_21_1", "0_21_0", "0_20_1", "0_20_0", "0_19_1", "0_19_0_1", "0_18_1", "0_18_0", "0_17_1"]
include:
- os: "macos-11"
feature: "0_21_1"
- os: "macos-11"
feature: "22_0"
- os: "macos-11"
feature: "23_0"
- os: "windows-2019"
feature: "23_0"
steps:
- run: df -h
- uses: actions/checkout@v2
- uses: Swatinem/rust-cache@v1.2.0
with:
key: ${{ matrix.feature }}${{ matrix.os }}
if: ${{ matrix.os != 'macos-11' }} - uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- uses: actions-rs/cargo@v1
with:
command: test
args: --features ${{ matrix.feature }}
- run: echo "BITCOIND_EXE=$(find ./target/debug -name bitcoind)" >> $GITHUB_ENV
if: ${{ matrix.os != 'windows-2019' }}
- uses: actions-rs/cargo@v1
with:
command: test
if: ${{ matrix.feature != '0_18_1' && matrix.feature != '0_18_0' && matrix.feature != '0_17_1' && matrix.os != 'windows-2019' }}
cosmetics:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: Swatinem/rust-cache@v1.2.0
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
profile: minimal
components: rustfmt, clippy
- name: fmt
run: cargo fmt -- --check
- name: clippy
run: cargo clippy -- -D warnings
rust-version:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
toolchain: [ "1.41.1", "stable", "nightly" ]
steps:
- uses: actions/checkout@v2
- uses: Swatinem/rust-cache@v1.2.0
with:
key: ${{ matrix.version }}
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.toolchain }}
override: true
- uses: actions-rs/cargo@v1
with:
command: update
args: -p which --precise 4.3.0
- uses: actions-rs/cargo@v1
with:
command: update
args: -p tempfile --precise 3.3.0
- uses: actions-rs/cargo@v1
with:
command: build