anyhow: less panics; better error messages #135
Workflow file for this run
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: Build | |
on: | |
merge_group: | |
pull_request: | |
push: | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
style: | |
name: Code style | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Rust toolchain | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: stable | |
components: rustfmt, clippy | |
- uses: Swatinem/rust-cache@v2 | |
- name: cargo fmt | |
run: cargo fmt -- --check | |
- name: cargo clippy | |
run: cargo clippy | |
build_regular: | |
name: Build (regular) | |
strategy: | |
fail-fast: false | |
matrix: | |
runs-on: [ macos-latest, ubuntu-latest, windows-latest ] | |
rust: [ 1.74.0, stable, nightly ] | |
runs-on: ${{ matrix.runs-on }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Rust toolchain | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: ${{ matrix.rust }} | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
key: "${{ matrix.runs-on }}-${{ matrix.rust }}" | |
- name: cargo check (debug) | |
run: cargo check --verbose | |
- name: cargo check (release) | |
run: cargo check --verbose --release | |
- name: cargo build (debug) | |
run: cargo build --verbose | |
- name: cargo build (release) | |
run: cargo build --verbose --release | |
- run: cargo test --verbose | |
- name: "CLI: --help" | |
run: cargo run --release -- --help | |
build_nix: | |
name: Build (nix) | |
strategy: | |
fail-fast: false | |
matrix: | |
runs-on: [ macos-latest, ubuntu-latest ] | |
runs-on: ${{ matrix.runs-on }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: cachix/install-nix-action@v30 | |
- uses: DeterminateSystems/magic-nix-cache-action@main | |
- run: nix build . | |
- run: nix run . -- --help |