Skip to content

Commit

Permalink
Merge pull request #903 from bnb-chain/develop
Browse files Browse the repository at this point in the history
release: prepare for release v0.10.4
  • Loading branch information
unclezoro authored Dec 23, 2022
2 parents 7411f1e + 75ca04a commit 23aff5f
Show file tree
Hide file tree
Showing 38 changed files with 2,343 additions and 276 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
vendor
build
2 changes: 1 addition & 1 deletion .github/workflows/docker-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
if: github.event_name == 'push'

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Build image
run: |
Expand Down
14 changes: 10 additions & 4 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ jobs:
steps:
- uses: actions/setup-go@v3
with:
go-version: 1.16
go-version: 1.17
- uses: actions/checkout@v3
- uses: actions/cache@v2
- uses: actions/cache@v3
with:
path: ~/go/bin/golangci-lint
key: golangci-lint-1.45.2
- uses: actions/cache@v2
- uses: actions/cache@v3
with:
path: |
~/go/pkg/mod
Expand All @@ -27,5 +27,11 @@ jobs:
${{ runner.os }}-go-
- run: git config --global url."https://${{ secrets.GH_ACCESS_TOKEN }}@github.com".insteadOf "https://github.com"
- run: go env -w GOPRIVATE="github.com/bnb-chain/*"
- run: go mod tidy && go mod download
- name: golangci-lint
run: make lint
uses: golangci/golangci-lint-action@v3
with:
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
version: v1.45.2
skip-pkg-cache: true
args: --timeout=99m
37 changes: 27 additions & 10 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,17 @@ on: ["push", "pull_request", "workflow_dispatch"]
jobs:
integration-test:
runs-on: ubuntu-latest
env:
GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }}
steps:
- uses: actions/checkout@v3
- name: Setup go
uses: actions/setup-go@v3
with:
go-version: 1.16
- name: Checkout
uses: actions/checkout@v2
- uses: actions/cache@v2
go-version: 1.17
- uses: actions/cache@v3
with:
path: ~/go/bin
key: tools-v0
- uses: actions/cache@v2
- uses: actions/cache@v3
with:
path: |
~/go/pkg/mod
Expand All @@ -28,10 +24,31 @@ jobs:
restore-keys: |
${{ runner.os }}-go-
- run: sudo apt-get update -y && sudo apt-get install -y expect
- run: git config --global url."https://${{ secrets.GH_ACCESS_TOKEN }}@github.com".insteadOf "https://github.com"
- run: go env -w GOPRIVATE="github.com/bnb-chain/*"
# used to debug workflow
# - name: Setup tmate session
# uses: mxschmitt/action-tmate@v3
- run: make integration_test
- run: make bep159_integration_test integration_test
coverage-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup go
uses: actions/setup-go@v3
with:
go-version: 1.17
- uses: actions/cache@v3
with:
path: ~/go/bin
key: tools-v0
- uses: actions/cache@v3
with:
path: |
~/go/pkg/mod
~/.cache/go-build
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- run: make test
- run: make test_coverage
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
21 changes: 21 additions & 0 deletions .github/workflows/multi-nodes-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: multi-nodes-test

on: ["push", "pull_request", "workflow_dispatch"]

jobs:
multi-nodes-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup go
uses: actions/setup-go@v3
with:
go-version: 1.17
- run: make docker.build docker.generate docker.start
# fix docker permission issue
- run: chmod 777 -R ~/work/node/node/build/devnet
- run: sleep 20
# used to debug workflow
# - name: Setup tmate session
# uses: mxschmitt/action-tmate@v3
- run: make multi-nodes-test
101 changes: 28 additions & 73 deletions .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@ jobs:
name: Build Release
strategy:
matrix:
go-version: [1.16.x]
os: [ubuntu-18.04, macos-11, windows-2019]
go-version: [1.17.x]
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Install Go
uses: actions/setup-go@v2
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}

- uses: actions/cache@v2
- uses: actions/cache@v3
with:
# In order:
# * Module download cache
Expand Down Expand Up @@ -58,52 +58,55 @@ jobs:
# ==============================

- name: Upload Linux Build
uses: actions/upload-artifact@v2
if: matrix.os == 'ubuntu-18.04'
uses: actions/upload-artifact@v3
if: matrix.os == 'ubuntu-latest'
with:
name: linux
path: ./build

- name: Upload MacOS Build
uses: actions/upload-artifact@v2
if: matrix.os == 'macos-11'
uses: actions/upload-artifact@v3
if: matrix.os == 'macos-latest'
with:
name: macos
path: ./build

- name: Upload Windows Build
uses: actions/upload-artifact@v2
if: matrix.os == 'windows-2019'
uses: actions/upload-artifact@v3
if: matrix.os == 'windows-latest'
with:
name: windows
path: ./build

release:
name: Release
needs: build
runs-on: ubuntu-18.04
runs-on: ubuntu-latest
steps:
- name: Set Env
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV

- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v3

# ==============================
# Download artifacts
# ==============================

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

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

- name: Download Artifacts
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: windows
path: ./windows
Expand All @@ -115,67 +118,19 @@ jobs:
- run: zip -r testnet_config.zip asset/testnet

- name: Create Release
id: create_release
uses: actions/create-release@latest
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ github.ref_name }}
release_name: ${{ github.ref_name }}
tag_name: ${{ env.RELEASE_VERSION }}
release_name: ${{ env.RELEASE_VERSION }}
body: |
git commit: ${{ github.sha }}
draft: true
prerelease: true

# Check downloaded files
- run: ls

- name: Upload Release Asset - Linux
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: ./linux_binary.zip
asset_name: linux_binary.zip
asset_content_type: application/octet-stream

- name: Upload Release Asset - MacOS
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: ./macos_binary.zip
asset_name: macos_binary.zip
asset_content_type: application/octet-stream

- name: Upload Release Asset - Windows
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: ./windows_binary.zip
asset_name: windows_binary.zip
asset_content_type: application/octet-stream

- name: Upload Mainnet Config
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: ./mainnet_config.zip
asset_name: mainnet_config.zip
asset_content_type: application/octet-stream

- name: Upload Testnet Config
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: ./testnet_config.zip
asset_name: testnet_config.zip
asset_content_type: application/octet-stream
files: |
./linux_binary.zip
./macos_binary.zip
./windows_binary.zip
./mainnet_config.zip
./testnet_config.zip
Loading

0 comments on commit 23aff5f

Please sign in to comment.