Skip to content

CPack: CI test and git revision embedding for source archives#43

Merged
thetic merged 3 commits into
mainfrom
ci/source-archive-test
Apr 7, 2026
Merged

CPack: CI test and git revision embedding for source archives#43
thetic merged 3 commits into
mainfrom
ci/source-archive-test

Conversation

@thetic
Copy link
Copy Markdown
Owner

@thetic thetic commented Apr 7, 2026

Description

Adds CI verification of the source archive and embeds the git revision into it.

  • Adds a source_archive CI job that packages a source archive with cpack --preset source, then builds and runs the examples against the extracted archive to verify it is self-contained.
  • Embeds the git HEAD revision into the archive as a GIT_REVISION file (via CPACK_SOURCE_INSTALLED_DIRECTORIES from a build-time-generated extras directory), so consumers can trace which commit a vendored archive came from.
  • Removes the redundant CPACK_SOURCE_GENERATOR from CMakeLists.txt; the package preset's generators field already declares TGZ and ZIP.

Related Issues

Fixes # (issue number)

Type of Change

  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

Manual Verification (Optional)

If you have verified this change on hardware or a simulator not covered by CI (e.g., a specific ARM target), please describe it here:

  • Target:
  • Result:

Checklist

  • I have written/updated documentation in docs/ for any user-facing changes.
  • My code follows the project's naming conventions (mu::tiny namespace, INCLUDED_MUTINY_ guards, mutiny_ C-prefix).
  • For new features, I have considered if a C-interface adapter (.h and .c.cpp) is required for parity.
  • I have reviewed the CONTRIBUTING.md file to ensure compliance with architectural guidelines.

thetic added 3 commits April 6, 2026 18:23
Adds a CI job that generates the source archive with CPack, extracts
it, and builds the examples sub-project against the extracted tree
using FETCHCONTENT_SOURCE_DIR_MUTINY. Closes #42.
Captures the HEAD commit hash at configure time and writes it to
GIT_REVISION, which is merged into the root of the source archive
via CPACK_SOURCE_INSTALLED_DIRECTORIES.
The package preset already specifies generators via the `generators`
field; setting CPACK_SOURCE_GENERATOR in CMakeLists.txt is redundant.
@coveralls
Copy link
Copy Markdown

Coverage Status

coverage: 98.971%. remained the same — ci/source-archive-test into main

@thetic thetic merged commit b181672 into main Apr 7, 2026
40 checks passed
@thetic thetic deleted the ci/source-archive-test branch April 7, 2026 03:34
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.

2 participants