-
Notifications
You must be signed in to change notification settings - Fork 5
169 lines (147 loc) · 5.63 KB
/
ci_e2e_test.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
name: Run ci e2e test
on:
push:
branches:
- v9.1.0-zama
pull_request:
types:
- opened
- reopened
- synchronize
- ready_for_review
# this is useful to trigger test from PRs, or even manually with specific commits/tags
workflow_dispatch:
inputs:
geth_commit:
description: "go-ethereum commit/tag to use"
type: string
default: ''
required: false
ethermint_commit:
description: "ethermint commit/tag to use"
type: string
default: ''
required: false
fhevm_solidity_commit:
description: "fhevm_solidity commit/tag to use"
type: string
default: ''
required: false
jobs:
docker:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'push' || !github.event.pull_request.draft }}
env:
ORACLE_DB_SERVICE_TAG: latest
steps:
- name: Install Node.js and npm
run: |
sudo apt update
sudo apt install nodejs
sudo apt install npm
- name: Checkout
uses: actions/checkout@v3
with:
path: evmos
- name: Get version for all needed repositories
working-directory: ./evmos
run: |
echo "TFHE_RS_VERSION=$(./scripts/get_version_from_makefile.sh TFHE_RS_VERSION)" >> $GITHUB_ENV
echo "FHEVM_TFHE_CLI_VERSION=$(./scripts/get_version_from_makefile.sh FHEVM_TFHE_CLI_VERSION)" >> $GITHUB_ENV
echo "FHEVM_SOLIDITY_VERSION=$(./scripts/get_version_from_makefile.sh FHEVM_SOLIDITY_VERSION)" >> $GITHUB_ENV
echo "ETHERMINT_VERSION=$(./scripts/get_module_version.sh go.mod zama.ai/ethermint)" >> $GITHUB_ENV
echo "GO_ETHEREUM_VERSION=$(./scripts/get_module_version.sh go.mod zama.ai/go-ethereum)" >> $GITHUB_ENV
# this overrides the previous geth version
- name: Set go-ethereum version if specified
if: github.event_name == 'workflow_dispatch' && github.event.inputs.geth_commit != ''
run: echo "GO_ETHEREUM_VERSION=${{ github.event.inputs.geth_commit }}" >> $GITHUB_ENV
# this overrides the previous ethermint version
- name: Set ethermint version if specified
if: github.event_name == 'workflow_dispatch' && github.event.inputs.ethermint_commit != ''
run: echo "ETHERMINT_VERSION=${{ github.event.inputs.ethermint_commit }}" >> $GITHUB_ENV
# this overrides the previous fhevm_solidity version
- name: Set fhevm_solidity version if specified
if: github.event_name == 'workflow_dispatch' && github.event.inputs.fhevm_solidity_commit != ''
run: echo "FHEVM_SOLIDITY_VERSION=${{ github.event.inputs.fhevm_solidity_commit }}" >> $GITHUB_ENV
- name: Echo versions parsed from Makefile and go.mod
run: |
echo "TFHE_RS_VERSION: $TFHE_RS_VERSION"
echo "FHEVM_TFHE_CLI_VERSION: $FHEVM_TFHE_CLI_VERSION"
echo "FHEVM_SOLIDITY_VERSION: $FHEVM_SOLIDITY_VERSION"
echo "ETHERMINT_VERSION: $ETHERMINT_VERSION"
echo "GO_ETHEREUM_VERSION: $GO_ETHEREUM_VERSION"
- name: Checkout fhevm-solidity
uses: actions/checkout@v3
with:
repository: zama-ai/fhevm-solidity
token: ${{ secrets.CONCRETE_ACTIONS_TOKEN }}
path: ./evmos/work_dir/fhevm-solidity
ref: ${{ env.FHEVM_SOLIDITY_VERSION }}
- name: Checkout tfhe-rs
uses: actions/checkout@v3
with:
repository: zama-ai/tfhe-rs
token: ${{ secrets.CONCRETE_ACTIONS_TOKEN }}
path: ./evmos/work_dir/tfhe-rs
ref: ${{ env.TFHE_RS_VERSION }}
- name: Checkout fhevm-tfhe-cli
uses: actions/checkout@v3
with:
repository: zama-ai/fhevm-tfhe-cli
token: ${{ secrets.CONCRETE_ACTIONS_TOKEN }}
path: ./evmos/work_dir/fhevm-tfhe-cli
ref: ${{ env.FHEVM_TFHE_CLI_VERSION }}
- name: Checkout go-ethereum
uses: actions/checkout@v3
with:
repository: zama-ai/go-ethereum
token: ${{ secrets.CONCRETE_ACTIONS_TOKEN }}
path: ./evmos/work_dir/go-ethereum
ref: ${{ env.GO_ETHEREUM_VERSION }}
- name: Checkout ethermint
uses: actions/checkout@v3
with:
repository: zama-ai/ethermint
token: ${{ secrets.CONCRETE_ACTIONS_TOKEN }}
path: ./evmos/work_dir/ethermint
ref: ${{ env.ETHERMINT_VERSION }}
- name: List files in the repository
run: |
ls ${{ github.workspace }}
- name: List files in work_dir
working-directory: evmos/work_dir
run: |
ls
- name: Prepare files for node setup
working-directory: evmos
run: |
mkdir -p node/evmos
cp private.ed25519 node/evmos
cp public.ed25519 node/evmos
touch vm.log
ls node/evmos
- name: Login to GitHub Container Registry
uses: docker/login-action@49ed152c8eca782a232dede0303416e8f356c37b
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build local docker
working-directory: ./evmos
run: |
make build-docker
- name: Check docker images
working-directory: ./evmos
run: |
docker images
- name: Install @openzeppelin/contracts
working-directory: evmos/work_dir/fhevm-solidity
run: |
npm install @openzeppelin/contracts
- name: Run e2e test
working-directory: ./evmos
run: |
ls ${{ github.workspace }}
ls work_dir
ls work_dir/fhevm-tfhe-cli
make e2e-test