CPack: CI test and git revision embedding for source archives#43
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds CI verification of the source archive and embeds the git revision into it.
source_archiveCI job that packages a source archive withcpack --preset source, then builds and runs the examples against the extracted archive to verify it is self-contained.HEADrevision into the archive as aGIT_REVISIONfile (viaCPACK_SOURCE_INSTALLED_DIRECTORIESfrom a build-time-generated extras directory), so consumers can trace which commit a vendored archive came from.CPACK_SOURCE_GENERATORfromCMakeLists.txt; the package preset'sgeneratorsfield already declaresTGZandZIP.Related Issues
Fixes # (issue number)
Type of Change
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:
Checklist
docs/for any user-facing changes.mu::tinynamespace,INCLUDED_MUTINY_guards,mutiny_C-prefix)..hand.c.cpp) is required for parity.CONTRIBUTING.mdfile to ensure compliance with architectural guidelines.