-
Notifications
You must be signed in to change notification settings - Fork 492
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:maticnetwork/bor into v0.2.12-can…
…didate
- Loading branch information
Showing
63 changed files
with
6,185 additions
and
144 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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,43 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
branches-ignore: | ||
- '**' | ||
tags: | ||
- 'v*.*.*' | ||
# to be used by fork patch-releases ^^ | ||
- 'v*.*.*-*' | ||
|
||
jobs: | ||
goreleaser: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@master | ||
with: | ||
go-version: 1.17.x | ||
|
||
- name: Prepare | ||
id: prepare | ||
run: | | ||
TAG=${GITHUB_REF#refs/tags/} | ||
echo ::set-output name=tag_name::${TAG} | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v1 | ||
|
||
- name: Run GoReleaser | ||
run: | | ||
make release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
VERSION: ${{ steps.prepare.outputs.tag_name }} | ||
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} | ||
DOCKER_USERNAME: ${{ secrets.DOCKERHUB }} | ||
DOCKER_PASSWORD: ${{ secrets.DOCKERHUB_KEY }} |
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 |
---|---|---|
|
@@ -47,3 +47,7 @@ profile.cov | |
/dashboard/assets/package-lock.json | ||
|
||
**/yarn-error.log | ||
./test | ||
./bor-debug-* | ||
|
||
dist |
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,126 @@ | ||
project_name: bor | ||
|
||
release: | ||
disable: false | ||
draft: true | ||
prerelease: auto | ||
|
||
builds: | ||
- id: darwin-amd64 | ||
main: ./cmd/geth | ||
binary: bor | ||
goos: | ||
- darwin | ||
goarch: | ||
- amd64 | ||
env: | ||
- CC=o64-clang | ||
- CXX=o64-clang++ | ||
ldflags: | ||
-s -w | ||
|
||
- id: darwin-arm64 | ||
main: ./cmd/geth | ||
binary: bor | ||
goos: | ||
- darwin | ||
goarch: | ||
- arm64 | ||
env: | ||
- CC=oa64-clang | ||
- CXX=oa64-clang++ | ||
ldflags: | ||
-s -w | ||
|
||
- id: linux-amd64 | ||
main: ./cmd/geth | ||
binary: bor | ||
goos: | ||
- linux | ||
goarch: | ||
- amd64 | ||
env: | ||
- CC=gcc | ||
- CXX=g++ | ||
ldflags: | ||
# We need to build a static binary because we are building in a glibc based system and running in a musl container | ||
-s -w -linkmode external -extldflags "-static" | ||
|
||
- id: linux-arm64 | ||
main: ./cmd/geth | ||
binary: bor | ||
goos: | ||
- linux | ||
goarch: | ||
- arm64 | ||
env: | ||
- CC=aarch64-linux-gnu-gcc | ||
- CXX=aarch64-linux-gnu-g++ | ||
ldflags: | ||
# We need to build a static binary because we are building in a glibc based system and running in a musl container | ||
-s -w -linkmode external -extldflags "-static" | ||
|
||
nfpms: | ||
- vendor: 0xPolygon | ||
homepage: https://polygon.technology | ||
maintainer: Polygon Team <[email protected]> | ||
description: Polygon Blockchain | ||
license: GPLv3 LGPLv3 | ||
|
||
formats: | ||
- apk | ||
- deb | ||
- rpm | ||
|
||
contents: | ||
- src: builder/files/bor.service | ||
dst: /lib/systemd/system/bor.service | ||
type: config | ||
|
||
overrides: | ||
rpm: | ||
replacements: | ||
amd64: x86_64 | ||
|
||
snapshot: | ||
name_template: "{{ .Tag }}.next" | ||
|
||
dockers: | ||
- image_templates: | ||
- 0xpolygon/{{ .ProjectName }}:{{ .Version }}-amd64 | ||
dockerfile: Dockerfile.release | ||
use: buildx | ||
goarch: amd64 | ||
ids: | ||
- linux-amd64 | ||
build_flag_templates: | ||
- --platform=linux/amd64 | ||
skip_push: true | ||
|
||
- image_templates: | ||
- 0xpolygon/{{ .ProjectName }}:{{ .Version }}-arm64 | ||
dockerfile: Dockerfile.release | ||
use: buildx | ||
goarch: arm64 | ||
ids: | ||
- linux-arm64 | ||
build_flag_templates: | ||
- --platform=linux/arm64 | ||
skip_push: true | ||
|
||
docker_manifests: | ||
- name_template: 0xpolygon/{{ .ProjectName }}:{{ .Version }} | ||
image_templates: | ||
- 0xpolygon/{{ .ProjectName }}:{{ .Version }}-amd64 | ||
- 0xpolygon/{{ .ProjectName }}:{{ .Version }}-arm64 | ||
|
||
- name_template: 0xpolygon/{{ .ProjectName }}:latest | ||
image_templates: | ||
- 0xpolygon/{{ .ProjectName }}:{{ .Version }}-amd64 | ||
- 0xpolygon/{{ .ProjectName }}:{{ .Version }}-arm64 | ||
|
||
announce: | ||
slack: | ||
enabled: true | ||
# The name of the channel that the user selected as a destination for webhook messages. | ||
channel: '#code-releases' |
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 |
---|---|---|
@@ -1,18 +1,17 @@ | ||
# Build Geth in a stock Go builder container | ||
FROM golang:1.17-alpine as builder | ||
FROM golang:latest | ||
|
||
RUN apk add --no-cache make gcc musl-dev linux-headers git bash | ||
ARG BOR_DIR=/bor | ||
ENV BOR_DIR=$BOR_DIR | ||
|
||
ADD . /bor | ||
RUN cd /bor && make bor-all | ||
RUN apt-get update -y && apt-get upgrade -y \ | ||
&& apt install build-essential git -y \ | ||
&& mkdir -p /bor | ||
|
||
CMD ["/bin/bash"] | ||
WORKDIR ${BOR_DIR} | ||
COPY . . | ||
RUN make bor-all | ||
|
||
# Pull Bor into a second stage deploy alpine container | ||
FROM alpine:latest | ||
ENV SHELL /bin/bash | ||
EXPOSE 8545 8546 8547 30303 30303/udp | ||
|
||
RUN apk add --no-cache ca-certificates | ||
COPY --from=builder /bor/build/bin/bor /usr/local/bin/ | ||
COPY --from=builder /bor/build/bin/bootnode /usr/local/bin/ | ||
|
||
EXPOSE 8545 8546 8547 30303 30303/udp | ||
ENTRYPOINT ["bor"] |
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,7 @@ | ||
FROM alpine:3.14 | ||
|
||
RUN apk add --no-cache ca-certificates | ||
COPY bor /usr/local/bin/ | ||
|
||
EXPOSE 8545 8546 8547 30303 30303/udp | ||
ENTRYPOINT ["bor"] |
Oops, something went wrong.