Build the release one target at a time so it fits in memory
build / build (push) Has been cancelled
release / sdks (push) Has been cancelled
release / plugin (push) Has been cancelled

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:
max-voitcov
2026-08-26 01:44:19 +03:00
parent 466e162efe
commit 5b106b406d
+11 -1
View File
@@ -41,13 +41,23 @@ jobs:
go-version: ${{ env.GO_VERSION }} go-version: ${{ env.GO_VERSION }}
cache: false 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 - uses: goreleaser/goreleaser-action@v6
with: with:
version: latest version: latest
args: release --clean args: release --clean --parallelism 1
workdir: pulumi-dokploy workdir: pulumi-dokploy
env: env:
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }} GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
GOGC: "50"
sdks: sdks:
needs: plugin needs: plugin