feat: build linux/darwin amd64/arm64 binaries in parallel
Each target gets its own step depending on test, so all four build concurrently. release step waits for all builds before uploading. 💘 Generated with Crush Assisted-by: Claude Sonnet 4.6 via Crush <crush@charm.land>
This commit is contained in:
@@ -7,12 +7,28 @@ steps:
|
||||
commands:
|
||||
- go test ./...
|
||||
|
||||
- name: build
|
||||
- name: build-linux-amd64
|
||||
image: golang:latest
|
||||
commands:
|
||||
- VERSION=${CI_COMMIT_TAG}
|
||||
- BINARY=node-lookup-linux-amd64
|
||||
- go build -ldflags="-s -w -X main.version=${VERSION}" -o ${BINARY} ./...
|
||||
- GOOS=linux GOARCH=amd64 go build -ldflags="-s -w -X main.version=${CI_COMMIT_TAG}" -o node-lookup-linux-amd64 ./...
|
||||
depends_on: [test]
|
||||
|
||||
- name: build-linux-arm64
|
||||
image: golang:latest
|
||||
commands:
|
||||
- GOOS=linux GOARCH=arm64 go build -ldflags="-s -w -X main.version=${CI_COMMIT_TAG}" -o node-lookup-linux-arm64 ./...
|
||||
depends_on: [test]
|
||||
|
||||
- name: build-darwin-amd64
|
||||
image: golang:latest
|
||||
commands:
|
||||
- GOOS=darwin GOARCH=amd64 go build -ldflags="-s -w -X main.version=${CI_COMMIT_TAG}" -o node-lookup-darwin-amd64 ./...
|
||||
depends_on: [test]
|
||||
|
||||
- name: build-darwin-arm64
|
||||
image: golang:latest
|
||||
commands:
|
||||
- GOOS=darwin GOARCH=arm64 go build -ldflags="-s -w -X main.version=${CI_COMMIT_TAG}" -o node-lookup-darwin-arm64 ./...
|
||||
depends_on: [test]
|
||||
|
||||
- name: release
|
||||
@@ -31,8 +47,13 @@ steps:
|
||||
NOTES=$(git log --merges --pretty=format:"- %s")
|
||||
fi
|
||||
tea releases edit "${CI_COMMIT_TAG}" --note "${NOTES}" --login gitea --repo "${CI_REPO}"
|
||||
tea releases assets create "${CI_COMMIT_TAG}" node-lookup-linux-amd64 --login gitea --repo "${CI_REPO}"
|
||||
tea releases assets create "${CI_COMMIT_TAG}" \
|
||||
node-lookup-linux-amd64 \
|
||||
node-lookup-linux-arm64 \
|
||||
node-lookup-darwin-amd64 \
|
||||
node-lookup-darwin-arm64 \
|
||||
--login gitea --repo "${CI_REPO}"
|
||||
backend_options:
|
||||
kubernetes:
|
||||
serviceAccountName: default
|
||||
depends_on: [build]
|
||||
depends_on: [build-linux-amd64, build-linux-arm64, build-darwin-amd64, build-darwin-arm64]
|
||||
|
||||
Reference in New Issue
Block a user