From 4ebecf192b973347c287b65a0efe414896b3e296 Mon Sep 17 00:00:00 2001 From: dmittelstaedt Date: Mon, 2 Jan 2023 15:49:34 +0100 Subject: [PATCH] feat: add s390x release and image to support s390x architecture Signed-off-by: dmittelstaedt --- .github/workflows/release-ghcr.yml | 2 +- .goreleaser.yml | 1 + Makefile | 9 +++++++-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release-ghcr.yml b/.github/workflows/release-ghcr.yml index 5e1003ea6..d9ba9575b 100644 --- a/.github/workflows/release-ghcr.yml +++ b/.github/workflows/release-ghcr.yml @@ -46,7 +46,7 @@ jobs: - name: docker build run: | docker buildx create --use - docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t ${{ steps.prepare.outputs.ref }} --push . + docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7,linux/s390x -t ${{ steps.prepare.outputs.ref }} --push . - name: clear if: always() run: | diff --git a/.goreleaser.yml b/.goreleaser.yml index de4c8538c..f2a4ee94b 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -27,6 +27,7 @@ builds: - amd64 - arm64 - arm + - s390x goarm: - '7' ignore: diff --git a/Makefile b/Makefile index 52273415b..8bdd225cb 100644 --- a/Makefile +++ b/Makefile @@ -18,7 +18,7 @@ GIT_COMMIT = $(shell git rev-parse HEAD) GIT_TAG = $(shell git describe --tags --abbrev=0 --exact-match 2>/dev/null) GIT_DIRTY = $(shell test -n "`git status --porcelain`" && echo "dirty" || echo "clean") -TARGET_OBJS ?= checksums.txt darwin_amd64.tar.gz darwin_arm64.tar.gz linux_amd64.tar.gz linux_arm64.tar.gz linux_armv7.tar.gz windows_amd64.zip +TARGET_OBJS ?= checksums.txt darwin_amd64.tar.gz darwin_arm64.tar.gz linux_amd64.tar.gz linux_arm64.tar.gz linux_armv7.tar.gz linux_s390x.tar.gz windows_amd64.zip LDFLAGS = -w ifdef VERSION @@ -46,7 +46,7 @@ clean: build: build-linux build-mac build-windows .PHONY: build-linux -build-linux: build-linux-amd64 build-linux-arm64 build-linux-arm-v7 +build-linux: build-linux-amd64 build-linux-arm64 build-linux-arm-v7 build-linux-s390x .PHONY: build-linux-amd64 build-linux-amd64: @@ -63,6 +63,11 @@ build-linux-arm-v7: GOARCH=arm CGO_ENABLED=0 GOOS=linux go build -v --ldflags="$(LDFLAGS)" \ -o bin/linux/arm/v7/$(CLI_EXE) $(CLI_PKG) +.PHONY: build-linux-s390x +build-linux-s390x: + GOARCH=s390x CGO_ENABLED=0 GOOS=linux go build -v --ldflags="$(LDFLAGS)" \ + -o bin/linux/s390x/$(CLI_EXE) $(CLI_PKG) + .PHONY: build-mac build-mac: build-mac-arm64 build-mac-amd64