name: Rust CI
on:
push:
branches:
- main
pull_request:
branches:
- main
permissions:
contents: read
env:
CARGO_TERM_COLOR: always
jobs:
checks:
name: Format, lint, test, and audit
runs-on: ubuntu-latest
timeout-minutes: 45
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
- name: Install Rust toolchain
shell: bash
run: scripts/ci_install_rust.sh
- name: Cache Rust build output
uses: Swatinem/rust-cache@aa7c1c80a07a27a84c0aa76d0cef0aad3830e330
with:
cache-on-failure: true
- name: Install security tools
uses: taiki-e/install-action@0c7a94999971db56e9df89df226240aab222e776
with:
tool: cargo-deny@0.19.6,cargo-audit@0.22.1,cargo-sbom@0.10.0
- name: Run checks
run: scripts/checks.sh
- name: Generate SBOM
run: scripts/generate-sbom.sh