Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update build args to arm64 #157

Merged
merged 7 commits into from
Mar 29, 2023
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Ref: https://keepachangelog.com/en/1.0.0/

### Build, CI
(ci) [\#145](https://github.com/line/lbm/pull/145) add github action to push docker image to docker.io

(build) [\#157](https://github.com/line/finschia/pull/157) add build args

<!-- Release links -->
[Unreleased]: https://github.com/line/lbm/compare/v0.7.0...HEAD
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ BUILDDIR ?= $(CURDIR)/build
TEST_DOCKER_REPO=jackzampolin/linktest
CGO_ENABLED ?= 1
ARCH ?= x86_64
PLATFORM ?= amd64

export GO111MODULE = on

Expand Down Expand Up @@ -160,7 +161,7 @@ build: go.sum $(BUILDDIR)/ dbbackend $(LIBSODIUM_TARGET)
CGO_CFLAGS=$(CGO_CFLAGS) CGO_LDFLAGS=$(CGO_LDFLAGS) CGO_ENABLED=$(CGO_ENABLED) go build -mod=readonly $(BUILD_FLAGS) $(BUILD_ARGS) ./...

build-static: go.sum $(BUILDDIR)/
docker build -t line/finschianode:latest -f builders/Dockerfile.static . --build-arg ARCH=$(ARCH) --platform="linux/amd64"
docker build -t line/finschianode:latest -f builders/Dockerfile.static . --build-arg ARCH=$(ARCH) --platform="linux/$(PLATFORM)"

build-static-centos7: go.sum $(BUILDDIR)/
docker build -t line/finschia-builder:static_centos7 -f builders/Dockerfile.static_centos7 .
Expand Down Expand Up @@ -232,7 +233,7 @@ dbbackend:
endif

build-docker:
docker build --build-arg FINSCHIA_BUILD_OPTIONS="$(FINSCHIA_BUILD_OPTIONS)" -t line/lbm .
docker build --build-arg FINSCHIA_BUILD_OPTIONS="$(FINSCHIA_BUILD_OPTIONS)" --build-arg ARCH=$(ARCH) -t line/lbm . --platform="linux/$(PLATFORM)"

build-contract-tests-hooks:
mkdir -p $(BUILDDIR)
Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@ or
make build-docker WITH_CLEVELDB=yes GITHUB_TOKEN=${YOUR_GITHUB_TOKEN} # build docker image with cleveldb
```

_Note1_

If you are using M1 mac, you need to specify build args like this:
```
make build-docker ARCH=aarch64 PLATFORM=arm64
```

**Configure**
```
sh init_single.sh docker # prepare keys, validators, initial state, etc.
Expand Down