From c4c909d3e90285c6dfd9fa5cf9c62c804612d6c5 Mon Sep 17 00:00:00 2001 From: Ryan Gerstenkorn Date: Thu, 22 Aug 2024 01:55:44 -0700 Subject: [PATCH] Add linux and windows builds for arm64 and amd64 --- .goreleaser.yaml | 66 +++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 57 insertions(+), 9 deletions(-) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 0cde98d..5e4b101 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -7,8 +7,6 @@ builds: goarch: - amd64 env: - - PKG_CONFIG_SYSROOT_DIR=/sysroot/macos/amd64 - - PKG_CONFIG_PATH=/sysroot/macos/amd64/usr/local/lib/pkgconfig - CC=o64-clang - CXX=o64-clang++ flags: @@ -23,8 +21,6 @@ builds: goarch: - arm64 env: - - PKG_CONFIG_SYSROOT_DIR=/sysroot/macos/arm64 - - PKG_CONFIG_PATH=/sysroot/macos/arm64/usr/local/lib/pkgconfig - CC=oa64-clang - CXX=oa64-clang++ flags: @@ -43,10 +39,62 @@ builds: env: - CC=arm-linux-gnueabihf-gcc - CXX=arm-linux-gnueabihf-g++ - - CGO_CFLAGS=--sysroot=/sysroot/linux/armhf - - CGO_LDFLAGS=--sysroot=/sysroot/linux/armhf - - PKG_CONFIG_SYSROOT_DIR=/sysroot/linux/armhf - - PKG_CONFIG_PATH=/sysroot/linux/armhf/opt/vc/lib/pkgconfig:/sysroot/linux/armhf/usr/lib/arm-linux-gnueabihf/pkgconfig:/sysroot/linux/armhf/usr/lib/pkgconfig:/sysroot/linux/armhf/usr/local/lib/pkgconfig + flags: + - -mod=readonly + ldflags: + - -s -w -X main.version={{.Version}} + - id: linux-arm64 + main: ./ + binary: liquidswards + goos: + - linux + goarch: + - arm64 + env: + - CC=aarch64-linux-gnu-gcc + - CXX=aarch64-linux-gnu-g++ + flags: + - -mod=readonly + ldflags: + - -s -w -X main.version={{.Version}} + - id: linux-amd64 + main: ./ + binary: liquidswards + goos: + - linux + goarch: + - amd64 + env: + - CC=x86_64-linux-gnu-gcc + - CXX=x86_64-linux-gnu-g++ + flags: + - -mod=readonly + ldflags: + - -s -w -X main.version={{.Version}} + - id: windows-amd64 + main: ./ + binary: liquidswards + goos: + - windows + goarch: + - amd64 + env: + - CC=x86_64-w64-mingw32-gcc + - CXX=x86_64-w64-mingw32-g++ + flags: + - -mod=readonly + ldflags: + - -s -w -X main.version={{.Version}} + - id: windows-arm64 + main: ./ + binary: liquidswards + goos: + - windows + goarch: + - arm64 + env: + - CC=/llvm-mingw/bin/aarch64-w64-mingw32-gcc + - CXX=/llvm-mingw/bin/aarch64-w64-mingw32-g++ flags: - -mod=readonly ldflags: @@ -68,7 +116,7 @@ archives: checksum: name_template: 'checksums.txt' snapshot: - name_template: "{{ .Tag }}" + name_template: "{{ incpatch .Version }}-next" changelog: sort: asc filters: