ci: Add some sanity conditions for skips; formatting
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
9
.github/workflows/bake.yml
vendored
9
.github/workflows/bake.yml
vendored
@@ -5,7 +5,6 @@ on:
|
|||||||
inputs:
|
inputs:
|
||||||
bake_targets:
|
bake_targets:
|
||||||
type: string
|
type: string
|
||||||
default: '["default"]'
|
|
||||||
description: Bake Matrix
|
description: Bake Matrix
|
||||||
cargo_profiles:
|
cargo_profiles:
|
||||||
type: string
|
type: string
|
||||||
@@ -58,7 +57,13 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
bake:
|
bake:
|
||||||
if: ${{ !failure() && !cancelled() && fromJSON(inputs.machines)[0] != null }}
|
if: >
|
||||||
|
${{
|
||||||
|
!failure() && !cancelled()
|
||||||
|
&& fromJSON(inputs.machines)[0] != null
|
||||||
|
&& fromJSON(inputs.bake_targets)[0] != null
|
||||||
|
}}
|
||||||
|
|
||||||
name: >
|
name: >
|
||||||
${{matrix.bake_target}}
|
${{matrix.bake_target}}
|
||||||
${{matrix.cargo_profile}}
|
${{matrix.cargo_profile}}
|
||||||
|
|||||||
1
.github/workflows/lint.yml
vendored
1
.github/workflows/lint.yml
vendored
@@ -133,6 +133,7 @@ jobs:
|
|||||||
if: >
|
if: >
|
||||||
${{
|
${{
|
||||||
!failure() && !cancelled()
|
!failure() && !cancelled()
|
||||||
|
&& inputs.cargo.profiles
|
||||||
}}
|
}}
|
||||||
name: Clippy
|
name: Clippy
|
||||||
uses: ./.github/workflows/bake.yml
|
uses: ./.github/workflows/bake.yml
|
||||||
|
|||||||
1
.github/workflows/package.yml
vendored
1
.github/workflows/package.yml
vendored
@@ -5,7 +5,6 @@ on:
|
|||||||
inputs:
|
inputs:
|
||||||
cargo_profiles:
|
cargo_profiles:
|
||||||
type: string
|
type: string
|
||||||
default: '["release"]'
|
|
||||||
description: Cargo profiles
|
description: Cargo profiles
|
||||||
feat_sets:
|
feat_sets:
|
||||||
type: string
|
type: string
|
||||||
|
|||||||
2
.github/workflows/publish.yml
vendored
2
.github/workflows/publish.yml
vendored
@@ -5,7 +5,6 @@ on:
|
|||||||
inputs:
|
inputs:
|
||||||
cargo_profiles:
|
cargo_profiles:
|
||||||
type: string
|
type: string
|
||||||
default: '["release"]'
|
|
||||||
description: Cargo profiles
|
description: Cargo profiles
|
||||||
feat_sets:
|
feat_sets:
|
||||||
type: string
|
type: string
|
||||||
@@ -48,6 +47,7 @@ jobs:
|
|||||||
if: >
|
if: >
|
||||||
${{
|
${{
|
||||||
!failure() && !cancelled()
|
!failure() && !cancelled()
|
||||||
|
&& inputs.machines
|
||||||
&& inputs.docker_repo
|
&& inputs.docker_repo
|
||||||
&& github.ref == 'refs/heads/main'
|
&& github.ref == 'refs/heads/main'
|
||||||
}}
|
}}
|
||||||
|
|||||||
33
.github/workflows/test.yml
vendored
33
.github/workflows/test.yml
vendored
@@ -44,7 +44,12 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
unit:
|
unit:
|
||||||
if: ${{contains(fromJSON(inputs.cargo_profiles), fromJSON('["test"]')[0]) && contains(fromJSON(inputs.feat_sets), fromJSON('["all"]')[0]) && contains(fromJSON(inputs.rust_toolchains), fromJSON('["nightly"]')[0])}}
|
if: >
|
||||||
|
${{
|
||||||
|
contains(fromJSON(inputs.cargo_profiles), fromJSON('["test"]')[0])
|
||||||
|
&& contains(fromJSON(inputs.feat_sets), fromJSON('["all"]')[0])
|
||||||
|
&& contains(fromJSON(inputs.rust_toolchains), fromJSON('["nightly"]')[0])
|
||||||
|
}}
|
||||||
name: Unit
|
name: Unit
|
||||||
uses: ./.github/workflows/bake.yml
|
uses: ./.github/workflows/bake.yml
|
||||||
with:
|
with:
|
||||||
@@ -61,6 +66,7 @@ jobs:
|
|||||||
includes: ${{inputs.includes}}
|
includes: ${{inputs.includes}}
|
||||||
|
|
||||||
smoke:
|
smoke:
|
||||||
|
if: inputs.cargo_profiles
|
||||||
name: Smoke
|
name: Smoke
|
||||||
uses: ./.github/workflows/bake.yml
|
uses: ./.github/workflows/bake.yml
|
||||||
with:
|
with:
|
||||||
@@ -73,11 +79,24 @@ jobs:
|
|||||||
rust_targets: ${{inputs.rust_targets}}
|
rust_targets: ${{inputs.rust_targets}}
|
||||||
sys_targets: ${{inputs.sys_targets}}
|
sys_targets: ${{inputs.sys_targets}}
|
||||||
machines: ${{inputs.machines}}
|
machines: ${{inputs.machines}}
|
||||||
excludes: '[{"cargo_profile": "release", "rust_toolchain": "nightly"}, {"cargo_profile": "release-debuginfo", "rust_toolchain": "nightly"}, {"cargo_profile": "test", "feat_set": "default"}, {"cargo_profile": "release-max-perf", "rust_toolchain": "stable"}, {"cargo_profile": "release-max-perf", "feat_set": "none"}]'
|
|
||||||
includes: ${{inputs.includes}}
|
includes: ${{inputs.includes}}
|
||||||
|
excludes: >
|
||||||
|
[
|
||||||
|
{"cargo_profile": "test", "feat_set": "default"},
|
||||||
|
{"cargo_profile": "release", "rust_toolchain": "nightly"},
|
||||||
|
{"cargo_profile": "release-debuginfo", "rust_toolchain": "nightly"},
|
||||||
|
{"cargo_profile": "release-max-perf", "rust_toolchain": "stable"},
|
||||||
|
{"cargo_profile": "release-max-perf", "feat_set": "none"}
|
||||||
|
]
|
||||||
|
|
||||||
complement:
|
complement:
|
||||||
if: ${{inputs.complement && contains(fromJSON(inputs.cargo_profiles), fromJSON('["test"]')[0]) && contains(fromJSON(inputs.feat_sets), fromJSON('["all"]')[0]) && contains(fromJSON(inputs.rust_toolchains), fromJSON('["nightly"]')[0])}}
|
if: >
|
||||||
|
${{
|
||||||
|
inputs.complement
|
||||||
|
&& contains(fromJSON(inputs.cargo_profiles), fromJSON('["test"]')[0])
|
||||||
|
&& contains(fromJSON(inputs.feat_sets), fromJSON('["all"]')[0])
|
||||||
|
&& contains(fromJSON(inputs.rust_toolchains), fromJSON('["nightly"]')[0])
|
||||||
|
}}
|
||||||
name: Complement
|
name: Complement
|
||||||
uses: ./.github/workflows/bake.yml
|
uses: ./.github/workflows/bake.yml
|
||||||
with:
|
with:
|
||||||
@@ -94,7 +113,13 @@ jobs:
|
|||||||
includes: ${{inputs.includes}}
|
includes: ${{inputs.includes}}
|
||||||
|
|
||||||
compliance:
|
compliance:
|
||||||
if: ${{inputs.complement && contains(fromJSON(inputs.cargo_profiles), fromJSON('["test"]')[0]) && contains(fromJSON(inputs.feat_sets), fromJSON('["all"]')[0]) && contains(fromJSON(inputs.rust_toolchains), fromJSON('["nightly"]')[0])}}
|
if: >
|
||||||
|
${{
|
||||||
|
inputs.complement
|
||||||
|
&& contains(fromJSON(inputs.cargo_profiles), fromJSON('["test"]')[0])
|
||||||
|
&& contains(fromJSON(inputs.feat_sets), fromJSON('["all"]')[0])
|
||||||
|
&& contains(fromJSON(inputs.rust_toolchains), fromJSON('["nightly"]')[0])
|
||||||
|
}}
|
||||||
name: Matrix Compliance
|
name: Matrix Compliance
|
||||||
needs: [complement]
|
needs: [complement]
|
||||||
runs-on: ${{matrix.machine}}
|
runs-on: ${{matrix.machine}}
|
||||||
|
|||||||
Reference in New Issue
Block a user