Skip to content

Commit

Permalink
Merge commit '7b6024c' into elmato/merge-kayan_spring-to-main
Browse files Browse the repository at this point in the history
  • Loading branch information
elmato committed Aug 13, 2024
2 parents 9a999b4 + 7b6024c commit 823cccc
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 76 deletions.
8 changes: 2 additions & 6 deletions .cicd/defaults.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
{
"leap-dev":{
"target":"5",
"prerelease":false
},
"leap":{
"target":"5",
"antelope-spring-dev":{
"target":"main",
"prerelease":false
},
"cdt":{
Expand Down
111 changes: 41 additions & 70 deletions .github/workflows/node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,6 @@ on:
pull_request:
workflow_dispatch:
inputs:
override-leap-dev:
description: Override leap-dev target
type: string
override-leap-dev-prerelease:
type: choice
description: Override leap-dev prelease
options:
- default
- true
- false
override-leap:
description: Override leap target
type: string
override-leap-prerelease:
type: choice
description: Override leap prelease
options:
- default
- true
- false
override-cdt:
description: 'Override cdt target'
type: string
Expand Down Expand Up @@ -153,10 +133,8 @@ jobs:
name: Determine Versions
runs-on: ubuntu-latest
outputs:
leap-dev-target: ${{steps.versions.outputs.leap-dev-target}}
leap-dev-prerelease: ${{steps.versions.outputs.leap-dev-prerelease}}
leap-target: ${{steps.versions.outputs.leap-target}}
leap-prerelease: ${{steps.versions.outputs.leap-prerelease}}
antelope-spring-dev-target: ${{steps.versions.outputs.antelope-spring-dev-target}}
antelope-spring-dev-prerelease: ${{steps.versions.outputs.antelope-spring-dev-prerelease}}
cdt-target: ${{steps.versions.outputs.cdt-target}}
cdt-prerelease: ${{steps.versions.outputs.cdt-prerelease}}
eos-evm-contract-target: ${{steps.versions.outputs.eos-evm-contract-target}}
Expand All @@ -169,28 +147,14 @@ jobs:
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}
run: |
DEFAULTS_JSON=$(curl -sSfL $(gh api https://api.github.com/repos/${{github.repository}}/contents/.cicd/defaults.json?ref=${{github.sha}} --jq .download_url))
echo leap-dev-target=$(echo "$DEFAULTS_JSON" | jq -r '."leap-dev".target') >> $GITHUB_OUTPUT
echo leap-dev-prerelease=$(echo "$DEFAULTS_JSON" | jq -r '."leap-dev".prerelease') >> $GITHUB_OUTPUT
echo leap-target=$(echo "$DEFAULTS_JSON" | jq -r '."leap".target') >> $GITHUB_OUTPUT
echo leap-prerelease=$(echo "$DEFAULTS_JSON" | jq -r '."leap".prerelease') >> $GITHUB_OUTPUT
echo antelope-spring-dev-target=$(echo "$DEFAULTS_JSON" | jq -r '."antelope-spring-dev".target') >> $GITHUB_OUTPUT
echo antelope-spring-dev-prerelease=$(echo "$DEFAULTS_JSON" | jq -r '."antelope-spring-dev".prerelease') >> $GITHUB_OUTPUT
echo cdt-target=$(echo "$DEFAULTS_JSON" | jq -r '."cdt".target') >> $GITHUB_OUTPUT
echo cdt-prerelease=$(echo "$DEFAULTS_JSON" | jq -r '."cdt".prerelease') >> $GITHUB_OUTPUT
echo eos-evm-contract-target=$(echo "$DEFAULTS_JSON" | jq -r '."eos-evm-contract".target') >> $GITHUB_OUTPUT
echo eos-evm-contract-prerelease=$(echo "$DEFAULTS_JSON" | jq -r '."eos-evm-contract".prerelease') >> $GITHUB_OUTPUT
echo eos-evm-miner-target=$(echo "$DEFAULTS_JSON" | jq -r '."eos-evm-miner".target') >> $GITHUB_OUTPUT
if [[ "${{inputs.override-leap-dev}}" != "" ]]; then
echo leap-dev-target=${{inputs.override-leap-dev}} >> $GITHUB_OUTPUT
fi
if [[ "${{inputs.override-leap-dev-prerelease}}" == +(true|false) ]]; then
echo leap-dev-prerelease=${{inputs.override-leap-dev-prerelease}} >> $GITHUB_OUTPUT
fi
if [[ "${{inputs.override-leap}}" != "" ]]; then
echo leap-target=${{inputs.override-leap}} >> $GITHUB_OUTPUT
fi
if [[ "${{inputs.override-leap-prerelease}}" == +(true|false) ]]; then
echo leap-prerelease=${{inputs.override-leap-prerelease}} >> $GITHUB_OUTPUT
fi
if [[ "${{inputs.override-cdt}}" != "" ]]; then
echo cdt-target=${{inputs.override-cdt}} >> $GITHUB_OUTPUT
fi
Expand Down Expand Up @@ -230,48 +194,55 @@ jobs:
apt update
apt upgrade -y
- name: Download CDT
- name: Download cdt
uses: AntelopeIO/asset-artifact-download-action@v3
with:
owner: AntelopeIO
repo: cdt
file: 'cdt_.*amd64.deb'
target: '${{needs.versions.outputs.cdt-target}}'
prereleases: ${{fromJSON(needs.versions.outputs.cdt-prerelease)}}
file: 'cdt_.*amd64.deb'
token: ${{ secrets.GITHUB_TOKEN }}

- name: Install CDT
run: apt-get install -y ./cdt*.deb
artifact-name: cdt_ubuntu_package_amd64

- name: Download leap-dev binary
- name: Download antelope-spring-dev
uses: AntelopeIO/asset-artifact-download-action@v3
with:
owner: AntelopeIO
repo: leap
target: '${{needs.versions.outputs.leap-dev-target}}'
prereleases: ${{fromJSON(needs.versions.outputs.leap-dev-prerelease)}}
file: 'leap-dev.*ubuntu22\.04_amd64.deb'
container-package: experimental-binaries
artifact-name: leap-dev-ubuntu22-amd64
token: ${{ secrets.GITHUB_TOKEN }}

- name: Download leap binary
repo: spring
file: 'antelope-spring-dev.*ubuntu22\.04_amd64.deb'
target: '${{needs.versions.outputs.antelope-spring-dev-target}}'
prereleases: ${{fromJSON(needs.versions.outputs.antelope-spring-dev-prerelease)}}
artifact-name: antelope-spring-dev-ubuntu22-amd64
container-package: antelope-spring-experimental-binaries

- name: Download antelope-spring binary
uses: AntelopeIO/asset-artifact-download-action@v3
with:
owner: AntelopeIO
repo: leap
target: '${{needs.versions.outputs.leap-target}}'
prereleases: ${{fromJSON(needs.versions.outputs.leap-prerelease)}}
file: 'leap_.*_amd64.deb'
artifact-name: leap-deb-amd64
token: ${{ secrets.GITHUB_TOKEN }}
repo: spring
file: 'antelope-spring_.*_amd64.deb'
target: '${{needs.versions.outputs.antelope-spring-dev-target}}'
prereleases: ${{fromJSON(needs.versions.outputs.antelope-spring-dev-prerelease)}}
artifact-name: antelope-spring-deb-amd64

- name: Install Leap
- name: Install packages
run: |
apt-get install -y ./leap*.deb
- name: Link Leap TestHarness Module (fix for v4 of leap)
run: ln -s /usr/share/leap_testing/tests/TestHarness /usr/lib/python3/dist-packages/TestHarness
apt-get update && apt-get upgrade -y
apt install -y ./*.deb
apt-get install -y cmake
rm ./*.deb
echo "=== after install packages ==="
ls -ltr /usr
ls -ltr /usr/bin/
ls -ltr /usr/lib/
ls -ltr /usr/share/
echo "=== files in /usr/share/spring_testing ==="
ls -ltr /usr/share/spring_testing/
echo "=== files in /usr/share/spring_testing/bin ==="
ls -ltr /usr/share/spring_testing/bin/
- name: Link Spring TestHarness Module
run: ln -s /usr/share/spring_testing/tests/TestHarness /usr/lib/python3/dist-packages/TestHarness

- name: Download EOS EVM Contract
uses: AntelopeIO/asset-artifact-download-action@v3
Expand Down Expand Up @@ -437,11 +408,11 @@ jobs:
- name: Prepare Logs
if: failure()
run: |
tar -czf leap-int-test-logs.tar.gz test_run_root/* ws_test_run_root/*
tar -czf sprint-int-test-logs.tar.gz test_run_root/* ws_test_run_root/*
- name: Upload logs from failed tests
uses: actions/upload-artifact@v3
if: failure()
with:
name: leap-int-test-logs.tar.gz
path: leap-int-test-logs.tar.gz
name: spring-int-test-logs.tar.gz
path: spring-int-test-logs.tar.gz
9 changes: 9 additions & 0 deletions tests/nodeos_eos_evm_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -1056,6 +1056,7 @@ def get_block(num):
# Validate all balances (check evmtx event)
validate_all_balances()

Utils.Print("checking %s for errors" % (nodeStdErrDir))
foundErr = False
stdErrFile = open(nodeStdErrDir, "r")
lines = stdErrFile.readlines()
Expand All @@ -1064,6 +1065,7 @@ def get_block(num):
Utils.Print(" Found ERROR in EOS EVM NODE log: ", line)
foundErr = True

Utils.Print("checking %s for errors" % (rpcStdErrDir))
stdErrFile = open(rpcStdErrDir, "r")
lines = stdErrFile.readlines()
for line in lines:
Expand All @@ -1072,9 +1074,16 @@ def get_block(num):
foundErr = True

testSuccessful= not foundErr
if testSuccessful:
Utils.Print("test success, ready to shut down cluster")
else:
Utils.Print("test failed, ready to shut down cluster")

finally:
Utils.Print("test success, shutting down cluster")
TestHelper.shutdown(cluster, walletMgr, testSuccessful=testSuccessful, dumpErrorDetails=dumpErrorDetails)
if killEosInstances:
Utils.Print("killing EOS instances")
if evmNodePOpen is not None:
evmNodePOpen.kill()
if evmRPCPOpen is not None:
Expand Down

0 comments on commit 823cccc

Please sign in to comment.