Skip to content

Commit

Permalink
Merge tag 'v1.1.12' into docker
Browse files Browse the repository at this point in the history
  • Loading branch information
ephdtrg committed Aug 29, 2022
2 parents 6eb2736 + f68965a commit 996163f
Show file tree
Hide file tree
Showing 724 changed files with 47,240 additions and 16,510 deletions.
8 changes: 0 additions & 8 deletions .github/generate_change_log.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@ TESTNET_ZIP_SUM="$(checksum ./testnet.zip)"
LINUX_BIN_SUM="$(checksum ./linux/geth)"
MAC_BIN_SUM="$(checksum ./macos/geth)"
WINDOWS_BIN_SUM="$(checksum ./windows/geth.exe)"
ARM5_BIN_SUM="$(checksum ./arm5/geth-linux-arm-5)"
ARM6_BIN_SUM="$(checksum ./arm6/geth-linux-arm-6)"
ARM7_BIN_SUM="$(checksum ./arm7/geth-linux-arm-7)"
ARM64_BIN_SUM="$(checksum ./arm64/geth-linux-arm64)"
OUTPUT=$(cat <<-END
## Changelog\n
${CHANGE_LOG}\n
Expand All @@ -39,10 +35,6 @@ ${CHANGE_LOG}\n
| geth_linux | ${LINUX_BIN_SUM} |\n
| geth_mac | ${MAC_BIN_SUM} |\n
| geth_windows | ${WINDOWS_BIN_SUM} |\n
| geth_linux_arm5 | ${ARM5_BIN_SUM} |\n
| geth_linux_arm6 | ${ARM6_BIN_SUM} |\n
| geth_linux_arm7 | ${ARM7_BIN_SUM} |\n
| geth_linux_arm64 | ${ARM64_BIN_SUM} |\n
END
)

Expand Down
4 changes: 2 additions & 2 deletions .github/release.env
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
MAINNET_FILE_URL="https://github.com/binance-chain/bsc/releases/download/v1.1.8/mainnet.zip"
TESTNET_FILE_URL="https://github.com/binance-chain/bsc/releases/download/v1.1.8/testnet.zip"
MAINNET_FILE_URL="https://github.com/binance-chain/bsc/releases/latest/download/mainnet.zip"
TESTNET_FILE_URL="https://github.com/binance-chain/bsc/releases/latest/download/testnet.zip"
2 changes: 1 addition & 1 deletion .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
unit-test:
strategy:
matrix:
go-version: [1.16.x]
go-version: [1.17.x]
os: [ubuntu-18.04]
runs-on: ${{ matrix.os }}
steps:
Expand Down
51 changes: 51 additions & 0 deletions .github/workflows/docker-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Docker

on:
push:
# Publish `v1.2.3` tags as releases.
tags:
- v*

env:
IMAGE_NAME: bsc

jobs:
# Push image to GitHub Packages.
push:
runs-on: ubuntu-latest
if: github.event_name == 'push'

steps:
- uses: actions/checkout@v2

- name: Build image
run: |
docker build . \
--label "org.opencontainers.image.source=${{ secrets.IMAGE_SOURCE }}" \
--label "org.opencontainers.image.revision=$(git rev-parse HEAD)" \
--label "org.opencontainers.image.version=$(git describe --tags --abbrev=0)" \
--label "org.opencontainers.image.licenses=LGPL-3.0,GPL-3.0" \
-f ./Dockerfile -t "${IMAGE_NAME}"
- name: Log into registry
run: echo "${{ secrets.PACKAGE_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin

- name: Push image
run: |
IMAGE_ID=ghcr.io/${{ github.repository }}
# Change all uppercase to lowercase
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
# Strip git ref prefix from version
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
# Strip "v" prefix from tag name
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
# Use Docker `latest` tag convention
[ "$VERSION" == "master" ] && VERSION=latest
echo IMAGE_ID=$IMAGE_ID
echo VERSION=$VERSION
docker tag $IMAGE_NAME $IMAGE_ID:$VERSION
docker tag $IMAGE_NAME $IMAGE_ID:latest
docker push $IMAGE_ID:$VERSION
docker push $IMAGE_ID:latest
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
unit-test:
strategy:
matrix:
go-version: [1.16.x]
go-version: [1.17.x]
os: [ubuntu-18.04]
runs-on: ${{ matrix.os }}
steps:
Expand Down
107 changes: 1 addition & 106 deletions .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
name: Build Release
strategy:
matrix:
go-version: [1.16.x]
go-version: [1.17.x]
os: [ubuntu-18.04, macos-11, windows-2019]
runs-on: ${{ matrix.os }}
steps:
Expand Down Expand Up @@ -45,19 +45,6 @@ jobs:
- name: Build Binary for ${{matrix.os}}
run: make geth

# ==============================
# Cross Compile for ARM
# ==============================

- name: Build Binary for ARM
if: matrix.os == 'ubuntu-18.04'
env:
GOPATH: /home/runner/work/woodpecker/go
run: |
mkdir -p $GOPATH/src/github.com/binance-chain/bsc/
cp -r ./* $GOPATH/src/github.com/binance-chain/bsc/
cd $GOPATH/src/github.com/binance-chain/bsc/ && make geth-linux-arm
# ==============================
# Upload artifacts
# ==============================
Expand All @@ -83,34 +70,6 @@ jobs:
name: windows
path: ./build/bin/geth.exe

- name: Upload ARM-5 Build
uses: actions/upload-artifact@v2
if: matrix.os == 'ubuntu-18.04'
with:
name: arm5
path: /home/runner/work/woodpecker/go/src/github.com/binance-chain/bsc/build/bin/geth-linux-arm-5

- name: Upload ARM-6 Build
uses: actions/upload-artifact@v2
if: matrix.os == 'ubuntu-18.04'
with:
name: arm6
path: /home/runner/work/woodpecker/go/src/github.com/binance-chain/bsc/build/bin/geth-linux-arm-6

- name: Upload ARM-7 Build
uses: actions/upload-artifact@v2
if: matrix.os == 'ubuntu-18.04'
with:
name: arm7
path: /home/runner/work/woodpecker/go/src/github.com/binance-chain/bsc/build/bin/geth-linux-arm-7

- name: Upload ARM-64 Build
uses: actions/upload-artifact@v2
if: matrix.os == 'ubuntu-18.04'
with:
name: arm64
path: /home/runner/work/woodpecker/go/src/github.com/binance-chain/bsc/build/bin/geth-linux-arm64

release:
name: Release
needs: build
Expand Down Expand Up @@ -143,30 +102,6 @@ jobs:
with:
name: windows
path: ./windows

- name: Download Artifacts
uses: actions/download-artifact@v2
with:
name: arm5
path: ./arm5

- name: Download Artifacts
uses: actions/download-artifact@v2
with:
name: arm6
path: ./arm6

- name: Download Artifacts
uses: actions/download-artifact@v2
with:
name: arm7
path: ./arm7

- name: Download Artifacts
uses: actions/download-artifact@v2
with:
name: arm64
path: ./arm64

- name: Download Config File
run: |
Expand Down Expand Up @@ -226,46 +161,6 @@ jobs:
asset_path: ./windows/geth.exe
asset_name: geth_windows.exe
asset_content_type: application/octet-stream

- name: Upload Release Asset - Linux ARM 5
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./arm5/geth-linux-arm-5
asset_name: geth-linux-arm-5
asset_content_type: application/octet-stream

- name: Upload Release Asset - Linux ARM 6
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./arm6/geth-linux-arm-6
asset_name: geth-linux-arm-6
asset_content_type: application/octet-stream

- name: Upload Release Asset - Linux ARM 7
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./arm7/geth-linux-arm-7
asset_name: geth-linux-arm-7
asset_content_type: application/octet-stream

- name: Upload Release Asset - Linux ARM 64
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./arm64/geth-linux-arm64
asset_name: geth-linux-arm64
asset_content_type: application/octet-stream

- name: Upload Release Asset - MAINNET.ZIP
uses: actions/upload-release-asset@v1
Expand Down
107 changes: 1 addition & 106 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
name: Build Release
strategy:
matrix:
go-version: [1.16.x]
go-version: [1.17.x]
os: [ubuntu-18.04, macos-11, windows-2019]
runs-on: ${{ matrix.os }}
steps:
Expand Down Expand Up @@ -46,19 +46,6 @@ jobs:
- name: Build Binary for ${{matrix.os}}
run: make geth

# ==============================
# Cross Compile for ARM
# ==============================

- name: Build Binary for ARM
if: matrix.os == 'ubuntu-18.04'
env:
GOPATH: /home/runner/work/woodpecker/go
run: |
mkdir -p $GOPATH/src/github.com/binance-chain/bsc/
cp -r ./* $GOPATH/src/github.com/binance-chain/bsc/
cd $GOPATH/src/github.com/binance-chain/bsc/ && make geth-linux-arm
# ==============================
# Upload artifacts
# ==============================
Expand All @@ -84,34 +71,6 @@ jobs:
name: windows
path: ./build/bin/geth.exe

- name: Upload ARM-5 Build
uses: actions/upload-artifact@v2
if: matrix.os == 'ubuntu-18.04'
with:
name: arm5
path: /home/runner/work/woodpecker/go/src/github.com/binance-chain/bsc/build/bin/geth-linux-arm-5

- name: Upload ARM-6 Build
uses: actions/upload-artifact@v2
if: matrix.os == 'ubuntu-18.04'
with:
name: arm6
path: /home/runner/work/woodpecker/go/src/github.com/binance-chain/bsc/build/bin/geth-linux-arm-6

- name: Upload ARM-7 Build
uses: actions/upload-artifact@v2
if: matrix.os == 'ubuntu-18.04'
with:
name: arm7
path: /home/runner/work/woodpecker/go/src/github.com/binance-chain/bsc/build/bin/geth-linux-arm-7

- name: Upload ARM-64 Build
uses: actions/upload-artifact@v2
if: matrix.os == 'ubuntu-18.04'
with:
name: arm64
path: /home/runner/work/woodpecker/go/src/github.com/binance-chain/bsc/build/bin/geth-linux-arm64

release:
name: Release
needs: build
Expand Down Expand Up @@ -145,30 +104,6 @@ jobs:
name: windows
path: ./windows

- name: Download Artifacts
uses: actions/download-artifact@v2
with:
name: arm5
path: ./arm5

- name: Download Artifacts
uses: actions/download-artifact@v2
with:
name: arm6
path: ./arm6

- name: Download Artifacts
uses: actions/download-artifact@v2
with:
name: arm7
path: ./arm7

- name: Download Artifacts
uses: actions/download-artifact@v2
with:
name: arm64
path: ./arm64

- name: Download Config File
run: |
. ./.github/release.env
Expand Down Expand Up @@ -236,46 +171,6 @@ jobs:
asset_name: geth_windows.exe
asset_content_type: application/octet-stream

- name: Upload Release Asset - Linux ARM 5
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./arm5/geth-linux-arm-5
asset_name: geth-linux-arm-5
asset_content_type: application/octet-stream

- name: Upload Release Asset - Linux ARM 6
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./arm6/geth-linux-arm-6
asset_name: geth-linux-arm-6
asset_content_type: application/octet-stream

- name: Upload Release Asset - Linux ARM 7
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./arm7/geth-linux-arm-7
asset_name: geth-linux-arm-7
asset_content_type: application/octet-stream

- name: Upload Release Asset - Linux ARM 64
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./arm64/geth-linux-arm64
asset_name: geth-linux-arm64
asset_content_type: application/octet-stream

- name: Upload Release Asset - MAINNET.ZIP
uses: actions/upload-release-asset@v1
env:
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
unit-test:
strategy:
matrix:
go-version: [1.16.x]
go-version: [1.17.x]
os: [ubuntu-18.04]
runs-on: ${{ matrix.os }}
steps:
Expand Down Expand Up @@ -47,6 +47,5 @@ jobs:
env:
ANDROID_HOME: "" # Skip android test
run: |
go clean -testcache
make test
Loading

0 comments on commit 996163f

Please sign in to comment.