steamguard-cli/.github/workflows/rust.yml
Carson McManus 0b8de57e3a
misc workflow improvements (#247)
- CI: add checks for build targets
- adjust release script
2023-06-29 08:33:34 -04:00

45 lines
1.2 KiB
YAML

name: Lint, Build, Test
on:
push:
branches: [master, main]
pull_request:
branches: [master, main]
env:
CARGO_TERM_COLOR: always
jobs:
test:
runs-on: ubuntu-latest
steps:
- run: rustup component add clippy rustfmt
- uses: actions/checkout@v3
- name: Rust Cache
uses: Swatinem/rust-cache@v2.2.1
- name: Check format
run: cargo fmt --all -- --check
- name: Check
run: cargo check --verbose --all-targets --all-features
- name: Clippy
run: cargo clippy --workspace --no-deps --all-features --all-targets -- -D warnings
- name: Validate documentation
run: cargo doc --workspace --no-deps --all-features
- name: Run tests
run: cargo test --verbose
check:
runs-on: ubuntu-latest
strategy:
matrix:
target: [x86_64-unknown-linux-musl, x86_64-pc-windows-gnu]
steps:
- uses: actions/checkout@v3
- name: Rust Cache
uses: Swatinem/rust-cache@v2.2.1
- name: Install Cross
uses: baptiste0928/cargo-install@v1
with:
crate: cross
- name: Check
run: cross check --verbose --all-targets --all-features --target ${{ matrix.target }}