-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'extra-rest/v2.5.x' of https://github.com/bandprotocol/c…
…hain into extra-rest/v2.4.x-add-relayer-stat
- Loading branch information
Showing
48 changed files
with
1,085 additions
and
856 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- v[0-9]+.* | ||
|
||
jobs: | ||
build_static_bin: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Build statically linked binaries | ||
run: | | ||
mkdir artifacts | ||
docker build -t chain:static -f Dockerfile.static . | ||
id=$(docker create chain:static) | ||
docker cp $id:/usr/bin/bandd artifacts/bandd-${{ github.ref_name }}-linux-amd64 | ||
docker rm -v $id | ||
- name: Create checksums | ||
working-directory: artifacts | ||
run: sha256sum * > checksums.txt && cat checksums.txt | ||
|
||
- name: Release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: | | ||
artifacts/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
FROM golang:1.19-alpine as go-builder | ||
|
||
SHELL ["/bin/sh", "-ecuxo", "pipefail"] | ||
RUN apk add --no-cache ca-certificates build-base linux-headers git gmp gmp-dev | ||
|
||
WORKDIR /chain | ||
COPY . /chain | ||
|
||
RUN go mod download | ||
RUN GO_OWASM_VERSION=$(go list -m github.com/bandprotocol/go-owasm | cut -d ' ' -f 2) && \ | ||
wget https://github.com/bandprotocol/go-owasm/releases/download/$GO_OWASM_VERSION/libgo_owasm_muslc.x86_64.a -O /lib/libgo_owasm_muslc.x86_64.a | ||
RUN sha256sum /lib/libgo_owasm_muslc.x86_64.a | grep c56ad7694196175df51585cbc7f2543cfa8ba9a42c62dcfec76ca28a5842d073 | ||
|
||
# Copy the library you want to the final location that will be found by the linker flag `-lgo_owasm_muslc` | ||
RUN cp /lib/libgo_owasm_muslc.x86_64.a /lib/libgo_owasm_muslc.a | ||
|
||
# force it to use static lib (from above) not standard libgo_owasm.so file | ||
RUN LEDGER_ENABLED=true BUILD_TAGS=muslc LINK_STATICALLY=true make install \ | ||
&& echo "Ensuring binary is statically linked ..." \ | ||
&& (file /go/bin/bandd | grep "statically linked") | ||
|
||
# -------------------------------------------------------- | ||
FROM alpine:3.16 | ||
|
||
COPY --from=go-builder /go/bin/bandd /usr/bin/bandd | ||
|
||
ENTRYPOINT ["/usr/bin/bandd"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.