mirror of
https://github.com/storytold/bevy-mocap.git
synced 2026-11-23 02:20:57 +01:00
Each third-party action that StepSecurity publishes a secure drop-in replacement for now uses that replacement, pinned to a commit with its version as a comment. Versions follow what we used: the newest StepSecurity release in the same major, or the closest major they publish. dtolnay/rust-toolchain refs that named a toolchain (stable, nightly, 1.76) become the replacement's `toolchain` input.
78 lines
2.1 KiB
YAML
78 lines
2.1 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@1d88384fd173af6ecb012dfd0264a306b711241a # v2.22.4
|
|
with:
|
|
egress-policy: audit
|
|
- uses: actions/checkout@v3
|
|
- name: Sccache Action
|
|
uses: step-security/sccache-action@ae2d64c53dbae979f387673f0aae7ebb52087f6b # v0.0.11
|
|
|
|
- name: Check Clippy
|
|
run: cargo clippy --all
|
|
|
|
format:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Harden runner
|
|
uses: step-security/harden-runner@1d88384fd173af6ecb012dfd0264a306b711241a # v2.22.4
|
|
with:
|
|
egress-policy: audit
|
|
- uses: actions/checkout@v3
|
|
- name: Sccache Action
|
|
uses: step-security/sccache-action@ae2d64c53dbae979f387673f0aae7ebb52087f6b # 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@1d88384fd173af6ecb012dfd0264a306b711241a # v2.22.4
|
|
with:
|
|
egress-policy: audit
|
|
- uses: actions/checkout@v3
|
|
- name: Sccache Action
|
|
uses: step-security/sccache-action@ae2d64c53dbae979f387673f0aae7ebb52087f6b # 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@1d88384fd173af6ecb012dfd0264a306b711241a # v2.22.4
|
|
with:
|
|
egress-policy: audit
|
|
- uses: actions/checkout@v3
|
|
- 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@ae2d64c53dbae979f387673f0aae7ebb52087f6b # v0.0.11
|
|
- name: Run tests
|
|
run: cargo test --verbose
|