@@ -11,6 +11,10 @@ parameters:
11
11
type : string
12
12
13
13
common : &common
14
+ parameters :
15
+ python_exec :
16
+ type : string
17
+ default : " python"
14
18
working_directory : ~/repo
15
19
steps :
16
20
- checkout
@@ -28,6 +32,38 @@ common: &common
28
32
- restore_cache :
29
33
keys :
30
34
- cache-v1-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "setup.py" }}-{{ checksum "tox.ini" }}
35
+ - run :
36
+ name : install pypy3 if python_exec is pypy3
37
+ command : |
38
+ if [ "<< parameters.python_exec >>" == "pypy3" ]; then
39
+ sudo apt-get update
40
+
41
+ # If .pyenv already exists, remove and reinstall to get latest version
42
+ if [ -d "$HOME/.pyenv" ]; then
43
+ echo "Removing existing .pyenv directory..."
44
+ rm -rf $HOME/.pyenv
45
+ fi
46
+ curl https://pyenv.run | bash
47
+ export PATH="$HOME/.pyenv/bin:$PATH"
48
+ eval "$(pyenv init --path)"
49
+ eval "$(pyenv init -)"
50
+ eval "$(pyenv virtualenv-init -)"
51
+
52
+ # Find the latest PyPy version matching the python minor version
53
+ latest_pypy_version=$(pyenv install --list | grep -E "pypy3\.<< parameters.python_minor_version >>" | grep -v "\-src" | tail -1 | tr -d ' ')
54
+ echo "Latest PyPy version: $latest_pypy_version"
55
+
56
+ # Install the latest PyPy 3.10 version using pyenv if not already installed
57
+ pyenv install "$latest_pypy_version"
58
+ pyenv global "$latest_pypy_version"
59
+
60
+ # Verify the correct PyPy version is being used
61
+ pypy3 --version
62
+
63
+ # Install pip using the newly installed PyPy version
64
+ curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
65
+ pypy3 get-pip.py
66
+ fi
31
67
- run :
32
68
name : install dependencies
33
69
command : |
@@ -36,7 +72,7 @@ common: &common
36
72
python web3/scripts/install_pre_releases.py
37
73
- run :
38
74
name : run tox
39
- command : python -m tox run -r
75
+ command : << parameters.python_exec >> -m tox -r
40
76
- save_cache :
41
77
paths :
42
78
- .hypothesis
@@ -141,12 +177,30 @@ jobs:
141
177
type : string
142
178
tox_env :
143
179
type : string
180
+ python_exec :
181
+ type : string
182
+ default : " python"
144
183
<< : *common
145
184
docker :
146
185
- image : cimg/python:3.<< parameters.python_minor_version >>
147
186
environment :
148
187
TOXENV : py3<< parameters.python_minor_version >>-<< parameters.tox_env >>
149
188
189
+ common-pypy :
190
+ parameters :
191
+ python_minor_version :
192
+ type : string
193
+ tox_env :
194
+ type : string
195
+ python_exec :
196
+ type : string
197
+ default : " pypy3"
198
+ << : *common
199
+ docker :
200
+ - image : cimg/python:3.<< parameters.python_minor_version >>
201
+ environment :
202
+ TOXENV : pypy3<< parameters.python_minor_version >>-<< parameters.tox_env >>
203
+
150
204
geth :
151
205
parameters :
152
206
python_minor_version :
@@ -224,13 +278,44 @@ workflows:
224
278
python_minor_version : ["8", "9", "10", "11", "12", "13"]
225
279
tox_env : [
226
280
" lint" ,
227
- " core" ,
228
- " core_async " ,
229
- " ens" ,
281
+ " core-pyevm " ,
282
+ " core-pyevm_async " ,
283
+ " ens-pyevm " ,
230
284
" ensip15" ,
231
285
" wheel"
232
286
]
287
+ python_exec : " python"
233
288
name : " py3<< matrix.python_minor_version >>-<< matrix.tox_env >>"
289
+ - common :
290
+ matrix :
291
+ parameters :
292
+ # eels only supports 3.10 and above
293
+ python_minor_version : ["10", "11", "12"]
294
+ tox_env : [
295
+ " core-eels" ,
296
+ " core-eels_async" ,
297
+ " ens-eels" ,
298
+ " integration-ethtester-eels"
299
+ ]
300
+ python_exec : " python"
301
+ name : " py3<< matrix.python_minor_version >>-<< matrix.tox_env >>"
302
+ - common-pypy :
303
+ matrix :
304
+ parameters :
305
+ # eels only supports 3.10 and above; pyenv only has pypy3.10 available
306
+ python_minor_version : ["10"]
307
+ tox_env : [
308
+ " core-eels" ,
309
+ " core-eels_async" ,
310
+ " ens-eels" ,
311
+ " integration-ethtester-eels" ,
312
+ " core-pyevm" ,
313
+ " core-pyevm_async" ,
314
+ " ens-pyevm" ,
315
+ " integration-ethtester-pyevm"
316
+ ]
317
+ python_exec : " pypy3"
318
+ name : " pypy3<< matrix.python_minor_version >>-<< matrix.tox_env >>"
234
319
- geth :
235
320
matrix :
236
321
parameters :
@@ -242,7 +327,7 @@ workflows:
242
327
" integration-goethereum-http_async" ,
243
328
" integration-goethereum-legacy_ws" ,
244
329
" integration-goethereum-ws" ,
245
- " integration-ethtester"
330
+ " integration-ethtester-pyevm "
246
331
]
247
332
name : " py3<< matrix.python_minor_version >>-<< matrix.tox_env >>"
248
333
- docs :
@@ -256,7 +341,6 @@ workflows:
256
341
python_minor_version : ["10", "11", "12", "13"]
257
342
name : " py3<< matrix.python_minor_version >>-windows-wheel"
258
343
259
-
260
344
nightly :
261
345
triggers :
262
346
- schedule :
0 commit comments