Files
tuwunel/.github/workflows/lint.yml
Jason Volk d858c5c1f4 docker: Add Instruction Set Architectures to build matrix.
ci: Publish multi-arch images for both branch and tag refs.

Signed-off-by: Jason Volk <jason@zemos.net>
2025-06-25 17:21:55 +00:00

174 lines
5.6 KiB
YAML

name: Linting
on:
workflow_call:
inputs:
cargo_profiles:
type: string
description: Cargo profiles
feat_sets:
type: string
description: Cargo feature groups
rust_toolchains:
type: string
description: Rust toolchains
sys_names:
type: string
description: System names
sys_versions:
type: string
description: System versions
rust_targets:
type: string
description: Rust targets
sys_targets:
type: string
description: System targets
machines:
type: string
description: Hardware platform vector
excludes:
type: string
default: '[]'
description: Matrix exclusions
includes:
type: string
default: '[]'
description: Matrix inclusions
jobs:
fmt:
if: >
!failure() && !cancelled()
&& contains(fromJSON(inputs.cargo_profiles), fromJSON('["test"]')[0])
&& contains(fromJSON(inputs.feat_sets), fromJSON('["all"]')[0])
&& contains(fromJSON(inputs.rust_toolchains), fromJSON('["nightly"]')[0])
&& contains(fromJSON(inputs.sys_targets), fromJSON('["x86_64-v1-linux-gnu"]')[0])
name: Format
uses: ./.github/workflows/bake.yml
with:
bake_targets: '["fmt"]'
cargo_profiles: '["test"]'
feat_sets: '["all"]'
rust_toolchains: '["nightly"]'
rust_targets: ${{inputs.rust_targets}}
sys_names: ${{inputs.sys_names}}
sys_versions: ${{inputs.sys_versions}}
sys_targets: '["x86_64-v1-linux-gnu"]'
machines: ${{inputs.machines}}
excludes: ${{inputs.excludes}}
includes: ${{inputs.includes}}
typos:
if: >
!failure() && !cancelled()
&& contains(fromJSON(inputs.cargo_profiles), fromJSON('["test"]')[0])
&& contains(fromJSON(inputs.feat_sets), fromJSON('["all"]')[0])
&& contains(fromJSON(inputs.rust_toolchains), fromJSON('["nightly"]')[0])
&& contains(fromJSON(inputs.sys_targets), fromJSON('["x86_64-v1-linux-gnu"]')[0])
name: Typos
uses: ./.github/workflows/bake.yml
with:
bake_targets: '["typos"]'
cargo_profiles: '["test"]'
feat_sets: '["all"]'
rust_toolchains: '["nightly"]'
sys_names: ${{inputs.sys_names}}
sys_versions: ${{inputs.sys_versions}}
rust_targets: ${{inputs.rust_targets}}
sys_targets: '["x86_64-v1-linux-gnu"]'
machines: ${{inputs.machines}}
excludes: ${{inputs.excludes}}
includes: ${{inputs.includes}}
audit:
if: >
!failure() && !cancelled()
&& contains(fromJSON(inputs.cargo_profiles), fromJSON('["test"]')[0])
&& contains(fromJSON(inputs.feat_sets), fromJSON('["all"]')[0])
&& contains(fromJSON(inputs.rust_toolchains), fromJSON('["nightly"]')[0])
&& contains(fromJSON(inputs.sys_targets), fromJSON('["x86_64-v1-linux-gnu"]')[0])
name: Audit
uses: ./.github/workflows/bake.yml
with:
bake_targets: '["audit"]'
cargo_profiles: '["test"]'
feat_sets: '["all"]'
rust_toolchains: '["nightly"]'
sys_names: ${{inputs.sys_names}}
sys_versions: ${{inputs.sys_versions}}
rust_targets: ${{inputs.rust_targets}}
sys_targets: '["x86_64-v1-linux-gnu"]'
machines: ${{inputs.machines}}
excludes: ${{inputs.excludes}}
includes: ${{inputs.includes}}
lychee:
if: >
!failure() && !cancelled()
&& contains(fromJSON(inputs.cargo_profiles), fromJSON('["test"]')[0])
&& contains(fromJSON(inputs.feat_sets), fromJSON('["all"]')[0])
&& contains(fromJSON(inputs.rust_toolchains), fromJSON('["nightly"]')[0])
&& contains(fromJSON(inputs.sys_targets), fromJSON('["x86_64-v1-linux-gnu"]')[0])
name: Lychee
uses: ./.github/workflows/bake.yml
with:
bake_targets: '["lychee"]'
cargo_profiles: '["test"]'
feat_sets: '["all"]'
rust_toolchains: '["nightly"]'
sys_names: ${{inputs.sys_names}}
sys_versions: ${{inputs.sys_versions}}
rust_targets: ${{inputs.rust_targets}}
sys_targets: '["x86_64-v1-linux-gnu"]'
machines: ${{inputs.machines}}
excludes: ${{inputs.excludes}}
includes: ${{inputs.includes}}
check:
if: >
!failure() && !cancelled()
&& contains(fromJSON(inputs.cargo_profiles), fromJSON('["test"]')[0])
&& contains(fromJSON(inputs.feat_sets), fromJSON('["all"]')[0])
&& contains(fromJSON(inputs.rust_toolchains), fromJSON('["nightly"]')[0])
&& contains(fromJSON(inputs.sys_targets), fromJSON('["x86_64-v1-linux-gnu"]')[0])
name: Check
uses: ./.github/workflows/bake.yml
with:
bake_targets: '["check"]'
cargo_profiles: '["test"]'
feat_sets: '["all"]'
rust_toolchains: '["nightly"]'
sys_names: ${{inputs.sys_names}}
sys_versions: ${{inputs.sys_versions}}
rust_targets: ${{inputs.rust_targets}}
sys_targets: '["x86_64-v1-linux-gnu"]'
machines: ${{inputs.machines}}
excludes: ${{inputs.excludes}}
includes: ${{inputs.includes}}
clippy:
if: >
!failure() && !cancelled()
&& inputs.cargo_profiles
name: Clippy
uses: ./.github/workflows/bake.yml
with:
bake_targets: '["clippy"]'
cargo_profiles: ${{inputs.cargo_profiles}}
feat_sets: ${{inputs.feat_sets}}
rust_toolchains: ${{inputs.rust_toolchains}}
sys_names: ${{inputs.sys_names}}
sys_versions: ${{inputs.sys_versions}}
rust_targets: ${{inputs.rust_targets}}
sys_targets: ${{inputs.sys_targets}}
machines: ${{inputs.machines}}
excludes: ${{inputs.excludes}}
includes: ${{inputs.includes}}