Skip to content

Commit

Permalink
chore: separate build flags (cosmos#13260)
Browse files Browse the repository at this point in the history
* separate build flags

* legible
  • Loading branch information
tac0turtle committed Sep 13, 2022
1 parent a79eafa commit d074294
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name: Build & Push
# and pushes the image to https://hub.docker.com/r/interchainio/simapp/tags
on:
pull_request:
paths:
- "Dockerfile"
push:
branches:
- main
Expand Down
10 changes: 7 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,12 @@ include contrib/devtools/Makefile
BUILD_TARGETS := build install

build: BUILD_ARGS=-o $(BUILDDIR)/
build-linux:
GOOS=linux GOARCH=$(if $(findstring aarch64,$(shell uname -m)) || $(findstring arm64,$(shell uname -m)),arm64,amd64) LEDGER_ENABLED=false $(MAKE) build

build-linux-amd64:
GOOS=linux GOARCH=amd64 LEDGER_ENABLED=false $(MAKE) build

build-linux-arm64:
GOOS=linux GOARCH=arm64 LEDGER_ENABLED=false $(MAKE) build

$(BUILD_TARGETS): go.sum $(BUILDDIR)/
cd ${CURRENT_DIR}/simapp && go $@ -mod=readonly $(BUILD_FLAGS) $(BUILD_ARGS) ./...
Expand All @@ -138,7 +142,7 @@ $(BUILDDIR)/:
cosmovisor:
$(MAKE) -C cosmovisor cosmovisor

.PHONY: build build-linux cosmovisor
.PHONY: build build-linux-amd64 build-linux-arm64 cosmovisor


mocks: $(MOCKS_DIR)
Expand Down

0 comments on commit d074294

Please sign in to comment.