Skip to content

Generate stagings and packages#5

Open
alexadereyko wants to merge 9 commits into
ci/stagingfrom
jira/TBBAS-3291-generate-stagings
Open

Generate stagings and packages#5
alexadereyko wants to merge 9 commits into
ci/stagingfrom
jira/TBBAS-3291-generate-stagings

Conversation

@alexadereyko

@alexadereyko alexadereyko commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator

Summary

Add staging and packaging to the reusable workflow: generate component stagings and native installers via CPack presets, consume dependency stagings, and build specific targets. Builds on #4 (the hello vehicle), which drives the new test-staging workflow end to end.

Changes

  • cpack-presets input. Per job, generates CPack packagePresets — a hidden base inherited by <job>-staging (TGZ) and/or <job>-package (native installer: DEB / NSIS / productbuild). variables carry CPack settings (e.g. component scoping); package-preset lets the base inherit a project preset. Uploaded as staging-<job> / package-<job>, excluding the cpack temp dir.
  • packages artifacts field. Downloads and extracts dependency stagings before configure, so a build resolves them via find_package / CMAKE_PREFIX_PATH instead of rebuilding.
  • cmake-presets build-targets. Builds only the listed targets (e.g. a single wrapper) by setting the build preset's targets.
  • Staging metadata in the job summary. Renders each staging-meta.json into the GitHub job summary; the failure summary lists the stage/package reproduction commands.
  • test-staging workflow. Drives the full scenario on Linux/Windows/macOS: stage-core produces the core staging + installer, stage-module consumes it and produces the module staging + installer (component-scoped).
  • README. Documents the new inputs and usage (Build Stagings and Installers, Consume Stagings).

@alexadereyko alexadereyko self-assigned this Jun 24, 2026
@alexadereyko alexadereyko force-pushed the jira/TBBAS-3291-generate-stagings branch 7 times, most recently from b2e41d2 to ead42e6 Compare June 25, 2026 07:20
After Build, run cpack -G TGZ and upload the tarball together with
staging-meta.json as the staging-<job> artifact.
Staging is a tarball of the build binaries meant for dependent projects: they
consume the prebuilt output (via find_package) instead of rebuilding it every
time. Packaging is for the cases that need a native package -- DEB, NSIS, PKG.

Both are driven by the `packaging` input -- a JSON array of objects, resolved
per job (last-match-wins), each with:
- match-jobs: job-name patterns the object applies to;
- enable-staging: enables generation of the staging tarball (default false when
  omitted);
- package: the cpack generator name used to build the package (when omitted, no
  package is generated).

Staging and packaging are uploaded as the staging-<job> and package-<job>
artifacts of the workflow.
Pull dependency staging artifacts named in packages.artifacts (* -> job
name) and extract each into its dir before configure, so a build resolves
them via find_package / CMAKE_PREFIX_PATH. Pass cmake-presets.build-targets
into buildPresets.targets and packaging.variables into the staging
packagePreset, so a caller can scope the build to a target and the staging
to a CPack component.
stage-core builds only the hello-core target and stages the core
component; stage-module pulls that staging from the same run, resolves
hello-core via find_package, and stages the module component.

Drop the now-redundant staging packaging from test-reusable -- the new
workflow covers the staging scenario.
When a job produces a staging, render its staging-meta.json into the
GitHub job summary so the package metadata is visible in the UI. The
summary step now always runs: metadata on staging builds, the existing
reproduction block on failure.
Rename the packaging input to cpack-presets, mirroring the cmake-presets
input. Per job, generate a hidden packagePreset named after the job;
depending on the entry fields it gains up to two inheritors, <job>-staging
(TGZ) and <job>-package (native installer). An optional package-preset
field names a project packagePreset for the hidden base to inherit.
stage-core and stage-module also request a native installer per OS (DEB,
NSIS, productbuild), scoped to the built component; NSIS is installed via
choco on Windows.
@alexadereyko alexadereyko force-pushed the jira/TBBAS-3291-generate-stagings branch from ead42e6 to 02f9cd3 Compare June 25, 2026 07:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant