ci: fix Ubuntu Noble compatibility & optimize CI pipeline#71
Merged
SizzleUnrlsd merged 12 commits intoApr 22, 2026
Merged
Conversation
…cally decrease CI runtime
This reverts commit 70f2256.
Contributor
Author
|
Fix redundant CI job cancellations — ci.yml Problem: GitHub Actions triggered two duplicate pipeline runs on every push (one for Solution: Removed the explicit branch reference from the |
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.
Context
CI jobs on
ubuntu-latestwere experiencing extreme slowdowns (tens of minutes or outright timeouts). Investigation traced the root cause to three independent bottlenecks.Changes
1. Fix LLVM/APT repository for Ubuntu Noble —
ci.ymlProblem: The workflow hardcoded the
jammyAPT repository for LLVM, whileubuntu-latestnow runs Ubuntu 24.04 (Noble). This forcedaptto compute endless downgrade paths and resolvelibcconflicts, taking several minutes.Solution: Replaced the hardcoded
jammystring with$(lsb_release -cs). The target repository now adapts dynamically to the runner's actual OS version.2. Repair and optimize test caching —
run_test.py,ci.ymlProblem (run_test cache): The cache invalidation key relied on
st_mtime_ns(file modification timestamp). Every CI build recompiled the binary, generating a new timestamp and silently invalidating the entire cache on every run. Noactions/cachestep persisted it between runs.Problem (IR cache): Clang re-parsed all source files and standard headers (
<vector>,<iostream>, …) from scratch for each of the 1,661 tests.Solution:
actions/cache@v4steps for both therun_testdirectory and the new Clang IR cache (--compile-ir-cache-dir=.cache/compile-irviaEXTRA_ANALYZER_ARGS). The expensive Clang parsing cost is now paid only once.3. Parallelize
run_code_analysis.py(Self-analysis)Problem: The Self-analysis step (~4 min 55 s observed) ran on a single thread via a sequential
subprocess.run()loop, leaving all other CPU cores idle.Solution: Implemented multi-threading via
concurrent.futures.ThreadPoolExecutor. The workload is split into balanced chunks based onos.cpu_count(). JSON diagnostics and SARIF reports are processed in parallel and merged at the end.