Commit 62f0acf
committed
[ci] Make the LLVM/Cling cache leaner and the cling prefix readable.
Six tied-together hygiene fixes on the cache and Build_LLVM action.
None of them is individually large enough to ship alone; together
they shrink the cached artifact, fix a latent WASM trim bug, clean
up the cling part of the cache key, and unblock the parallel
ROOT-integration work which needs `clangInterpreter` and the
source-tree `lib/` drop.
Source-tree shrink. `Build_LLVM` and `Build_LLVM_WASM` were keeping
the source `lib/` dirs of `llvm-project/{llvm,clang}` in the cache
even though nothing on the consumer include path references them
(`Build_and_Test_CppInterOp/action.yml` only adds `llvm/include` and
`clang/include` to `CPLUS_INCLUDE_PATH`) and ROOT with `builtin_*=OFF`
links the pre-built `.a` files instead of recompiling. Drop them
from the keep-lists. Estimated savings ~50-100 MB compressed per
cache row, ~1-1.5 GB across the pool.
Build a leaner LLVM. The cling cmake call gains
`-DLLVM_INCLUDE_BENCHMARKS=OFF -DLLVM_INCLUDE_EXAMPLES=OFF`,
mirroring the repl branch. These suppress targets that never end
up in the cache but cost configure time and incremental dependency
tracking. Notably we do NOT pass `-DLLVM_INCLUDE_TESTS=OFF` here:
cling's `CMakeLists.txt:437-452` builds its runtime
`CLING_INCLUDE_PATHS` (used by `CIFactory.cpp` to find
`cling/Interpreter/RuntimeUniverse.h` at runtime) inside an
`if(CLING_INCLUDE_TESTS)` block, and `CLING_INCLUDE_TESTS` defaults
to `${LLVM_INCLUDE_TESTS}`. Disabling it leaves the path list
empty, so cling at runtime cannot locate its own headers. The repl
branch (LLVM_INCLUDE_TESTS=OFF, no cling) is unaffected.
Add `clangInterpreter` to the cling ninja line. ROOT's bundled
`interpreter/cling/lib/Interpreter/CMakeLists.txt:14` lists
`clangInterpreter` in its `LIBS`, but cling v1.3 (the version we
cache against) does not. Without it, downstream consumers that
rebuild ROOT's bundled cling fail at link with `libclangInterpreter.a
... missing and no known rule to make it`: the imported target from
`ClangTargets.cmake` points at a file that was never built. The
Build_LLVM trim deletes the top-level `llvm/CMakeLists.txt`, so the
lib cannot be ninja'd later from the cached build -- it must be
built here.
Fix Build_LLVM_WASM source-trim. The Linux block's `find` was
missing its closing `)`, leaving the substitution unterminated and
swallowing the next half-dozen lines. Cling-on-WASM trims have been
broken since the action was last refactored; correct on its own
merits and required for the source-`lib/` shrink to actually take
effect on the WASM side.
Quote `cling: 'On'` on all matrix rows. YAML 1.1 parsers (notably
nektos/act) interpret bare `On` as boolean true; the upper-cased
comparison in Save_PR_Info against the literal string `"ON"` then
fails, the row gets `CLING_HASH=Repl`, and the cache key drifts off
real CI. GitHub Actions own parser preserves bare `On` as a string,
so real CI was unaffected; quoting eliminates the act-only
divergence.
CLING_HASH and LLVM_HASH cleanup. The previous values embedded
`git ls-remote` internals verbatim: `tr '\t' '-'` on the
`<sha>\t<ref>` line produced `<40-char-sha>-refs/tags/v1.3` -- a
60-char string with a refspec prefix that nothing downstream wants
in a cache key. Save_PR_Info now extracts the SHA via
`awk '{print $1}'`, truncates to 8 chars, and prefixes a readable
label, giving `cling-v1.3-c2beed49`. The cache-key formula in
`main.yml` is left as-is, so non-cling rows (`CLING_HASH=Repl`) keep
hitting their existing cache entries; only cling rows are
invalidated by the new prefix.
Save_PR_Info is also converted to LF line endings (it was the only
CRLF file in the action set, which made every prior diff to the
file noisy with `^M`).1 parent 674ac58 commit 62f0acf
4 files changed
Lines changed: 115 additions & 76 deletions
File tree
- .github
- actions
- Build_LLVM_WASM
- Build_LLVM
- Miscellaneous/Save_PR_Info
- workflows
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
| 37 | + | |
36 | 38 | | |
37 | 39 | | |
38 | 40 | | |
39 | 41 | | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
40 | 52 | | |
41 | 53 | | |
42 | 54 | | |
| |||
74 | 86 | | |
75 | 87 | | |
76 | 88 | | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
77 | 95 | | |
78 | 96 | | |
79 | | - | |
| 97 | + | |
80 | 98 | | |
81 | | - | |
| 99 | + | |
82 | 100 | | |
83 | 101 | | |
84 | 102 | | |
85 | 103 | | |
86 | | - | |
| 104 | + | |
87 | 105 | | |
88 | | - | |
| 106 | + | |
89 | 107 | | |
90 | 108 | | |
91 | 109 | | |
| |||
124 | 142 | | |
125 | 143 | | |
126 | 144 | | |
| 145 | + | |
| 146 | + | |
127 | 147 | | |
128 | 148 | | |
129 | 149 | | |
| 150 | + | |
| 151 | + | |
130 | 152 | | |
131 | 153 | | |
132 | 154 | | |
| |||
146 | 168 | | |
147 | 169 | | |
148 | 170 | | |
| 171 | + | |
149 | 172 | | |
150 | 173 | | |
151 | 174 | | |
152 | | - | |
| 175 | + | |
153 | 176 | | |
154 | | - | |
| 177 | + | |
155 | 178 | | |
156 | 179 | | |
157 | 180 | | |
158 | 181 | | |
159 | 182 | | |
160 | 183 | | |
161 | | - | |
| 184 | + | |
162 | 185 | | |
163 | | - | |
| 186 | + | |
164 | 187 | | |
165 | 188 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
83 | | - | |
84 | | - | |
85 | | - | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
86 | 88 | | |
87 | | - | |
| 89 | + | |
88 | 90 | | |
89 | 91 | | |
90 | 92 | | |
| |||
176 | 178 | | |
177 | 179 | | |
178 | 180 | | |
179 | | - | |
| 181 | + | |
180 | 182 | | |
181 | | - | |
| 183 | + | |
182 | 184 | | |
183 | 185 | | |
184 | 186 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
93 | | - | |
| 93 | + | |
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
110 | | - | |
| 110 | + | |
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
| |||
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
121 | | - | |
| 121 | + | |
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
125 | | - | |
| 125 | + | |
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
| |||
0 commit comments