-
Notifications
You must be signed in to change notification settings - Fork 15
197 lines (169 loc) · 5.54 KB
/
contract.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
name: EOS EVM Contract CI
on:
push:
branches:
- main
- release/*
pull_request:
workflow_dispatch:
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/contract.md >> $GITHUB_STEP_SUMMARY
build:
runs-on: ubuntu-20.04
strategy:
matrix:
DWITH_TEST_ACTIONS: ['on', 'off']
name: EOS EVM Contract Build - Tests ${{ matrix.DWITH_TEST_ACTIONS }}
env:
CC: gcc-10
CXX: g++-10
DCMAKE_BUILD_TYPE: 'Release'
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: Download CDT
uses: AntelopeIO/asset-artifact-download-action@v2
with:
owner: AntelopeIO
repo: cdt
target: 'v3.1.0'
prereleases: false
file: 'cdt_.*amd64.deb'
token: ${{ secrets.GITHUB_TOKEN }}
- name: Install CDT
run: sudo apt-get install -y ./cdt*.deb
- name: Build EOS EVM Contract
run: .github/workflows/build-contract.sh
env:
DWITH_TEST_ACTIONS: ${{ matrix.DWITH_TEST_ACTIONS }}
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: contract.test-actions-${{ matrix.DWITH_TEST_ACTIONS }}.tar.gz
path: contract.tar.gz
if-no-files-found: error
- name: Download Leap - dev binary
uses: AntelopeIO/asset-artifact-download-action@v2
with:
owner: AntelopeIO
repo: leap
target: 'v3.1.3'
prereleases: false
file: 'leap-dev.*(x86_64|amd64).deb'
container-package: experimental-binaries
token: ${{ secrets.GITHUB_TOKEN }}
- name: Install Leap
run: sudo apt-get install -y ./leap*.deb
- name: Build EOS EVM Contract Tests
run: .github/workflows/build-contract-test.sh
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: contract-test.tar.gz
path: contract-test.tar.gz
if-no-files-found: error
- name: Test EOS EVM Contract
run: .github/workflows/test-contract.sh
env:
DWITH_TEST_ACTIONS: ${{ matrix.DWITH_TEST_ACTIONS }}
- name: Upload Test Metrics
uses: actions/upload-artifact@v3
with:
name: test-results.xml
path: test-results.xml
if-no-files-found: error
leap-integration:
runs-on: ubuntu-20.04
name: EOS EVM Leap Integration Tests
env:
CC: gcc-10
CXX: g++-10
DCMAKE_BUILD_TYPE: 'Release'
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: Download CDT
uses: AntelopeIO/asset-artifact-download-action@v2
with:
owner: AntelopeIO
repo: cdt
target: 'v3.1.0'
prereleases: false
file: 'cdt_.*amd64.deb'
token: ${{ secrets.GITHUB_TOKEN }}
- name: Install CDT
run: sudo apt-get install -y ./cdt*.deb
- name: Build EOS EVM Contract
run: .github/workflows/build-contract.sh
env:
DWITH_TEST_ACTIONS: ${{ matrix.DWITH_TEST_ACTIONS }}
- name: Download leap-dev binary
uses: AntelopeIO/asset-artifact-download-action@v2
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@v2
with:
owner: AntelopeIO
repo: leap
target: 'v4'
file: 'leap.*(x86_64|amd64).deb'
token: ${{ secrets.GITHUB_TOKEN }}
- name: Install Leap
run: |
apt-get update && apt-get upgrade -y
sudo 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: sudo ln -s /usr/share/leap_testing/tests/TestHarness /usr/lib/python3/dist-packages/TestHarness
- name: Install Test Depedencies
run: |
pip install --upgrade web3
sudo apt install nodejs
sudo apt install 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: Test Leap Integration
run: |
./tests/leap/nodeos_eos_evm_test.py --eos-evm-contract-root ./contract/build --eos-evm-build-root ./build --use-tx-wrapper ./peripherals/tx_wrapper