ci: collect LLGo test coverage with Codecov - #854
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #854 +/- ##
==========================================
- Coverage 83.32% 79.11% -4.21%
==========================================
Files 28 28
Lines 2500 1743 -757
==========================================
- Hits 2083 1379 -704
+ Misses 369 364 -5
+ Partials 48 0 -48
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Review: switch LLGo to build-from-main + Codecov coverage
The change is well-structured overall. Path wiring is consistent: go -C .llgo build -o bin/llgo resolves to .llgo/bin/llgo, matching the release-tarball layout, and PATH ($GITHUB_WORKSPACE/.llgo/bin) + LLGO_ROOT ($GITHUB_WORKSPACE/.llgo) line up for both code paths. The Codecov step is well-guarded (github.repository check, !cancelled(), hashFiles presence), and use_oidc correctly restricts OIDC to same-repo events.
Note: xgo-dev/llgo is not new — download-llgo.sh already uses it as the release source, so it is the intended upstream, not a deviation introduced here.
Main themes below: (1) tracking an unpinned main on every run has supply-chain, reproducibility, and CI-cost consequences; (2) the from-source build is now on the hot path uncached and CPU-throttled; (3) a couple of small cleanups.
The LLGo workflow now collects and uploads coverage from the full test suite on macOS and Ubuntu. The workflow uses
xgo-dev/setup-llgowithllgo-version: main, Go 1.27 and LLVM 22. The workflow uses the published setup-llgo v0.2.0 release, which installs the required linker and libclang dependencies. Its implementation and review fixes were merged in xgo-dev/setup-llgo#50. The repository-local setup action is unchanged.The test command uses
-coverpkg=./...so calls from theclandtooltests also measure local dependencies such asclang,cl/cltest, andtool/listth. An explicit empty Codecov ignore list includes every reported package, includingtool. Only the LLGo-generatedcoverage.txtis uploaded, with automatic report discovery disabled;go tool coveronly reads that profile.Validation:
llgo test -v -coverpkg=./... -covermode=atomic -coverprofile=coverage.txt ./...passed locally with LLGo main at7db1409073f28bf13a35ae0a3ea663eba010fd73;go tool coverreported 80.1% statement coverage.xgo-dev/setup-llgo@v0.2.0release passed the full LLGo tests and Codecov uploads on macOS and Ubuntu. Statement coverage was 80.1% and 70.2%, respectively.actionlint .github/workflows/llgo.yml,git diff --check, and Codecov YAML validation passed.Codecov's project check remains below the 83.32% baseline from
55f289c, which predates the repository rewrite and is 393 commits behind the PR base. The old report usedgo testwithout-coverpkgand covered a different source tree. Coverage thresholds are unchanged.