Skip to content

Commit

Permalink
update makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
Michal Turcan committed May 16, 2023
1 parent 25ca121 commit 27df600
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
17 changes: 17 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 27df600

Please sign in to comment.