ci: cargo-deny + GitHub Actions workflow (spec §6.1, §6.2)
deny.toml allows the permissive Rust-ecosystem licenses + our own GPL-3.0-or-later; bans duplicate versions of tokio/serde/bytes/tracing to catch dep-tree divergence early; restricts sources to crates.io. CI runs fmt --check, clippy -D warnings, test --all (matrix: stable + MSRV 1.85), and cargo deny check on push + PR to main. The CI job installs libopus-dev — the opus crate's FFI dependency (PORT_PLAN §7 'Core (FFI)' disposition).
This commit is contained in:
58
.github/workflows/ci.yml
vendored
Normal file
58
.github/workflows/ci.yml
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
# .github/workflows/ci.yml — slice-1 CI (spec §6.2).
|
||||
# Gates: fmt --check, clippy -D warnings, test --all, cargo deny check.
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
branches: [main]
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
|
||||
jobs:
|
||||
fmt:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
components: rustfmt
|
||||
- run: cargo fmt --check
|
||||
|
||||
clippy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
components: clippy
|
||||
- name: Install libopus (media crate FFI dep)
|
||||
run: sudo apt-get update && sudo apt-get install -y libopus-dev
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
- run: cargo clippy --all -- -D warnings
|
||||
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
toolchain: [stable, "1.85"]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: dtolnay/rust-toolchain@master
|
||||
with:
|
||||
toolchain: ${{ matrix.toolchain }}
|
||||
- name: Install libopus (media crate FFI dep)
|
||||
run: sudo apt-get update && sudo apt-get install -y libopus-dev
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
- run: cargo test --all
|
||||
|
||||
deny:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
- uses: EmbarkStudios/cargo-deny-action@v1
|
||||
with:
|
||||
command: check
|
||||
Reference in New Issue
Block a user