Files
bevy-mocap/.github/workflows/rust.yml
Dylan M. Taylor 8620d83af2 ci: lock workflow actions through an actions.lock lockfile
Mutable action tags are a supply-chain risk: a moved tag runs different code
without a diff. Every workflow action is now pinned through
.github/workflows/actions.lock, and CI verifies the lockfile so an out-of-sync
or tampered one fails instead of running.
2026-11-12 10:03:38 -05:00

78 lines
1.8 KiB
YAML

name: Rust
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
clippy:
runs-on: ubuntu-latest
steps:
- name: Harden runner
uses: step-security/harden-runner@v2.22.4
with:
egress-policy: audit
- uses: actions/checkout@v3.7.0
- name: Sccache Action
uses: step-security/sccache-action@v0.0.11
- name: Check Clippy
run: cargo clippy --all
format:
runs-on: ubuntu-latest
steps:
- name: Harden runner
uses: step-security/harden-runner@v2.22.4
with:
egress-policy: audit
- uses: actions/checkout@v3.7.0
- name: Sccache Action
uses: step-security/sccache-action@v0.0.11
- name: Check Clippy
run: cargo fmt --all
build:
runs-on: ubuntu-latest
needs: [clippy, format]
steps:
- name: Harden runner
uses: step-security/harden-runner@v2.22.4
with:
egress-policy: audit
- uses: actions/checkout@v3.7.0
- name: Sccache Action
uses: step-security/sccache-action@v0.0.11
- name: Build
run: cargo build --verbose
test:
runs-on: ubuntu-latest
needs: [clippy, format]
steps:
- name: Harden runner
uses: step-security/harden-runner@v2.22.4
with:
egress-policy: audit
- uses: actions/checkout@v3.7.0
- run: sudo apt-get update && sudo apt-get install g++ pkg-config libx11-dev libasound2-dev libudev-dev libxkbcommon-x11-0
- name: Sccache Action
uses: step-security/sccache-action@v0.0.11
- name: Run tests
run: cargo test --verbose