Skip to content

ci(nightly-tests): set CC/CXX to clang to match test-suite#34

Merged
frisitano merged 1 commit into
optional-proofsfrom
fix/nightly-tests-cache-cc
Apr 20, 2026
Merged

ci(nightly-tests): set CC/CXX to clang to match test-suite#34
frisitano merged 1 commit into
optional-proofsfrom
fix/nightly-tests-cache-cc

Conversation

@frisitano
Copy link
Copy Markdown
Collaborator

Issue Addressed

PR #33's CI failed with every test-suite job dying on leveldb-sys:

You have changed variables that require your cache to be deleted.
  CMAKE_C_COMPILER= /usr/bin/clang
  CMAKE_CXX_COMPILER= /usr/bin/clang++
...
file INSTALL cannot copy file ".../libleveldb.a" to "/usr/local/lib/libleveldb.a": Permission denied.

Root Cause

test-suite.yml sets CC: clang / CXX: clang++ in its top-level env. nightly-tests.yml does not — so the scheduled nightly run builds leveldb-sys with the runner's default gcc/g++ and populates the shared moonrepo/setup-rust cache (key prefix setup-rustcargo-v1-linux-*, shared across workflows on the same branch).

When a PR triggers test-suite and restores that cache, cmake sees the compiler mismatch, invalidates its own build subdir, and re-runs cmake --build --target install which tries to write /usr/local/lib/libleveldb.a without sudo — permission denied — taking out every downstream job in the matrix.

Proposed Changes

Mirror test-suite.yml's CC / CXX / CXXFLAGS in nightly-tests.yml so 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.

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.
@frisitano frisitano merged commit 779e114 into optional-proofs Apr 20, 2026
36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant