ci: set constant $SOURCE_DATE_EPOCH
#1900
Merged
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.
The CI currently tries to figure out the last modification time of the source code for reproducibility. We use this value in the following ways:
We really need this figure to be exact; when we check whether awkward-cpp has been released, we do this as safely as possible by building an sdist and comparing the SHA256. Of course, if any generated timestamps are different, the checksums will not agree.
There is no single notion of what the "last modified" time of the source should be; really, the generated C++ tests should use the modification time of the kernel specification/data, whereas the awkward-cpp package should use the last commit of anything inside the subdirectory. Needless to say, to properly support all of this, we would
SOURCE_DATE_EPOCH
, and set it to a constant value.This PR started with option (2) to make
SOURCE_DATE_EPOCH
constant in every workflow. However, (1) is feasible, and the fix is to just download the entire repository history in a single job. We do not need to do this for thebuild-test
workflow, which doesn't need an accurate value forSOURCE_DATE_EPOCH
; the build cache just needs a stable timestamp.📚 The documentation for this PR will be available at https://awkward-array.readthedocs.io/en/agoose77-ci-simplify-source-date-epoch/ once Read the Docs has finished building 🔨