Build the release one target at a time so it fits in memory
The v0.2.0 plugin release ran for 31 minutes and then died:
build failed: exit status 1:
github.com/pulumi/pulumi/sdk/v3/go/pulumi:
compile: signal: killed
target=darwin_amd64_v1
`signal: killed` is the OOM killer. A bridged provider links the entire
Terraform provider and the Pulumi SDK into a single ~100MB binary, and
goreleaser defaults its parallelism to the CPU count, so several of those
compiles were resident at once on a runner that could not hold them.
Serialise the builds and lower the compiler's GC target. Slower in wall-clock,
but it is the difference between a release that finishes and one that does
not.
This commit is contained in:
@@ -41,13 +41,23 @@ jobs:
|
||||
go-version: ${{ env.GO_VERSION }}
|
||||
cache: false
|
||||
|
||||
# A bridged Pulumi provider links the whole Terraform provider plus the
|
||||
# Pulumi SDK into one ~100MB binary, and compiling that is memory-hungry.
|
||||
# goreleaser defaults its parallelism to the CPU count, so several of
|
||||
# those compiles overlap and the runner OOMs -- the v0.2.0 release died
|
||||
# after 31 minutes with `compile: signal: killed` on darwin_amd64.
|
||||
#
|
||||
# Build one target at a time. It is slower in wall-clock but it is the
|
||||
# difference between a release that finishes and one that does not.
|
||||
# GOGC trades some CPU for a lower peak heap in the compiler itself.
|
||||
- uses: goreleaser/goreleaser-action@v6
|
||||
with:
|
||||
version: latest
|
||||
args: release --clean
|
||||
args: release --clean --parallelism 1
|
||||
workdir: pulumi-dokploy
|
||||
env:
|
||||
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
||||
GOGC: "50"
|
||||
|
||||
sdks:
|
||||
needs: plugin
|
||||
|
||||
Reference in New Issue
Block a user