diff --git a/.envrc b/.envrc index f9c62cbbd..f5ce87435 100644 --- a/.envrc +++ b/.envrc @@ -79,6 +79,11 @@ if [[ "$OSTYPE" == "darwin"* ]]; then export CGO_CFLAGS fi +if [ -z "${GOARCH}" ]; then + GOARCH=$(go env GOARCH) + export GOARCH +fi + export SEMVER export GOTOOLCHAIN export GOTOOLCHAIN_SEMVER diff --git a/.goreleaser-test-bins.yaml b/.goreleaser-test-bins.yaml new file mode 100644 index 000000000..11c65adf2 --- /dev/null +++ b/.goreleaser-test-bins.yaml @@ -0,0 +1,101 @@ +--- +project_name: node +version: 2 +dist: ./.cache/goreleaser/test-bins +env: + - GO111MODULE=on + - CGO_ENABLED=1 +builds: + - id: akash-darwin-amd64 + binary: akash + main: ./cmd/akash + goarch: + - amd64 + goos: + - darwin + env: + - CC=o64-clang + - CXX=o64-clang++ + flags: + - "-mod={{ .Env.MOD }}" + - "-tags={{ .Env.BUILD_TAGS }}" + - -trimpath + ldflags: + - "{{ .Env.BUILD_VARS }}" + - "{{ .Env.STRIP_FLAGS }}" + - "-linkmode={{ .Env.LINKMODE }}" + - id: akash-darwin-arm64 + binary: akash + main: ./cmd/akash + goarch: + - arm64 + goos: + - darwin + env: + - CC=oa64-clang + - CXX=oa64-clang++ + flags: + - "-mod={{ .Env.MOD }}" + - "-tags={{ .Env.BUILD_TAGS }}" + - -trimpath + ldflags: + - "{{ .Env.BUILD_VARS }}" + - "{{ .Env.STRIP_FLAGS }}" + - "-linkmode={{ .Env.LINKMODE }}" + - id: akash-linux-amd64 + binary: akash + main: ./cmd/akash + env: + - CC=x86_64-linux-gnu-gcc + - CXX=x86_64-linux-gnu-g++ + goarch: + - amd64 + goos: + - linux + flags: + - "-mod={{ .Env.MOD }}" + - "-tags={{ .Env.BUILD_TAGS }}" + - -trimpath + ldflags: + - "{{ .Env.BUILD_VARS }}" + - "{{ .Env.STRIP_FLAGS }}" + - "-linkmode={{ .Env.LINKMODE }}" + - -extldflags "-lc -lrt -lpthread --static" + - id: akash-linux-arm64 + binary: akash + main: ./cmd/akash + goarch: + - arm64 + goos: + - linux + env: + - CC=aarch64-linux-gnu-gcc + - CXX=aarch64-linux-gnu-g++ + flags: + - "-mod={{ .Env.MOD }}" + - "-tags={{ .Env.BUILD_TAGS }}" + - -trimpath + ldflags: + - "{{ .Env.BUILD_VARS }}" + - "{{ .Env.STRIP_FLAGS }}" + - "-linkmode={{ .Env.LINKMODE }}" + - -extldflags "-lc -lrt -lpthread --static" +universal_binaries: + - id: akash-darwin-universal + ids: + - akash-darwin-amd64 + - akash-darwin-arm64 + replace: true + name_template: "akash" + +archives: + - id: wo/version + builds: + - akash-darwin-universal + - akash-linux-amd64 + - akash-linux-arm64 + name_template: "akash_{{ .Os }}_{{ .Arch }}" + wrap_in_directory: false + format: zip + files: + - none*