Skip to content

Realignment to updated game design #264

Realignment to updated game design

Realignment to updated game design #264

Workflow file for this run

name: Build & Test
permissions:
contents: read
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
CARGO_TERM_COLOR: always
# sccache enablement
SCCACHE_GHA_ENABLED: true
RUSTC_WRAPPER: sccache
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: rust
cancel-in-progress: false
jobs:
build:
name: Build
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0
with:
egress-policy: audit
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- name: Install Dependencies
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev
- name: Run sccache-cache
uses: mozilla-actions/sccache-action@2e7f9ec7921547d4b46598398ca573513895d0bd # 0.0.4
- uses: dtolnay/rust-toolchain@be73d7920c329f220ce78e0234b8f96b7ae60248 # master
with:
targets: x86_64-unknown-linux-gnu
toolchain: stable
- name: Build
run: cargo build
- name: Show sccache stats
shell: bash
run: |
echo '## SCCACHE STATS' >> $GITHUB_STEP_SUMMARY
echo '| Metric | Value |' >> $GITHUB_STEP_SUMMARY
echo '|--------|-------|' >> $GITHUB_STEP_SUMMARY
${SCCACHE_PATH} --show-stats | awk -F'[[:space:]][[:space:]]+' 'NR<=22{ print "| "$1" | "$2" |"}' >> $GITHUB_STEP_SUMMARY
echo '</hr>' >> $GITHUB_STEP_SUMMARY
clippy:
name: Clippy Check
timeout-minutes: 30
runs-on: ubuntu-latest
needs: build
steps:
- uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0
with:
egress-policy: audit
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- name: Install Dependencies
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev
- name: Run sccache-cache
uses: mozilla-actions/sccache-action@2e7f9ec7921547d4b46598398ca573513895d0bd # 0.0.4
- uses: dtolnay/rust-toolchain@be73d7920c329f220ce78e0234b8f96b7ae60248 # master
with:
targets: x86_64-unknown-linux-gnu
toolchain: stable
components: clippy
- name: Run clippy
run: cargo clippy -- -D warnings
test:
name: Test
timeout-minutes: 30
needs: build
runs-on: ubuntu-latest
steps:
- uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0
with:
egress-policy: audit
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- name: Install Dependencies
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev
- name: Run sccache-cache
uses: mozilla-actions/sccache-action@2e7f9ec7921547d4b46598398ca573513895d0bd # 0.0.4
- uses: dtolnay/rust-toolchain@be73d7920c329f220ce78e0234b8f96b7ae60248 # master
with:
targets: x86_64-unknown-linux-gnu
toolchain: stable
- uses: taiki-e/install-action@28b5a55da2f568d1d1e3f8d5ea6e7103685abc6a # v2.28.0
with:
tool: cargo-nextest
- name: Run tests
run: cargo nextest run