Skip to content

build: add rust-version and update dependencies #681

build: add rust-version and update dependencies

build: add rust-version and update dependencies #681

Workflow file for this run

name: Build & Test
on:
push:
branches:
- master
pull_request:
jobs:
build:
strategy:
matrix:
platform: [ubuntu-latest, macos-latest, windows-latest]
toolchain: [stable, beta, nightly]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v3
- name: Update Toolchain
run: |
rustup default ${{ matrix.toolchain }}
rustup component add --toolchain ${{ matrix.toolchain }} rustfmt
rustup component add --toolchain ${{ matrix.toolchain }} clippy
rustup update ${{ matrix.toolchain }}
- name: Lint all targets
run: cargo clippy --all-targets
- name: Format
run: cargo fmt -- --check
- name: Build with defeault features
run: cargo build --verbose
- name: Check release build on Rust ${{ matrix.toolchain }}
run: cargo check --release --verbose --color always
- name: Unit test
run: cargo test --verbose --lib
- name: Doc test
run: cargo test --verbose --doc
# Check that library code can be compiled with MSRV (1.63.0).
msrv:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# Modify build tools just for MSRV testing. This avoids us having
# to bump our MSRV just for tooling. Tooling doesn't effect consumers so not a risk.
- name: Prepare environment for MSRV toolchain
run: |
# Remove resolver = "3" line for MSRV compatibility. We use V3 to
# generate an MSRV-compliant lockfile, but this isn't necessary to
# check if library code is MSRV compliant. Any resolver can go
# and grab the versions specified in the committed lockfile.
#
# The V3 resolver is standard in rust 1.85.
sed -i '/resolver = "3"/d' Cargo.toml
- name: Install MSRV toolchain
run: |
rustup toolchain install 1.63.0
rustup default 1.63.0
- name: Build with MSRV compiler
run: cargo build --verbose
signet:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Sync signet
run: cargo test --verbose signet_syncs
bitcoind:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Integration test
run: cargo test -- --test-threads 1 --skip signet_syncs --nocapture