Bumps the actions group with 1 update: [taiki-e/install-action](https://github.com/taiki-e/install-action). Updates `taiki-e/install-action` from 2.87.28 to 2.87.29 - [Release notes](https://github.com/taiki-e/install-action/releases) - [Changelog](https://github.com/taiki-e/install-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/taiki-e/install-action/compare/1168f6810a3cb30a3514bf5756a3b7f0422c6df8...8cca0918f8471c33515202b73f56ab27f2bed283) --- updated-dependencies: - dependency-name: taiki-e/install-action dependency-version: 2.87.29 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: actions ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
111 lines
3.4 KiB
YAML
111 lines
3.4 KiB
YAML
# Project-local: the ops repo (poli0981/.github) has no reusable Rust workflow, and only its
|
|
# desktop-csharp reusable runs on Windows. See docs/RELEASE-CI.md §1.
|
|
#
|
|
# Windows runner because the environment-discovery module reads the PEP 514 registry and the `py`
|
|
# launcher — a Linux run would skip exactly the code most likely to break.
|
|
|
|
name: CI / Rust
|
|
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches: [main]
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: ci-rust-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
RUSTFLAGS: -D warnings
|
|
|
|
jobs:
|
|
check:
|
|
name: fmt · clippy · test
|
|
runs-on: windows-latest
|
|
timeout-minutes: 45
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v7
|
|
with:
|
|
persist-credentials: false
|
|
|
|
# rust-toolchain.toml pins the exact version, so no toolchain action is needed — rustup
|
|
# honours it on first invocation and installs rustfmt and clippy with it.
|
|
- name: Show toolchain
|
|
run: |
|
|
rustup show
|
|
cargo --version
|
|
|
|
- name: Cache cargo
|
|
uses: actions/cache@v6
|
|
with:
|
|
path: |
|
|
~/.cargo/registry
|
|
~/.cargo/git
|
|
target
|
|
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock', 'rust-toolchain.toml') }}
|
|
restore-keys: ${{ runner.os }}-cargo-
|
|
|
|
- name: Format
|
|
run: cargo fmt --all -- --check
|
|
|
|
- name: Clippy
|
|
run: cargo clippy --workspace --all-targets --locked -- -D warnings
|
|
|
|
- name: Test
|
|
run: cargo test --workspace --locked
|
|
|
|
audit:
|
|
name: cargo audit
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 15
|
|
env:
|
|
# cargo-audit only reads Cargo.lock, so it runs under the runner's stable cargo rather than
|
|
# making rustup install the toolchain rust-toolchain.toml pins — that pin exists to make
|
|
# PipDock reproducible, not its tooling.
|
|
RUSTUP_TOOLCHAIN: stable
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v7
|
|
with:
|
|
persist-credentials: false
|
|
|
|
# A prebuilt cargo-audit, pinned by commit. This replaced rustsec/audit-check@v2, which ran
|
|
# on Node 20, needed a check-run write token, and on a pull request failed only on
|
|
# "critical" — so the advisories that turned `main` red in September passed every PR.
|
|
- name: Install cargo-audit
|
|
uses: taiki-e/install-action@8cca0918f8471c33515202b73f56ab27f2bed283 # v2.87.29
|
|
with:
|
|
tool: cargo-audit
|
|
|
|
# RustSec advisories against the committed Cargo.lock. `--deny warnings`, because
|
|
# .cargo/audit.toml's contract is that a *new* informational advisory fails CI and is looked
|
|
# at; the known ones are ignored there one by one, with reasons.
|
|
- name: Audit
|
|
run: cargo audit --deny warnings
|
|
|
|
deny:
|
|
name: cargo deny
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 15
|
|
env:
|
|
RUSTUP_TOOLCHAIN: stable
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v7
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: Install cargo-deny
|
|
uses: taiki-e/install-action@8cca0918f8471c33515202b73f56ab27f2bed283 # v2.87.29
|
|
with:
|
|
tool: cargo-deny
|
|
|
|
# Licences, sources and bans — deny.toml says why each. Advisories stay cargo audit's.
|
|
- name: Licences, sources, bans
|
|
run: cargo deny --locked check licenses sources bans
|