ci: Add oci image to pipeline.

ci: Tweak package targets; elim max-perf for containers.

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk
2025-06-04 04:06:46 +00:00
parent c9a6f97174
commit e332d395f9
5 changed files with 68 additions and 27 deletions

View File

@@ -66,6 +66,7 @@ jobs:
bake:
if: >
!failure() && !cancelled()
&& inputs.machines
&& fromJSON(inputs.machines)[0] != null
&& fromJSON(inputs.bake_targets)[0] != null

View File

@@ -141,7 +141,7 @@ jobs:
{"cargo_profile": "release-max-perf", "rust_toolchain": "stable"},
{"cargo_profile": "release-max-perf", "feat_set": "default"},
{"cargo_profile": "release-max-perf", "feat_set": "none"},
{"cargo_profile": "release"}
{"cargo_profile": "release-debuginfo"}
]
package:
@@ -166,9 +166,12 @@ jobs:
{"cargo_profile": "test"},
{"cargo_profile": "release-debuginfo", "feat_set": "default"},
{"cargo_profile": "release-debuginfo", "rust_toolchain": "nightly"},
{"cargo_profile": "release-debuginfo", "bake_target": "oci"},
{"cargo_profile": "release-max-perf", "feat_set": "default"},
{"cargo_profile": "release-max-perf", "rust_toolchain": "stable"},
{"cargo_profile": "release-max-perf", "feat_set": "default"},
{"cargo_profile": "release-max-perf", "bake_target": "docker"},
{"cargo_profile": "release-max-perf", "bake_target": "oci"},
{"cargo_profile": "release", "rust_toolchain": "nightly"}
]

View File

@@ -63,14 +63,14 @@ jobs:
"book": {"dst": "book", "src": "/book"},
}
build_standalone:
binary:
if: >
!failure() && !cancelled()
name: Standalone
name: Binaries
uses: ./.github/workflows/bake.yml
with:
bake_targets: '["standalone", "tuwunel"]'
bake_targets: '["static"]'
cargo_profiles: ${{inputs.cargo_profiles}}
feat_sets: ${{inputs.feat_sets}}
rust_toolchains: ${{inputs.rust_toolchains}}
@@ -83,18 +83,41 @@ jobs:
includes: ${{inputs.includes}}
artifact: >
{
"standalone": {"dst": "tuwunel", "src": "/usr/bin/tuwunel" },
"tuwunel": {"dst": "tuwunel-docker.tar.gz", "img": true }
"static": {"dst": "tuwunel", "src": "/usr/bin/tuwunel" },
}
build_pkgs:
container:
if: >
!failure() && !cancelled()
name: Containers
uses: ./.github/workflows/bake.yml
with:
bake_targets: '["docker", "oci"]'
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}}
artifact: >
{
"docker": {"dst": "tuwunel-docker.tar.gz", "img": true },
"oci": {"dst": "tuwunel-oci.tar.zst", "runner": true }
}
pkgs:
if: >
!failure() && !cancelled()
&& contains(fromJSON(inputs.feat_sets), fromJSON('["all"]')[0])
&& contains(fromJSON(inputs.cargo_profiles), fromJSON('["release"]')[0])
&& contains(fromJSON(inputs.rust_toolchains), fromJSON('["stable"]')[0])
name: Build Pkgs
name: Distro Pkgs
uses: ./.github/workflows/bake.yml
with:
bake_targets: '["pkg-deb", "pkg-rpm"]'
@@ -120,9 +143,10 @@ jobs:
&& contains(fromJSON(inputs.feat_sets), fromJSON('["all"]')[0])
&& contains(fromJSON(inputs.cargo_profiles), fromJSON('["release"]')[0])
&& contains(fromJSON(inputs.rust_toolchains), fromJSON('["stable"]')[0])
&& false
name: Check Pkgs
needs: [build_pkgs]
needs: [pkgs]
uses: ./.github/workflows/bake.yml
with:
bake_targets: '["pkg-deb-install", "pkg-rpm-install"]'

View File

@@ -50,7 +50,7 @@ jobs:
&& inputs.docker_repo != ''
&& github.ref == 'refs/heads/main'
name: Publish containers
name: Containers
runs-on: ${{matrix.machine}}
permissions: write-all
continue-on-error: false