ci: align Go toolchain to 1.24.9 across workflows#6
Conversation
CI workflows used inconsistent floating Go versions (ci.yml ^1.24; build/preview/release ^1.25) while libcore/go.mod declares 'go 1.24.7' and 'toolchain go1.24.9'. Pin all setup-go steps to the exact 1.24.9 to match go.mod for reproducible, consistent native-core builds. This is a reproducibility alignment only: no go.mod, source, or dependency changes, and no Go language-version bump.
|
@coderabbitai full review Please focus on Go toolchain reproducibility. Verify this PR only aligns CI/local Go version expectations (all workflows pinned to 1.24.9 matching go.mod's toolchain directive) and does not update sing-box, libneko, protocol behavior, or generated core artifacts. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
📝 WalkthroughSummary by CodeRabbit
WalkthroughFour GitHub Actions workflow files ( ChangesGo Version Pinning Across CI Workflows
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "=== PR `#6` diff ==="
gh pr view 6 --repo hawkff/NekoBoxForAndroid --json files,additions,deletions,title,body
echo ""
echo "=== PR diff ==="
gh pr diff 6 --repo hawkff/NekoBoxForAndroidLength of output: 4189 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "=== .github/workflows/ci.yml ==="
cat .github/workflows/ci.yml
echo ""
echo "=== .github/workflows/build.yml ==="
cat .github/workflows/build.yml
echo ""
echo "=== .github/workflows/preview.yml ==="
cat .github/workflows/preview.yml
echo ""
echo "=== .github/workflows/release.yml ==="
cat .github/workflows/release.yml
echo ""
echo "=== libcore/go.mod ==="
cat libcore/go.mod
echo ""
echo "=== libcore/go.sum (first 20 lines) ==="
head -20 libcore/go.sumLength of output: 17948
Review:
|
| Workflow | Before | After | go.mod toolchain |
|---|---|---|---|
ci.yml |
^1.24 |
'1.24.9' |
go1.24.9 |
build.yml |
^1.25 |
'1.24.9' |
go1.24.9 |
preview.yml |
^1.25 |
'1.24.9' |
go1.24.9 |
release.yml |
^1.25 |
'1.24.9' |
go1.24.9 |
All four workflows now pin the exact string '1.24.9', which matches toolchain go1.24.9 declared in libcore/go.mod. The go 1.24.7 minimum in go.mod is unaffected (that's the language version floor, not the compiler version).
Effective compiler version ✅
build.yml, preview.yml, and release.yml previously floated at ^1.25, but since go.mod's toolchain go1.24.9 directive causes Go to auto-download and use go1.24.9 regardless of the setup-go install, the actual compiler used for libcore builds was already 1.24.9. The pin makes this implicit behavior explicit and removes the ambiguity.
Cache key side-effect (expected, desirable) ℹ️
All four workflows compute the libcore.aar cache key as:
${{ hashFiles('.github/workflows/*', 'golang_status', 'libcore_status') }}
Since the workflow files themselves are part of the hash, merging this PR will invalidate all existing caches and force one clean libcore.aar rebuild under the pinned toolchain. This is the correct behaviour for a toolchain version change.
Summary
No issues found. The PR is a minimal, correct reproducibility fix. Approving.
[approve]
Summary
Pins the Go version in all GitHub workflows to an exact
1.24.9, matchinglibcore/go.mod(go 1.24.7,toolchain go1.24.9), for reproducible native-corebuilds. Reproducibility alignment only — no Go language-version bump.
Before
^1.24^1.25^1.25^1.25go.mod:go 1.24.7,toolchain go1.24.9. The floating ranges were inconsistentbetween workflows and diverged from the go.mod toolchain directive (which Go would
auto-download anyway), making CI behavior misleading and non-reproducible.
After
All four workflows pin
go-version: '1.24.9'— the exact toolchaingo.moddeclares.Rationale
go.mod'stoolchain go1.24.9already drives the actual compiler used, so pinningsetup-go to the same version makes CI explicit and consistent.
Verification
./run lib core) rebuilt successfully on the Linux builder usingGo 1.24.9 (the exact pinned version);
libcore.aarproduced.Scope
go.mod, source, dependency, orsing-box/libneko pin changes.
Note
Pushed via SSH remote because the gh OAuth token lacks the
workflowscope requiredto modify
.github/workflows/over HTTPS. No repo content other than the fourgo-version lines changed.