Skip to content
This repository has been archived by the owner on May 13, 2022. It is now read-only.

Commit

Permalink
Merge pull request #1365 from hyperledger/burrow-compile
Browse files Browse the repository at this point in the history
Build a burrow debug binary and include it in the docker image with the
  • Loading branch information
silasdavis committed Apr 5, 2020
2 parents 04b8588 + 1fbf55a commit ffccfb6
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 15 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# [Hyperledger Burrow](https://github.com/hyperledger/burrow) Changelog
## [0.30.3] - 2020-03-13
## [0.30.3] - 2020-04-05
### Added
- [CLI] Made previously internal Solidity Go fixtures compilation available through 'burrow compile'
- [TS] Default ts client interface implementation


Expand Down
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ FROM ethereum/solc:0.5.12 as solc-builder
# We use a multistage build to avoid bloating our deployment image with build dependencies
FROM golang:1.13-alpine3.11 as builder

RUN apk add --no-cache --update git bash make
RUN apk add --no-cache --update git bash make musl-dev gcc libc6-compat

ARG REPO=/src/burrow
COPY . $REPO
Expand Down Expand Up @@ -34,6 +34,7 @@ WORKDIR $BURROW_PATH

# Copy binaries built in previous stage
COPY --from=builder /src/burrow/bin/burrow $INSTALL_BASE/
COPY --from=builder /src/burrow/bin/burrow-debug $INSTALL_BASE/
COPY --from=solc-builder /usr/bin/solc $INSTALL_BASE/

# Expose ports for 26656:peer; 26658:info; 10997:grpc
Expand Down
23 changes: 14 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ commit_hash:

# build all targets in github.com/hyperledger/burrow
.PHONY: build
build: check build_burrow
build: check build_burrow build_burrow_debug

# build all targets in github.com/hyperledger/burrow with checks for race conditions
.PHONY: build_race
Expand All @@ -135,19 +135,24 @@ build_race: check build_race_db
# build burrow and vent
.PHONY: build_burrow
build_burrow: commit_hash
go build -ldflags "-extldflags '-static' \
go build $(BURROW_BUILD_FLAGS) -ldflags "-extldflags '-static' \
-X github.com/hyperledger/burrow/project.commit=$(shell cat commit_hash.txt) \
-X github.com/hyperledger/burrow/project.date=$(shell date '+%Y-%m-%d')" \
-o ${REPO}/bin/burrow ./cmd/burrow
-o ${REPO}/bin/burrow$(BURROW_BUILD_SUFFIX) ./cmd/burrow

# With the sqlite tag - enabling Vent sqlite adapter support, but building a CGO binary
.PHONY: build_burrow_sqlite
build_burrow_sqlite: commit_hash
go build -tags sqlite \
-ldflags "-extldflags '-static' \
-X github.com/hyperledger/burrow/project.commit=$(shell cat commit_hash.txt) \
-X github.com/hyperledger/burrow/project.date=$(shell date -I)" \
-o ${REPO}/bin/burrow-vent-sqlite ./cmd/burrow
build_burrow_sqlite: export BURROW_BUILD_SUFFIX=-vent-sqlite
build_burrow_sqlite: export BURROW_BUILD_FLAGS=-tags sqlite
build_burrow_sqlite:
$(MAKE) build_burrow

# Builds a binary suitable for delve line-by-line debugging through CGO with optimisations (-N) and inling (-l) disabled
.PHONY: build_burrow_debug
build_burrow_debug: export BURROW_BUILD_SUFFIX=-debug
build_burrow_debug: export BURROW_BUILD_FLAGS=-gcflags "all=-N -l"
build_burrow_debug:
$(MAKE) build_burrow

.PHONY: install
install: build_burrow
Expand Down
1 change: 1 addition & 0 deletions NOTES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
### Added
- [CLI] Made previously internal Solidity Go fixtures compilation available through 'burrow compile'
- [TS] Default ts client interface implementation

5 changes: 1 addition & 4 deletions project/history.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,9 @@ func FullVersion() string {
// To cut a new release add a release to the front of this slice then run the
// release tagging script: ./scripts/tag_release.sh
var History relic.ImmutableHistory = relic.NewHistory("Hyperledger Burrow", "https://github.com/hyperledger/burrow").
MustDeclareReleases("",
MustDeclareReleases("0.30.3 - 2020-04-05",
`### Added
- [CLI] Made previously internal Solidity Go fixtures compilation available through 'burrow compile'
`,
"0.30.3 - 2020-03-13",
`### Added
- [TS] Default ts client interface implementation
`,
"0.30.2 - 2020-03-13",
Expand Down

0 comments on commit ffccfb6

Please sign in to comment.