Skip to content

Commit 12f64b3

Browse files
xaionaro@dx.centerxaionaro@dx.center
authored andcommitted
fix: reduce GoReleaser memory usage to prevent OOM on GitHub runners
bindercli pulls in 923 packages (~1.2M lines of generated code). On the free GitHub runner (2 cores, 7GB RAM), parallel package compilation during arm64 cross-compilation exhausts memory, causing "hosted runner lost communication" crashes. Two changes: - Add -p 1 flag to the bindercli build so go build compiles one package at a time, reducing peak memory. - Pass --parallelism=1 to GoReleaser so builds run sequentially, preventing two large compilations from overlapping.
1 parent a1cbd51 commit 12f64b3

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ jobs:
7070
uses: goreleaser/goreleaser-action@v6
7171
with:
7272
version: '~> v2'
73-
args: release --clean
73+
args: release --clean --parallelism=1
7474
env:
7575
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7676

.goreleaser.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@ builds:
2828
goarch:
2929
- amd64
3030
- arm64
31+
# bindercli pulls in 923 packages (~1.2M lines of generated code).
32+
# Compiling packages in parallel exhausts the 7GB GitHub runner RAM
33+
# during cross-compilation. Limit to 1 concurrent package compilation.
34+
flags:
35+
- -p
36+
- '1'
3137
ldflags:
3238
- -s -w
3339

0 commit comments

Comments
 (0)