Add rpm package to workflow.

Improve workflows.

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk
2025-05-08 02:58:57 +00:00
parent 8bfe63d45f
commit aa27ab855b
11 changed files with 260 additions and 47 deletions

View File

@@ -38,13 +38,13 @@ on:
jobs:
fmt:
if: ${{contains(fromJSON(inputs.cargo_profiles), fromJSON('["test"]')[0]) && contains(fromJSON(inputs.feat_sets), fromJSON('["none"]')[0]) && contains(fromJSON(inputs.rust_toolchains), fromJSON('["nightly"]')[0])}}
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]) }}
name: Format
uses: ./.github/workflows/bake.yml
with:
bake_targets: '["fmt"]'
cargo_profiles: '["test"]'
feat_sets: '["none"]'
feat_sets: '["all"]'
rust_toolchains: '["nightly"]'
rust_targets: ${{inputs.rust_targets}}
sys_names: ${{inputs.sys_names}}
@@ -55,13 +55,13 @@ jobs:
includes: ${{inputs.includes}}
audit:
if: ${{contains(fromJSON(inputs.cargo_profiles), fromJSON('["test"]')[0]) && contains(fromJSON(inputs.feat_sets), fromJSON('["none"]')[0]) && contains(fromJSON(inputs.rust_toolchains), fromJSON('["nightly"]')[0])}}
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]) }}
name: Audit
uses: ./.github/workflows/bake.yml
with:
bake_targets: '["audit"]'
cargo_profiles: '["test"]'
feat_sets: '["none"]'
feat_sets: '["all"]'
rust_toolchains: '["nightly"]'
sys_names: ${{inputs.sys_names}}
sys_versions: ${{inputs.sys_versions}}
@@ -72,13 +72,13 @@ jobs:
includes: ${{inputs.includes}}
lychee:
if: ${{contains(fromJSON(inputs.cargo_profiles), fromJSON('["test"]')[0]) && contains(fromJSON(inputs.feat_sets), fromJSON('["none"]')[0]) && contains(fromJSON(inputs.rust_toolchains), fromJSON('["nightly"]')[0])}}
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])}}
name: Lychee
uses: ./.github/workflows/bake.yml
with:
bake_targets: '["lychee"]'
cargo_profiles: '["test"]'
feat_sets: '["none"]'
feat_sets: '["all"]'
rust_toolchains: '["nightly"]'
sys_names: ${{inputs.sys_names}}
sys_versions: ${{inputs.sys_versions}}
@@ -89,7 +89,7 @@ jobs:
includes: ${{inputs.includes}}
clippy:
if: ${{ always() }}
if: ${{ !failure() && !cancelled() }}
name: Clippy
needs: [fmt, audit, lychee]
uses: ./.github/workflows/bake.yml
@@ -107,7 +107,7 @@ jobs:
includes: ${{inputs.includes}}
doc:
if: ${{contains(fromJSON(inputs.cargo_profiles), fromJSON('["test"]')[0]) && contains(fromJSON(inputs.rust_toolchains), fromJSON('["nightly"]')[0])}}
if: ${{ !failure() && !cancelled() && contains(fromJSON(inputs.cargo_profiles), fromJSON('["test"]')[0]) && contains(fromJSON(inputs.rust_toolchains), fromJSON('["nightly"]')[0]) }}
name: Docs
needs: [clippy]
uses: ./.github/workflows/bake.yml

View File

@@ -18,7 +18,7 @@ env:
jobs:
deps:
if: ${{vars.CI_VERBOSE_DEPS || false}}
if: ${{ vars.CI_VERBOSE_DEPS || false }}
name: Deps
uses: ./.github/workflows/deps.yml
with:
@@ -32,7 +32,7 @@ jobs:
machines: ${{vars.MACHINES}}
lint:
if: ${{ always() && !cancelled() }}
if: ${{ !failure() && !cancelled() }}
name: Lint
needs: [deps]
uses: ./.github/workflows/lint.yml
@@ -47,7 +47,7 @@ jobs:
machines: ${{vars.MACHINES}}
test:
if: ${{ always() && !cancelled() }}
if: ${{ !failure() && !cancelled() }}
name: Test
needs: [lint]
uses: ./.github/workflows/test.yml
@@ -63,7 +63,7 @@ jobs:
complement: true
package:
if: ${{ always() && !cancelled() }}
if: ${{ !failure() && !cancelled() }}
name: Package
needs: [test]
uses: ./.github/workflows/package.yml
@@ -76,3 +76,18 @@ jobs:
rust_targets: ${{vars.RUST_TARGETS}}
sys_targets: ${{vars.sys_TARGETS}}
machines: ${{vars.MACHINES}}
publish:
if: ${{ !failure() && !cancelled() }}
name: Publish
needs: [package]
uses: ./.github/workflows/publish.yml
with:
cargo_profiles: '["release"]'
feat_sets: ${{vars.FEAT_SETS}}
rust_toolchains: '["stable"]'
sys_names: ${{vars.SYS_NAMES}}
sys_versions: ${{vars.SYS_VERSIONS}}
rust_targets: ${{vars.RUST_TARGETS}}
sys_targets: ${{vars.sys_TARGETS}}
machines: ${{vars.MACHINES}}

View File

@@ -39,12 +39,13 @@ on:
jobs:
deb:
if: ${{ !failure() && !cancelled() && contains(fromJSON(inputs.feat_sets), fromJSON('["all"]')[0]) }}
name: Deb
uses: ./.github/workflows/bake.yml
with:
bake_targets: '["pkg-deb-install"]'
cargo_profiles: ${{inputs.cargo_profiles}}
feat_sets: ${{inputs.feat_sets}}
feat_sets: '["all"]'
rust_toolchains: ${{inputs.rust_toolchains}}
sys_names: ${{inputs.sys_names}}
sys_versions: ${{inputs.sys_versions}}
@@ -55,30 +56,13 @@ jobs:
includes: ${{inputs.includes}}
rpm:
if: false
if: ${{ !failure() && !cancelled() && contains(fromJSON(inputs.feat_sets), fromJSON('["all"]')[0]) }}
name: RPM
uses: ./.github/workflows/bake.yml
with:
bake_targets: '["pkg-rpm-install"]'
bake_targets: '["pkg-rpm"]'
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}}
dockerhub:
if: ${{github.ref == 'refs/heads/main'}}
name: DockerHub
uses: ./.github/workflows/bake.yml
with:
bake_targets: '["dockerhub"]'
cargo_profiles: ${{inputs.cargo_profiles}}
feat_sets: ${{inputs.feat_sets}}
feat_sets: '["all"]'
rust_toolchains: ${{inputs.rust_toolchains}}
sys_names: ${{inputs.sys_names}}
sys_versions: ${{inputs.sys_versions}}

73
.github/workflows/publish.yml vendored Normal file
View File

@@ -0,0 +1,73 @@
name: Publish
on:
workflow_call:
inputs:
cargo_profiles:
type: string
default: '["release"]'
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:
dockerhub:
if: ${{ !failure() && !cancelled() && github.ref == 'refs/heads/main' }}
name: DockerHub
uses: ./.github/workflows/bake.yml
with:
bake_targets: '["dockerhub"]'
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}}
ghcr:
if: ${{ !failure() && !cancelled() && github.ref == 'refs/heads/main' }}
name: GitHub Container Registry
uses: ./.github/workflows/bake.yml
with:
bake_targets: '["github"]'
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}}

View File

@@ -70,7 +70,7 @@ jobs:
rust_targets: ${{inputs.rust_targets}}
sys_targets: ${{inputs.sys_targets}}
machines: ${{inputs.machines}}
excludes: '[{"cargo_profile": "release", "rust_toolchain": "nightly"}, {"feat_set": "default"}]'
excludes: '[{"cargo_profile": "release", "rust_toolchain": "nightly"}, {"cargo_profile": "test", "feat_set": "default"}]'
includes: ${{inputs.includes}}
complement_tester: