From 27df600072a463d0d2204a3e7802bc4be05545b1 Mon Sep 17 00:00:00 2001 From: Michal Turcan Date: Tue, 16 May 2023 21:00:16 +0200 Subject: [PATCH] update makefile --- .github/workflows/release.yml | 2 +- Makefile | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a2979fbd4..56c4fa92f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -24,7 +24,7 @@ jobs: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} strategy: matrix: - build_type: ['build-linux'] + build_type: ['build-release-amd64'] steps: - name: Checkout uses: actions/checkout@v3 diff --git a/Makefile b/Makefile index 32093b405..01e966836 100755 --- a/Makefile +++ b/Makefile @@ -10,6 +10,7 @@ SIMAPP = ./app HTTPS_GIT := https://github.com/classic-terra/core.git DOCKER := $(shell which docker) DOCKER_BUF := $(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace bufbuild/buf +GO_VERSION ?= "1.20" #TESTNET PARAMETERS TESTNET_NVAL := $(if $(TESTNET_NVAL),$(TESTNET_NVAL),7) @@ -135,6 +136,22 @@ build-linux-with-shared-library: docker cp temp:/lib/libwasmvm.so $(BUILDDIR)/ docker rm temp +build-release-amd64: go.sum $(BUILDDIR)/ + $(DOCKER) buildx create --name core-builder || true + $(DOCKER) buildx use core-builder + $(DOCKER) buildx build \ + --platform linux/amd64 \ + -t core:local-amd64 \ + --load \ + -f Dockerfile . + $(DOCKER) rm -f core-builder || true + $(DOCKER) create -ti --name core-builder core:local-amd64 + mkdir -p build/release + $(DOCKER) cp core-builder:/usr/local/bin/terrad $(BUILDDIR)/release/terrad + tar -czvf $(BUILDDIR)/release/terra_$(VERSION)_Linux_x86_64.tar.gz -C $(BUILDDIR)/release/ terrad + rm $(BUILDDIR)/release/terrad + $(DOCKER) rm -f core-builder + install: go.sum go install -mod=readonly $(BUILD_FLAGS) ./cmd/terrad