Skip to content

Modify dependency strategy for sanitizer workflows in GitHub CI Actions#3218

Merged
oskooi merged 1 commit into
NanoComp:masterfrom
oskooi:san_ci_fix
May 18, 2026
Merged

Modify dependency strategy for sanitizer workflows in GitHub CI Actions#3218
oskooi merged 1 commit into
NanoComp:masterfrom
oskooi:san_ci_fix

Conversation

@oskooi
Copy link
Copy Markdown
Collaborator

@oskooi oskooi commented May 18, 2026

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 -i restore strategy on cache hit. Here's the problem:

  1. On cache miss (first run): apt-get install properly installs libhdf5-dev and all its dependencies. Only the .deb files 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 .deb files are never cached.
  2. On cache hit (subsequent runs): The runner image may have changed (Ubuntu updates the image periodically), but the cache key only hashes the workflow file, not the runner image. dpkg -i ~/apt-cache/*.deb tries to install the cached subset of packages, and 2>/dev/null || true silently 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.
  3. The result: libhdf5-dev (or a dependency it needs to register its .pc file) is missing, so pkg-config --cflags hdf5 fails during ./configure.

The fix: Always run apt-get install for proper dependency resolution, but pre-populate apt's local archive from cache so it doesn't re-download packages that are already cached.

@oskooi oskooi added the bug label May 18, 2026
@oskooi oskooi merged commit eb2575f into NanoComp:master May 18, 2026
5 checks passed
@oskooi oskooi deleted the san_ci_fix branch May 18, 2026 04:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant