Skip to content

Commit

Permalink
Disable cgo by default (#2760)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexshtin committed Apr 22, 2022
1 parent 18399f2 commit 10aa1c4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 51 deletions.
44 changes: 4 additions & 40 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,76 +15,40 @@ archives:
files:
- ./config/*

- id: no-cgo
builds:
- temporal-server-no-cgo
- temporal-cassandra-tool-no-cgo
- temporal-sql-tool-no-cgo
name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}_no_cgo"
format_overrides:
- goos: windows
format: zip
files:
- ./config/*

builds:
- id: temporal-server
dir: cmd/server
binary: temporal-server
goos:
- linux
- darwin
- windows
goarch:
- amd64
- arm64
- id: temporal-server-no-cgo
dir: cmd/server
binary: temporal-server
env:
- CGO_ENABLED=0
goos:
- linux
goarch:
- amd64
- arm64
- id: temporal-cassandra-tool
dir: cmd/tools/cassandra
binary: temporal-cassandra-tool
goos:
- linux
- darwin
- windows
goarch:
- amd64
- arm64
- id: temporal-cassandra-tool-no-cgo
- id: temporal-cassandra-tool
dir: cmd/tools/cassandra
binary: temporal-cassandra-tool
env:
- CGO_ENABLED=0
goos:
- linux
goarch:
- amd64
- arm64
- id: temporal-sql-tool
dir: cmd/tools/sql
binary: temporal-sql-tool
goos:
- linux
- darwin
- windows
goarch:
- amd64
- arm64
- id: temporal-sql-tool-no-cgo
- id: temporal-sql-tool
dir: cmd/tools/sql
binary: temporal-sql-tool
env:
- CGO_ENABLED=0
goos:
- linux
- darwin
- windows
goarch:
- amd64
- arm64
Expand Down
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ update-proto: clean-proto update-proto-submodule buf-lint api-linter protoc fix-
GOOS ?= $(shell go env GOOS)
GOARCH ?= $(shell go env GOARCH)
GOPATH ?= $(shell go env GOPATH)
CGO_ENABLED ?= $(shell go env CGO_ENABLED)
# Disable cgo by default.
CGO_ENABLED ?= 0

PERSISTENCE_TYPE ?= nosql
PERSISTENCE_DRIVER ?= cassandra
Expand Down
10 changes: 0 additions & 10 deletions develop/buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,6 @@ steps:

- wait

- label: ":golang: build without cgo"
agents:
queue: "default"
docker: "*"
command: "CGO_ENABLED=0 make bins"
plugins:
- docker-compose#v3.8.0:
run: build
config: ./develop/buildkite/docker-compose.yml

- label: ":golang: unit test"
agents:
queue: "default"
Expand Down

0 comments on commit 10aa1c4

Please sign in to comment.