Files
freemkv-keysources/.github/workflows/ci.yml
T
Matthew Jackson 2131c2c4e4 ci: build dev as well as main
Work now lands on dev and CI must be green there; main only moves at
release time, to the tagged commit, so a push to main is the release
validation run rather than day-to-day feedback.

leak-guard already runs on every branch (on: [push, pull_request]) and
release.yml stays tag-triggered, so neither needed a change.
2026-07-31 13:16:56 -07:00

40 lines
1.2 KiB
YAML

name: CI
on:
push:
# `dev` is where work lands and where CI must be green. `main` only ever
# moves at release time, to the tagged commit, so a push to it is the
# release validation run rather than day-to-day feedback.
branches: [main, dev]
pull_request:
# freemkv-keysources depends on libfreemkv from crates.io (see Cargo.toml).
# No sibling-repo checkout is needed.
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: dtolnay/rust-toolchain@1.97.0
with:
components: clippy, rustfmt
# Cache ~/.cargo/registry + target/ across runs. Saves ~30-60s
# of crates.io index download per job; incremental compilation
# helps on re-runs that don't bump Cargo.lock.
- uses: Swatinem/rust-cache@v2
with:
shared-key: freemkv-keysources-ci
- run: cargo fmt --check
- run: cargo clippy -- -D warnings
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: dtolnay/rust-toolchain@1.97.0
- uses: Swatinem/rust-cache@v2
with:
shared-key: freemkv-keysources-ci
- run: cargo test --locked