v0.1.9 #40
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
push: | |
branches: | |
- 'master' | |
- 'release/*' | |
pull_request: | |
branches: | |
- 'master' | |
- 'release/*' | |
name: CI | |
jobs: | |
build-test: | |
name: Build and test | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
rust: | |
- version: 1.72.0 # STABLE | |
clippy: true | |
- version: 1.68.2 # MSRV | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
- name: Generate cache key | |
run: echo "${{ matrix.rust.version }}" | tee .cache_key | |
- name: cache | |
uses: actions/cache@v2 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
target | |
key: ${{ runner.os }}-cargo-${{ hashFiles('.cache_key') }}-${{ hashFiles('**/Cargo.toml','**/Cargo.lock') }} | |
- name: Set default toolchain | |
run: rustup default ${{ matrix.rust.version }} | |
- name: Set profile | |
run: rustup set profile minimal | |
- name: Add clippy | |
if: ${{ matrix.rust.clippy }} | |
run: rustup component add clippy | |
- name: Update toolchain | |
run: rustup update | |
- name: Build | |
run: cargo build | |
- name: Clippy | |
if: ${{ matrix.rust.clippy }} | |
run: cargo clippy --all-targets -- -D warnings | |
- name: Test | |
run: cargo test | |
build-docker: | |
name: build docker | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Build the Docker image | |
run: docker build --file Dockerfile --tag bdk-reserves-web . | |
fmt: | |
name: Rust fmt | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set default toolchain | |
run: rustup default nightly | |
- name: Set profile | |
run: rustup set profile minimal | |
- name: Add rustfmt | |
run: rustup component add rustfmt | |
- name: Update toolchain | |
run: rustup update | |
- name: Check fmt | |
run: cargo fmt --all -- --config format_code_in_doc_comments=true --check |