ci(nightly-tests): set CC/CXX to clang to match test-suite#34
Merged
Conversation
The two workflows share the moonrepo/setup-rust cache (keyed setup-rustcargo-v1-linux-*). nightly-tests inherits the runner's default gcc/g++, so its cache entry for leveldb-sys is built with a different toolchain than test-suite, which sets CC=clang/CXX=clang++. When test-suite restores the poisoned cache on a PR run, cmake detects the compiler change, invalidates its subdir, rebuilds leveldb-sys, and re-runs its install target — which tries to write /usr/local/lib/ libleveldb.a without sudo and fails with permission denied, taking out every downstream job in the matrix. Mirror test-suite's CC/CXX/CXXFLAGS in nightly-tests so both workflows produce compatible cache entries.
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.
Issue Addressed
PR #33's CI failed with every test-suite job dying on
leveldb-sys:Root Cause
test-suite.ymlsetsCC: clang/CXX: clang++in its top-level env.nightly-tests.ymldoes not — so the scheduled nightly run buildsleveldb-syswith the runner's defaultgcc/g++and populates the sharedmoonrepo/setup-rustcache (key prefixsetup-rustcargo-v1-linux-*, shared across workflows on the same branch).When a PR triggers
test-suiteand restores that cache, cmake sees the compiler mismatch, invalidates its own build subdir, and re-runscmake --build --target installwhich tries to write/usr/local/lib/libleveldb.awithout sudo — permission denied — taking out every downstream job in the matrix.Proposed Changes
Mirror
test-suite.yml'sCC/CXX/CXXFLAGSinnightly-tests.ymlso both workflows populate the shared cache with compatible toolchain artifacts.Additional Info
Existing poisoned caches need to be cleared once (via UI or
gh cache delete) for this fix to take effect on the first run; I've already cleared them.