Skip to content

Commit

Permalink
Sprint 1.11 (#554)
Browse files Browse the repository at this point in the history
* Updated self hosted macos-runner & windows-runner (#517)

* Updated self hosted macos-runner & windows-runner

* updated self hosted runners

* Fix upload --web-streaming (#527)

* Fix upload --web-streaming

Update gosdk to use correct ffmpeg commands

* Fix tests

* fix(gomod): upgraded gosdk with latest sprint-1.11

* chore(gomod): go mod tidy

---------

Co-authored-by: Lz <[email protected]>

* feature: added all provider for stake pool related commands (#526)

* update gosdk for list optimization

* updated gosdk

* update gosdk

* fix wait when using multiupload (#533)

* use msys2 to build windows binaries (#524)

* debug windows builds

* start builds on PRs

* remove un-used targets

* fix syntax error

* run only windows

* printend

* remove set GITHUB_ENV

* install make

* install choco

* set choco install path

* build-windows

* install zip

* also include dll files in the zip file

* comment out upload-release-action git action

* also install unzip

* cleanup release

* cleanup workspace

* overwrite current files while unzipping

* add back gosdk.yaml

* use .yml extension

* actions checkout

* use docker to build linux binary

* lsb_release print

* Revert "Merge pull request #498 from 0chain/hm90121-patch-1"

This reverts commit 33f24ae, reversing
changes made to 46d3112.

* Remove download from single blobber (#543)

* Fix download (#544)

* updated gosdk

* Cleaned up update_terms flag

* update gosdk (#548)

* add ubuntu 20 runner (#546)

* add ubuntu 20 runner

* fix runner

* add ubuntu20 runner

* add ubuntu20 runner

* add ubuntu20 runner

* fix runner

* add ubuntu 20 runner

* add ubuntu 20 runner

* add ubuntu 20 runner

* add ubuntu 20 runner

---------

Co-authored-by: Yury <[email protected]>

* update gosdk

* go mod tidy

* Updated gosdk (#551)

* Un Comment windows and macos build runs (#549)

* uncomment windows build runs

* update gosdk to the latest

* update to Go1.20 (#550)

* update to go version 1.20

* update gosdk

---------

Co-authored-by: Yury <[email protected]>

* Fix update alloc min lock

* Feature: implement fork per run strategy (#553)

* feature: added fork creation

* fix: fixed bug

* feature: improved Tenderly fork creation flow

* update gosdk (#557)

* feature: added custom block number during Tenderly fork creation (#560)

* upgrade GoSDK to sprint-1.11 (#559)

Co-authored-by: service-0chain <[email protected]>

* Fix update alloc min lock

* upgrade GoSDK to sprint-1.11

* upgrade GoSDK to sprint-1.11 (#564)

Co-authored-by: service-0chain <[email protected]>

* upgrade GoSDK to sprint-1.11 (#566)

Co-authored-by: service-0chain <[email protected]>

* upgrade GoSDK to sprint-1.11 (#567)

Co-authored-by: service-0chain <[email protected]>

* use multi download in sync (#569)

* update gosdk to v1.11.0 (#571)

---------

Co-authored-by: Kishan Dhakan <[email protected]>
Co-authored-by: shahnawaz-creator <[email protected]>
Co-authored-by: peterlimg <[email protected]>
Co-authored-by: Lz <[email protected]>
Co-authored-by: Yaroslav Svitlytskyi <[email protected]>
Co-authored-by: Hitenjain14 <[email protected]>
Co-authored-by: dabasov <[email protected]>
Co-authored-by: Kishan Dhakan <[email protected]>
Co-authored-by: Hitenjain14 <[email protected]>
Co-authored-by: devyetii <[email protected]>
Co-authored-by: Jayash Satolia <[email protected]>
Co-authored-by: Jayash Satolia <[email protected]>
Co-authored-by: Tapish Sinha <[email protected]>
Co-authored-by: GuruHubb <[email protected]>
Co-authored-by: service-0chain <[email protected]>
Co-authored-by: service-0chain <[email protected]>
  • Loading branch information
17 people authored Dec 19, 2023
1 parent d7894c4 commit 57a2f4d
Show file tree
Hide file tree
Showing 18 changed files with 358 additions and 547 deletions.
140 changes: 56 additions & 84 deletions .github/workflows/build-zbox.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,17 @@ on:
push:
branches:
- master
- dev
- sprint*
- staging
tags:
- 'v*.*.*'
pull_request:
workflow_dispatch:

jobs:
build-linux:
name: Build-linux
runs-on: [self-hosted, build]
runs-on: [self-hosted, ubuntu-build]
steps:
- name: Install deps
run: |
Expand All @@ -22,39 +23,21 @@ jobs:
- name: Checkout
uses: actions/checkout@v2

- name: Setup gopath and gocache
run: |
echo "GOPATH=$HOME/go" >> $GITHUB_ENV
echo "GOCACHE=$GITHUB_WORKSPACE/.gocache" >> $GITHUB_ENV
- name: Setup go 1.20
uses: actions/setup-go@v2
uses: actions/setup-go@v3
with:
go-version: '1.20' # The Go version to download (if necessary) and use.

- name: Set GITHUB_ENV
run: |
echo "BRANCH=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_ENV
if [[ "${{github.base_ref}}" == "master" || "${{github.ref}}" == "refs/heads/master" ]]; then
echo "TAG=v0.0.0-master" >> $GITHUB_ENV
elif [[ "${{github.base_ref}}" == "dev" || "${{github.ref}}" == "refs/heads/dev" ]]; then
echo "TAG=v0.0.0-dev" >> $GITHUB_ENV
elif [[ "${{github.base_ref}}" == "staging" || "${{github.ref}}" == "refs/heads/staging" ]]; then
echo "TAG=v0.0.0-staging" >> $GITHUB_ENV
else
echo "TAG=$(echo ${GITHUB_REF#refs/tags/})" >> $GITHUB_ENV
fi
go-version: '1.20'

- name: Install
run: make install

- name: Zip release
run: tar -czvf zbox-linux.tar.gz ./zbox

- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: zbox-linux.tar.gz
tag: ${{ env.TAG }}
overwrite: true
file_glob: true
run: |
lsb_release -a
make install
- name: 'Upload Artifact'
uses: actions/upload-artifact@v2
Expand All @@ -66,51 +49,61 @@ jobs:
build-windows:
name: Build-windows
runs-on: windows-runner
defaults:
run:
shell: msys2 {0}
strategy:
matrix:
sys: [ MINGW64 ]
steps:
- name: Setup go 1.20
uses: actions/setup-go@v2
- uses: msys2/setup-msys2@v2
with:
go-version: '1.20' # The Go version to download (if necessary) and use.
msystem: ${{matrix.sys}}

- name: Checkout
uses: actions/checkout@v2
- name: Install libraries
run: |
echo 'Y'| pacman -S base-devel git gcc make
- name: Set GITHUB_ENV
- name: Install Clang and Go for MINGW64
run: |
IF ( "${{github.base_ref}}" -eq "master" -OR "${{github.ref}}" -eq "refs/heads/master" ){
echo "TAG=v0.0.0-master" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append
} ElseIf ( "${{github.base_ref}}" -eq "dev" -OR "${{github.ref}}" -eq "refs/heads/dev" ){
echo "TAG=v0.0.0-dev" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append
} ElseIf ( "${{github.base_ref}}" -eq "staging" -OR "${{github.ref}}" -eq "refs/heads/staging" ){
echo "TAG=v0.0.0-staging" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append
} ELSE {
echo "TAG=${{github.ref}}" | %{$_ -replace('refs/tags/', '')} | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append
}
echo 'y'| pacman -S mingw-w64-x86_64-clang mingw-w64-x86_64-go zip unzip
- name: Set environment variables
run: |
export GOROOT=/mingw64/lib/go
export GOPATH=/mingw64
export PATH=$PATH:$GOROOT/bin
export PATH=$PATH:/usr/bin/7z
# use clang as a default compiler for CGO
go env -w "CC=/mingw64/bin/clang.exe"
- name: Checkout
uses: actions/checkout@v2

- name: Install
run: make install

- name: Zip release
run: |
copy zbox zbox.exe
7z a zbox-windows.zip zbox.exe
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: zbox-windows.zip
tag: ${{ env.TAG }}
overwrite: true
file_glob: true
# download dll files
wget https://github.com/0chain/zboxcli/files/11840033/windows.dll.s.zip
unzip -o windows.dll.s.zip
cp zbox zbox.exe
zip zbox-windows.zip zbox.exe libgcc_s_seh-1.dll libstdc++-6.dll libwinpthread-1.dll
- name: 'Upload Artifact'
uses: actions/upload-artifact@v2
with:
name: zbox-windows
path: zbox
name: zbox-windows.zip
path: zbox-windows.zip
retention-days: 5

- name: cleanup workspace
run: |
rm -Recurse ${{github.workspace}}\*
shell: powershell

build-macos:
name: Build-macos
runs-on: macos-runner
Expand All @@ -124,37 +117,16 @@ jobs:
- name: Checkout
uses: actions/checkout@v2

- name: Set GITHUB_ENV
run: |
echo "BRANCH=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_ENV
if [[ "${{github.base_ref}}" == "master" || "${{github.ref}}" == "refs/heads/master" ]]; then
echo "TAG=v0.0.0-master" >> $GITHUB_ENV
elif [[ "${{github.base_ref}}" == "dev" || "${{github.ref}}" == "refs/heads/dev" ]]; then
echo "TAG=v0.0.0-dev" >> $GITHUB_ENV
elif [[ "${{github.base_ref}}" == "staging" || "${{github.ref}}" == "refs/heads/staging" ]]; then
echo "TAG=v0.0.0-dev" >> $GITHUB_ENV
else
echo "TAG=$(echo ${GITHUB_REF#refs/tags/})" >> $GITHUB_ENV
fi
- name: Install
run: make install
- name: Zip release
run: tar -czvf zbox-macos.tar.gz ./zbox

- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: zbox-macos.tar.gz
tag: ${{ env.TAG }}
overwrite: true
file_glob: true

- name: 'Upload Artifact'
uses: actions/upload-artifact@v2
with:
name: zbox-macos
path: zbox
retention-days: 5

- name: cleanup workspace
run: |
rm -rf ./*
17 changes: 6 additions & 11 deletions .github/workflows/gosdk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,37 +8,32 @@ on:
workflow_dispatch:
inputs:
gosdk:
description: 'The version/branch of 0Chain GoSDK'
required: true
base:
description: the base branch to which PR needs to be raised
description: 'The 0Chain GoSDK version or branch'
required: true

jobs:
create-pr:
runs-on: [arc-runner]
runs-on: [self-hosted, build]
steps:
- name: Setup go 1.20
uses: actions/setup-go@v2
with:
go-version: '1.20'

- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.base }}
uses: actions/checkout@v1

- name: Upgrade 0Chain GoSDK
run: |
echo "BRANCH=$(echo ${{github.event.inputs.gosdk}} | sed 's/\//-/g')" >> $GITHUB_ENV
go get github.com/0chain/gosdk@${{github.event.inputs.gosdk}}
go mod tidy
- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
with:
base: ${{ github.event.inputs.base }}
base: staging
token: ${{ secrets.GOSDK }}
commit-message: upgrade GoSDK to ${{ github.event.inputs.gosdk }}
branch: gosdk-upgrade-${{ env.BRANCH }}
Expand All @@ -48,5 +43,5 @@ jobs:
0Chain GoSDK `${{ github.event.inputs.gosdk }}` is released.
see full changelog on https://github.com/0chain/gosdk/releases/tag/${{ github.event.inputs.gosdk }}
draft: false
reviewers: guruhubb
reviewers: cnlangzi
labels: GoSDK
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: BUILD-ZBOXCLI
name: RELEASE-ZBOXCLI

on:
workflow_dispatch:
Expand All @@ -18,7 +18,7 @@ env:
jobs:
build-linux:
name: Build-linux
runs-on: [self-hosted, build]
runs-on: [self-hosted, ubuntu20]

steps:
- name: Checkout code
Expand Down Expand Up @@ -96,11 +96,34 @@ jobs:
build-windows:
name: Build-windows
runs-on: windows-runner
defaults:
run:
shell: msys2 {0}
strategy:
matrix:
sys: [ MINGW64 ]
steps:
- name: Setup go 1.20
uses: actions/setup-go@v2
- uses: msys2/setup-msys2@v2
with:
go-version: '1.20' # The Go version to download (if necessary) and use.
msystem: ${{matrix.sys}}

- name: Install libraries
run: |
echo 'Y'| pacman -S base-devel git gcc make
- name: Install Clang and Go for MINGW64
run: |
echo 'y'| pacman -S mingw-w64-x86_64-clang mingw-w64-x86_64-go zip unzip
- name: Set environment variables
run: |
export GOROOT=/mingw64/lib/go
export GOPATH=/mingw64
export PATH=$PATH:$GOROOT/bin
export PATH=$PATH:/usr/bin/7z
# use clang as a default compiler for CGO
go env -w "CC=/mingw64/bin/clang.exe"
- name: Checkout
uses: actions/checkout@v2
Expand All @@ -110,16 +133,24 @@ jobs:

- name: Zip release
run: |
copy zbox zbox.exe
7z a zbox-windows.zip zbox.exe
# download dll files
wget https://github.com/0chain/zboxcli/files/11840033/windows.dll.s.zip
unzip -o windows.dll.s.zip
cp zbox zbox.exe
zip zbox-windows.zip zbox.exe libgcc_s_seh-1.dll libstdc++-6.dll libwinpthread-1.dll
- name: 'Upload Artifact'
uses: actions/upload-artifact@v2
with:
name: zbox-windows
path: zbox
name: zbox-windows.zip
path: zbox-windows.zip
retention-days: 5

- name: cleanup workspace
run: |
rm -Recurse ${{github.workspace}}\*
shell: powershell

build-macos:
name: Build-macos
runs-on: macos-runner
Expand All @@ -145,3 +176,7 @@ jobs:
name: zbox-macos
path: zbox
retention-days: 5

- name: cleanup workspace
run: |
rm -rf ./*
3 changes: 1 addition & 2 deletions .github/workflows/system_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,9 @@ jobs:
DEV8KC: ${{ secrets.DEV8KC }}
DEV9KC: ${{ secrets.DEV9KC }}
SUBGRAPH_API_URL: ${{ secrets.SUBGRAPH_API_URL }}
TENDERLY_FORK_ID: ${{ secrets.TENDERLY_FORK_ID }}
TENDERLY_SECRET: ${{ secrets.TENDERLY_SECRET }}
DEVOPS_CHANNEL_WEBHOOK_URL: ${{ secrets.DEVOPS_CHANNEL_WEBHOOK_URL }}
GRAPHNODE_SC: ${{ secrets.GRAPHNODE_SC }}
GRAPHNODE_NETWORK: ${{ secrets.GRAPHNODE_NETWORK }}
GRAPHNODE_ETHEREUM_NODE_URL: https://rpc.tenderly.co/fork/${{ secrets.TENDERLY_FORK_ID }}
S3_ACCESS_KEY: ${{ secrets.S3_ACCESS_KEY }}
S3_SECRET_KEY: ${{ secrets.S3_SECRET_KEY }}
Loading

0 comments on commit 57a2f4d

Please sign in to comment.