From 7701ff5eb1b860340ed16959a299da7f28c91690 Mon Sep 17 00:00:00 2001 From: Jayden Lee <41176085+tkxkd0159@users.noreply.github.com> Date: Tue, 14 Feb 2023 14:16:33 +0900 Subject: [PATCH] add multi-arch config to generate bins --- .goreleaser.yml | 59 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/.goreleaser.yml b/.goreleaser.yml index 38bcd93b0d..c4452eb73a 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -11,6 +11,62 @@ builds: - amd64 env: - CGO_ENABLED=1 + - CC=x86_64-linux-gnu-gcc + - CXX=x86_64-linux-gnu-g++ + flags: + - -mod=readonly + - -trimpath + - "-tags={{ .Env.BUILD_TAGS }}" + ldflags: + - "{{ .Env.BUILD_VARS }}" + + - id: simd-linux-arm64 + main: ./simapp/simd + binary: simd + goos: + - linux + goarch: + - arm64 + env: + - CGO_ENABLED=1 + - CC=aarch64-linux-gnu-gcc + - CXX=aarch64-linux-gnu-g++ + flags: + - -mod=readonly + - -trimpath + - "-tags={{ .Env.BUILD_TAGS }}" + ldflags: + - "{{ .Env.BUILD_VARS }}" + + - id: simd-darwin-amd64 + main: ./simapp/simd + binary: simd + goos: + - darwin + goarch: + - amd64 + env: + - CGO_ENABLED=1 + - CC=o64-clang + - CXX=o64-clang++ + flags: + - -mod=readonly + - -trimpath + - "-tags={{ .Env.BUILD_TAGS }}" + ldflags: + - "{{ .Env.BUILD_VARS }}" + + - id: simd-darwin-arm64 + main: ./simapp/simd + binary: simd + goos: + - darwin + goarch: + - arm64 + env: + - CGO_ENABLED=1 + - CC=oa64-clang + - CXX=oa64-clang++ flags: - -mod=readonly - -trimpath @@ -23,6 +79,9 @@ archives: id: bin-archive builds: - simd-linux-amd64 + - simd-linux-arm64 + - simd-darwin-amd64 + - simd-darwin-arm64 format: tar.gz name_template: "simd_{{ .Version }}_{{ .Os }}_{{ .Arch }}" wrap_in_directory: true