2af2d3bc25 2026-04-18 1: name: rust-ci
01565c7f7e 2026-04-23 2: on:
01565c7f7e 2026-04-23 3: push:
01565c7f7e 2026-04-23 4: branches: [ master, release ]
01565c7f7e 2026-04-23 5: pull_request:
7393d62235 2026-01-07 6:
2af2d3bc25 2026-04-18 7: # sccache enable for rust/C builds
7393d62235 2026-01-07 8: env:
2af2d3bc25 2026-04-18 9: SCCACHE_GHA_ENABLED: "true"
2af2d3bc25 2026-04-18 10: RUSTC_WRAPPER: "sccache"
7393d62235 2026-01-07 11:
7393d62235 2026-01-07 12: jobs:
2af2d3bc25 2026-04-18 13: rust-ci-run:
01565c7f7e 2026-04-23 14: name: Run rust-clippy analyzing and tests
7393d62235 2026-01-07 15: runs-on: ubuntu-latest
01565c7f7e 2026-04-23 16: if: github.event_name == 'push' || (github.head_ref != 'master' && github.head_ref != 'release')
7393d62235 2026-01-07 17: permissions:
7393d62235 2026-01-07 18: contents: read
2af2d3bc25 2026-04-18 19: steps:
2af2d3bc25 2026-04-18 20: # SETUP
2af2d3bc25 2026-04-18 21: - uses: actions/checkout@v6
2af2d3bc25 2026-04-18 22: - uses: dtolnay/rust-toolchain@stable
2af2d3bc25 2026-04-18 23: - uses: Swatinem/rust-cache@v2
01565c7f7e 2026-04-23 24: - uses: mozilla-actions/sccache-action@v0.0.10
2af2d3bc25 2026-04-18 25:
2af2d3bc25 2026-04-18 26: # TESTS
7393d62235 2026-01-07 27: - name: Run tests
7393d62235 2026-01-07 28: run: cargo test --all-targets --all-features
7393d62235 2026-01-07 29:
2af2d3bc25 2026-04-18 30: # CLIPPY
7393d62235 2026-01-07 31: - name: Run rust-clippy
2af2d3bc25 2026-04-18 32: run: cargo clippy --all-targets --all-features -- -D warnings