mirror of
https://github.com/rtic-rs/rtic.git
synced 2025-12-16 12:55:23 +01:00
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 6. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v4...v6) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
74 lines
2 KiB
YAML
74 lines
2 KiB
YAML
name: check-clippy-examples
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
backend:
|
|
description: The backend to execute for
|
|
required: true
|
|
type: string
|
|
|
|
platform:
|
|
description: The platform to execute for
|
|
required: true
|
|
type: string
|
|
|
|
# TODO: get this from `cargo xtask`!
|
|
rustup-target:
|
|
description: The rustup target to install
|
|
required: true
|
|
type: string
|
|
|
|
example-args:
|
|
description: Extra args to pass when checking examples
|
|
required: false
|
|
type: string
|
|
|
|
jobs:
|
|
check:
|
|
runs-on: ubuntu-24.04
|
|
name: Validate platform ${{ inputs.platform }}, backend ${{ inputs.backend }}
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v6
|
|
|
|
- name: Configure Rust target ${{ inputs.rustup-target }}
|
|
run: rustup target add ${{ inputs.rustup-target }}
|
|
|
|
- name: Cache Dependencies
|
|
uses: Swatinem/rust-cache@v2
|
|
|
|
- run: cargo xtask --deny-warnings check -p ${{ inputs.platform }} -b ${{ inputs.backend }}
|
|
|
|
check-examples:
|
|
runs-on: ubuntu-24.04
|
|
name: Check examples
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v6
|
|
|
|
- name: Configure Rust target ${{ inputs.rustup-target }}
|
|
run: rustup target add ${{ inputs.rustup-target }}
|
|
|
|
- name: Cache Dependencies
|
|
uses: Swatinem/rust-cache@v2
|
|
|
|
- name: Check the examples
|
|
run: cargo xtask example-check --platform ${{ inputs.platform }} --backend ${{ inputs.backend }} ${{ inputs.example-args }}
|
|
|
|
clippy:
|
|
runs-on: ubuntu-24.04
|
|
name: Run clippy
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v6
|
|
|
|
- name: Configure Rust target ${{ inputs.rustup-target }}
|
|
run: rustup target add ${{ inputs.rustup-target }}
|
|
|
|
- name: Add Rust component clippy
|
|
run: rustup component add clippy
|
|
|
|
- name: Cache Dependencies
|
|
uses: Swatinem/rust-cache@v2
|
|
|
|
- run: cargo xtask --deny-warnings --platform ${{ inputs.platform }} --backend ${{ inputs.backend }} clippy
|