Skip to content

Commit

Permalink
Sprint 1.11 (#313)
Browse files Browse the repository at this point in the history
* feature: synchronized up-to-date DEX bridge interface

* feature: updated gosdk version

* fix: fixed bugs

* fix: fixed bugs

* Silent the zcnbridge verbose logs when `--silent

* use 0box-sdk logger for zcnbridge (#304)

* update gosdk

* update gosdk

* update gosdk, fix errors

* Update/self hosted runner (#308)

* update self hosted runner

* updated self hosted runner

* updated gosdk

* updated gosdk

* updated gosdk

* update gosdk

* use msys2 to build windows binaries (#317)

* use msys2 to build windows binaries

* add build-windows in release-wallet.yml

* add actions checkout

* Feature: integrate token swap logic into WZCN burn command (#316)

* feature: added swap logic

* feature: added swap logic for burn wzcn command

* fix: replaced gosdk

* fix: fixed bugs

* fix: fixed bugs

* feature: replaced confusing param naming

* fix: updated gosdk version

---------

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

* Fix wrong unit compare (#318)

* Add option to mint-zcn for specific burn txn (#322)

* Fix: add different naming for the different results of Bridge operations  (#324)

* fix: added different result messaging for different cases of bridge operations

* fix: debug line

* fix: removed debug line

* Feature: add reset nonce command (#329)

* feature: add reset nonce command

* fix: remove debug gosdk version

* feature: update gosdk version

* update gosdk (#326)

* update gosdk

* revert useless changes

---------

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

* updated gosdk

* add runner (#321)

Co-authored-by: Manohar Reddy <[email protected]>

* update gosdk (#331)

* Feature: add BNT, USDC and EURC tokens for Swap (#327)

* feature: add multiple tokens for swap

* feature: fixed ERC20 approve

* feature: made DEX operations consistent with web-apps

* fix: fixed swap approval

* feature: update go.mod

* fix: fixed bug

* feature: updated gosdk

* Updated gosdk (#332)

* Add option to select eth address index (#333)

* Add --account_index option (#334)

* Add bip32 option to import account (#335)

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

* feature: added fork creation

* feature: improved Tenderly creation flow

* update gosdk (#337)

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

* upgrade GoSDK to sprint-1.11 (#339)

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

* upgrade GoSDK to sprint-1.11 (#341)

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

* upgrade GoSDK to sprint-1.11 (#342)

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

* upgrade GoSDK to sprint-1.11 (#343)

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

* update gosdk to v1.11.0 (#347)

---------

Co-authored-by: YarikRevich <[email protected]>
Co-authored-by: Yaroslav Svitlytskyi <[email protected]>
Co-authored-by: Yaroslav Svitlytskyi <[email protected]>
Co-authored-by: peterlimg <[email protected]>
Co-authored-by: Manohar Reddy <[email protected]>
Co-authored-by: shahnawaz-creator <[email protected]>
Co-authored-by: dabasov <[email protected]>
Co-authored-by: peterlimg <[email protected]>
Co-authored-by: Ebrahim Gomaa <[email protected]>
Co-authored-by: Tapish Sinha <[email protected]>
Co-authored-by: Jayash Satolia <[email protected]>
Co-authored-by: service-0chain <[email protected]>
Co-authored-by: service-0chain <[email protected]>
  • Loading branch information
14 people authored Dec 19, 2023
1 parent eb51fe3 commit f8b8e6e
Show file tree
Hide file tree
Showing 19 changed files with 1,216 additions and 234 deletions.
134 changes: 50 additions & 84 deletions .github/workflows/build-zwallet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,56 +4,37 @@ on:
branches:
- master
- staging
- sprint*
tags:
- 'v*.*.*'
pull_request:

jobs:
build-linux:
name: Build-linux
runs-on: [self-hosted, arc-runner]
runs-on: [self-hosted, ubuntu-build]
steps:
- name: Install deps
run: |
sudo apt update
sudo apt -y install build-essential nghttp2 libnghttp2-dev libssl-dev
- name: Setup gopath and gocache
run: |
echo "GOPATH=$HOME/go" >> $GITHUB_ENV
echo "GOCACHE=$GITHUB_WORKSPACE/.gocache" >> $GITHUB_ENV
- name: Setup go 1.18
uses: actions/setup-go@v2
uses: actions/setup-go@v3
with:
go-version: ^1.20.0 # The Go version to download (if necessary) and use.

- 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-staging" >> $GITHUB_ENV
else
echo "TAG=$(echo ${GITHUB_REF#refs/tags/})" >> $GITHUB_ENV
fi

- name: Install
run: make install

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

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

- name: 'Upload Artifact'
uses: actions/upload-artifact@v2
with:
Expand All @@ -64,51 +45,61 @@ jobs:
build-windows:
name: Build-windows
runs-on: windows-runner
defaults:
run:
shell: msys2 {0}
strategy:
matrix:
sys: [ MINGW64 ]
steps:
- name: Setup go
uses: actions/setup-go@v3
- uses: msys2/setup-msys2@v2
with:
go-version: ^1.20.0 # 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

- name: Set GITHUB_ENV
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
}

- name: Install
run: make install

- name: Zip release
run: |
copy zwallet zwallet.exe
7z a zwallet-windows.zip zwallet.exe
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: zwallet-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 zwallet zwallet.exe
zip zwallet-windows.zip zwallet.exe libgcc_s_seh-1.dll libstdc++-6.dll libwinpthread-1.dll
- name: 'Upload Artifact'
uses: actions/upload-artifact@v2
with:
name: zwallet-windows
path: zwallet
name: zwallet-windows.zip
path: zwallet-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 @@ -119,34 +110,9 @@ jobs:
go-version: ^1.20.0 # The Go version to download (if necessary) and use.
- 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-staging" >> $GITHUB_ENV
else
echo "TAG=$(echo ${GITHUB_REF#refs/tags/})" >> $GITHUB_ENV
fi

- name: Install
run: make install
- name: Zip release
run: tar -czvf zwallet-macos.tar.gz ./zwallet

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

- name: 'Upload Artifact'
uses: actions/upload-artifact@v2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:

env:
GITHUB_TOKEN: ${{ secrets.GOSDK }}

jobs:
build-linux:
name: Build-Linux
Expand All @@ -23,19 +23,19 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: ^1.20.0

- name: Install
run: make install

- name: Get Branch
id: get_version
run: |
VERSION=$(echo ${GITHUB_REF#refs/heads/})
VERSION=$(echo ${GITHUB_REF#refs/heads/})
echo ::set-output name=TAG::${VERSION}
- name: Zip release
Expand Down Expand Up @@ -69,7 +69,7 @@ jobs:
delete_release: true # default: false
tag_name: v0.0.0 # tag name to delete
repo: 0chain/zwalletcli # target repo (optional). defaults to repo running this action

- name: Create Release for Fixed v0.0.0
if: github.event.inputs.fixed_tag == 'yes' && steps.get_version.outputs.TAG == 'master'
uses: zendesk/action-create-release@v1
Expand All @@ -78,52 +78,83 @@ jobs:
release_name: v0.0.0
draft: false
prerelease: false

############################### v*.*.* #############################

- name: Create Release for Next Version
id: create_release_next_version
uses: zendesk/action-create-release@v1
uses: zendesk/action-create-release@v1
with:
draft: false
prerelease: false
auto_increment_type: ${{ github.event.inputs.version_tag }}
tag_schema: semantic

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

build-windows:
name: Build-Windows
name: Build-windows
runs-on: windows-runner

defaults:
run:
shell: msys2 {0}
strategy:
matrix:
sys: [ MINGW64 ]
steps:
- name: Setup go
uses: actions/setup-go@v3
- uses: msys2/setup-msys2@v2
with:
go-version: ^1.20.0 # 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

- name: Install
run: make install

- name: Zip release
run: |
copy zwallet zwallet.exe
7z a zwallet-windows.zip zwallet.exe
# download dll files
wget https://github.com/0chain/zboxcli/files/11840033/windows.dll.s.zip
unzip -o windows.dll.s.zip
cp zwallet zwallet.exe
zip zwallet-windows.zip zwallet.exe libgcc_s_seh-1.dll libstdc++-6.dll libwinpthread-1.dll
- name: 'Upload Artifact'
uses: actions/upload-artifact@v2
with:
name: zwallet-windows
path: zwallet
name: zwallet-windows.zip
path: zwallet-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 @@ -134,16 +165,16 @@ jobs:
go-version: ^1.20.0 # The Go version to download (if necessary) and use.
- name: Checkout
uses: actions/checkout@v2

- name: Install
run: make install

- name: Get Branch
id: get_version
run: |
VERSION=$(echo ${GITHUB_REF#refs/heads/})
VERSION=$(echo ${GITHUB_REF#refs/heads/})
echo ::set-output name=TAG::${VERSION}
- name: Zip release
run: tar -czvf zwallet-macos.tar.gz ./zwallet

Expand All @@ -153,4 +184,4 @@ jobs:
name: zwallet-macos
path: zwallet
retention-days: 5

3 changes: 1 addition & 2 deletions .github/workflows/system_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,10 @@ 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 f8b8e6e

Please sign in to comment.