eos-evm-node repo integration test #36
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: EOS EVM Node CI | |
on: | |
push: | |
branches: | |
- main | |
- release/* | |
pull_request: | |
workflow_dispatch: | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
documentation: | |
name: Attach Documentation | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 1 | |
submodules: 'false' | |
- name: Attach Documentation | |
run: cat .github/workflows/node.md >> $GITHUB_STEP_SUMMARY | |
d: | |
name: Discover Platforms | |
runs-on: ubuntu-latest | |
outputs: | |
missing-platforms: ${{steps.discover.outputs.missing-platforms}} | |
p: ${{steps.discover.outputs.platforms}} | |
steps: | |
- name: Discover Platforms | |
id: discover | |
uses: AntelopeIO/discover-platforms-action@v1 | |
with: | |
platform-file: .cicd/platforms.json | |
password: ${{secrets.GITHUB_TOKEN}} | |
package-name: builders | |
build-platforms: | |
name: Build Platforms | |
needs: d | |
if: needs.d.outputs.missing-platforms != '[]' | |
strategy: | |
fail-fast: false | |
matrix: | |
platform: ${{fromJSON(needs.d.outputs.missing-platforms)}} | |
runs-on: ubuntu-latest | |
permissions: | |
packages: write | |
contents: read | |
steps: | |
- name: Login to Container Registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{github.repository_owner}} | |
password: ${{secrets.GITHUB_TOKEN}} | |
- name: Build and push | |
uses: docker/build-push-action@v3 | |
with: | |
push: true | |
tags: ${{fromJSON(needs.d.outputs.p)[matrix.platform].image}} | |
file: ${{fromJSON(needs.d.outputs.p)[matrix.platform].dockerfile}} | |
build: | |
name: EOS EVM Node Build | |
needs: [d, build-platforms] | |
if: always() && needs.d.result == 'success' && (needs.build-platforms.result == 'success' || needs.build-platforms.result == 'skipped') | |
strategy: | |
fail-fast: false | |
matrix: | |
platform: [ ubuntu22 ] | |
runs-on: ubuntu-latest | |
container: ${{fromJSON(needs.d.outputs.p)[matrix.platform].image}} | |
steps: | |
- name: Authenticate | |
id: auth | |
uses: AntelopeIO/github-app-token-action@v1 | |
with: | |
app_id: ${{ secrets.TRUSTEVM_CI_APP_ID }} | |
private_key: ${{ secrets.TRUSTEVM_CI_APP_KEY }} | |
- name: Checkout Repo | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
submodules: 'recursive' | |
token: ${{ steps.auth.outputs.token }} | |
- name: Build EOS EVM Node | |
run: .github/workflows/build-node.sh | |
env: | |
CC: gcc-11 | |
CXX: g++-11 | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: build.tar.gz | |
path: build.tar.gz | |
integration-test: | |
name: EOS EVM Integration Tests | |
needs: [d, build] | |
if: always() && needs.d.result == 'success' && needs.build.result == 'success' | |
strategy: | |
fail-fast: false | |
matrix: | |
platform: [ ubuntu22 ] | |
runs-on: ubuntu-latest | |
container: ${{fromJSON(needs.d.outputs.p)[matrix.platform].image}} | |
env: | |
CC: gcc-11 | |
CXX: g++-11 | |
DCMAKE_BUILD_TYPE: 'Release' | |
steps: | |
- name: Update Package Index & Upgrade Packages | |
run: | | |
apt-get update | |
apt-get upgrade -y | |
- name: Download CDT | |
uses: AntelopeIO/asset-artifact-download-action@v3 | |
with: | |
owner: AntelopeIO | |
repo: cdt | |
target: 'v3.1.0' | |
prereleases: false | |
file: 'cdt_.*amd64.deb' | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Install CDT | |
run: apt-get install -y ./cdt*.deb | |
- name: Download EOS EVM Contract | |
uses: AntelopeIO/asset-artifact-download-action@v3 | |
with: | |
owner: eosnetworkfoundation | |
repo: eos-evm | |
target: 'main' | |
file: 'contract.tar.gz' | |
artifact-name: contract.test-actions-off.tar.gz | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Extract EOS EVM Contract | |
id: evm-contract | |
run: | | |
pwd | |
ls | |
mkdir contract | |
mv contract.tar.gz contract/ | |
cd contract | |
pwd | |
ls | |
tar xvf contract.tar.gz | |
cd build | |
pwd | |
echo "EVM_CONTRACT=$(pwd)" >> "$GITHUB_OUTPUT" | |
- name: Download leap-dev binary | |
uses: AntelopeIO/asset-artifact-download-action@v3 | |
with: | |
owner: AntelopeIO | |
repo: leap | |
target: 'v4' | |
prereleases: false | |
file: 'leap-dev.*(x86_64|amd64).deb' | |
container-package: experimental-binaries | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Download leap binary | |
uses: AntelopeIO/asset-artifact-download-action@v3 | |
with: | |
owner: AntelopeIO | |
repo: leap | |
target: 'v4' | |
file: 'leap.*${{matrix.platform}}.*(x86_64|amd64).deb' | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Install Leap | |
run: | | |
apt-get install -y ./leap*.deb | |
dpkg -L leap-dev | grep TestHarness | |
dpkg -L leap | grep cleos | |
- 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 | |
- name: Authenticate | |
id: auth | |
uses: AntelopeIO/github-app-token-action@v1 | |
with: | |
app_id: ${{ secrets.TRUSTEVM_CI_APP_ID }} | |
private_key: ${{ secrets.TRUSTEVM_CI_APP_KEY }} | |
- name: Checkout EOS EVM Node Repo | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
submodules: 'recursive' | |
token: ${{ steps.auth.outputs.token }} | |
path: eos-evm-node | |
- name: Download EOS EVM Node builddir | |
uses: actions/download-artifact@v3 | |
with: | |
name: build.tar.gz | |
- name: Extract EOS EVM Node builddir | |
id: evm-node-build | |
run: | | |
pwd | |
ls | |
cd peripherals | |
cd tx_wrapper | |
echo "EVM_NODE_TX_WRAPPER=$(pwd)" >> "$GITHUB_OUTPUT" | |
cd ../.. | |
mv build.tar.gz eos-node-build/ | |
cd eod-node-build | |
tar xvf build.tar.gz | |
cd build | |
echo "EVM_NODE_BUILD=$(pwd)" >> "$GITHUB_OUTPUT" | |
- name: Install Test Depedencies | |
run: | | |
pip install --upgrade web3 | |
apt install -y nodejs | |
apt install -y npm | |
npm install eosjs | |
npm install ethereumjs-util | |
npm install node-fetch | |
npm install http-jsonrpc-server | |
npm install dotenv | |
npm install is-valid-hostname | |
- name: Check Depedency Versions | |
run: | | |
pip show web3 | |
node --version | |
- name: Test Leap Integration | |
run: | | |
pwd | |
ls | |
mkdir test_run_root | |
ls | |
cd test_run_root | |
ls | |
pwd | |
echo "See if contract root still looks good." | |
ls ${{ steps.evm-contract.outputs.EVM_CONTRACT }} | |
echo "See if build root still looks good." | |
ls ${{ steps.evm-node-build.outputs.EVM_NODE_BUILD }} | |
echo "See if tx_wrapper still looks good." | |
ls ${{ steps.evm-node-build.outputs.EVM_NODE_TX_WRAPPER }} | |
./../tests/nodeos_eos_evm_test.py -v --eos-evm-contract-root ${{ steps.evm-evm-contract.outputs.EVM_CONTRACT }} --eos-evm-build-root ${{ steps.evm-node-build.outputs.EVM_NODE_BUILD }} --use-tx-wrapper ${{ steps.evm-node-build.outputs.EVM_NODE_TX_WRAPPER }} | |
- name: Prepare Logs | |
if: failure() | |
run: | | |
tar -czf leap-int-test-logs.tar.gz 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 | |