Modify dependency strategy for sanitizer workflows in GitHub CI Actions#3218
Merged
Conversation
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.
The sanitizer workflows (UBSAN and ASAN) for the GitHub CI Actions are currently failing with the error:
checking for hdf5... Package hdf5 was not found in the pkg-config search path.The root cause of this error is the
dpkg -irestore strategy on cache hit. Here's the problem:apt-get installproperly installslibhdf5-devand all its dependencies. Only the.debfiles present in/var/cache/apt/archives/are copied to~/apt-cache/— but packages already installed on the runner image aren't re-downloaded, so their.debfiles are never cached.dpkg -i ~/apt-cache/*.debtries to install the cached subset of packages, and2>/dev/null || truesilently suppresses dependency errors. The "Install Dependencies" step is skipped entirely, so any missing packages — like HDF5 dependencies that were pre-installed on the original image but removed in a newer image — are never installed.libhdf5-dev(or a dependency it needs to register its.pcfile) is missing, sopkg-config --cflags hdf5fails during./configure.The fix: Always run
apt-get installfor proper dependency resolution, but pre-populate apt's local archive from cache so it doesn't re-download packages that are already cached.