Commit ecafc8c
committed
ci: share compiled classes across jobs via artifact
Eight jobs (build + 6 test + coverage_report) were each running their
own ./gradlew compile chain on the same SHA, which is wasteful and was
also the proximate cause of the silent Coveralls failure: the
coverage_report job had no .class files at all because it never ran
compileJava, so JaCoCo emitted a report with only <sessioninfo> and
zero <package> entries, and coverallsJacoco short-circuited via its
"source file set empty, skipping" branch.
Compile once in the build job, upload **/build/classes/, generated/,
and resources/ as a "compiled-classes" artifact (1-day retention),
and download it in every dependent job before running tests or
coverageReportOnly. Test jobs still invoke ./gradlew test; gradle's
UP-TO-DATE check on the unchanged .java inputs picks up the restored
outputs and skips the compile tasks. The coverage_report job now has
real bytecode for JaCoCo to map exec data against, so the Coveralls
upload actually contains source-file coverage.
Verified locally that running coverageReportOnly with no .class files
produces a 750-byte XML with only <sessioninfo>, while running it
after compileJava (or with restored classes) produces a 1.1 MB XML
with 54 <package> entries — matching the difference between CI's
broken report and a healthy local one.
Assisted-By: Claude Code1 parent 1e0ccf7 commit ecafc8c
1 file changed
Lines changed: 45 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
65 | 76 | | |
66 | 77 | | |
67 | 78 | | |
| |||
86 | 97 | | |
87 | 98 | | |
88 | 99 | | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
89 | 105 | | |
90 | 106 | | |
91 | 107 | | |
| |||
138 | 154 | | |
139 | 155 | | |
140 | 156 | | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
141 | 162 | | |
142 | 163 | | |
143 | 164 | | |
| |||
190 | 211 | | |
191 | 212 | | |
192 | 213 | | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
193 | 219 | | |
194 | 220 | | |
195 | 221 | | |
| |||
260 | 286 | | |
261 | 287 | | |
262 | 288 | | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
263 | 294 | | |
264 | 295 | | |
265 | 296 | | |
| |||
314 | 345 | | |
315 | 346 | | |
316 | 347 | | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
317 | 353 | | |
318 | 354 | | |
319 | 355 | | |
| |||
382 | 418 | | |
383 | 419 | | |
384 | 420 | | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
385 | 426 | | |
386 | 427 | | |
387 | 428 | | |
| |||
445 | 486 | | |
446 | 487 | | |
447 | 488 | | |
448 | | - | |
449 | | - | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
450 | 493 | | |
451 | 494 | | |
452 | 495 | | |
| |||
0 commit comments