parallelize #1
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
name: CI | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
workflow_dispatch: | |
env: | |
# Common environment variables | |
CARGO_TERM_COLOR: always | |
RUST_BACKTRACE: "full" | |
RUST_MIN_STACK: 8000000 | |
RUSTDOCFLAGS: '-D warnings' | |
CARGO_PROFILE_DEV_BUILD_OVERRIDE_DEBUG: true | |
jobs: | |
fmt: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Format | |
run: cargo fmt --all --check | |
typo: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Spell Check | |
uses: crate-ci/typos@master | |
doc: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Rust | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: stable | |
- name: Documentation | |
run: cargo doc --workspace --all-features --no-deps | |
clippy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Rust | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: stable | |
components: clippy | |
- name: Clippy (fail on warnings) | |
run: cargo clippy --workspace --all-features --all-targets -- -D warnings | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Rust | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: stable | |
- name: Run Tests | |
run: | | |
cargo test --all-features --workspace | |
cargo test --package cuprate-blockchain --no-default-features --features redb | |
hack_check: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Rust | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: stable | |
- name: Hack Check | |
run: | | |
cargo install cargo-hack --locked | |
cargo hack --workspace check --feature-powerset --no-dev-deps | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Rust | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: stable | |
- name: Build | |
run: cargo build --all-features --all-targets --workspace | |