@@ -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
@@ -145,12 +181,30 @@ jobs:
145
181
type : string
146
182
tox_env :
147
183
type : string
184
+ python_exec :
185
+ type : string
186
+ default : " python"
148
187
<< : *common
149
188
docker :
150
189
- image : cimg/python:3.<< parameters.python_minor_version >>
151
190
environment :
152
191
TOXENV : py3<< parameters.python_minor_version >>-<< parameters.tox_env >>
153
192
193
+ common-pypy :
194
+ parameters :
195
+ python_minor_version :
196
+ type : string
197
+ tox_env :
198
+ type : string
199
+ python_exec :
200
+ type : string
201
+ default : " pypy3"
202
+ << : *common
203
+ docker :
204
+ - image : cimg/python:3.<< parameters.python_minor_version >>
205
+ environment :
206
+ TOXENV : pypy3<< parameters.python_minor_version >>-<< parameters.tox_env >>
207
+
154
208
geth :
155
209
parameters :
156
210
python_minor_version :
@@ -228,13 +282,44 @@ workflows:
228
282
python_minor_version : ["8", "9", "10", "11", "12"]
229
283
tox_env : [
230
284
" lint" ,
231
- " core" ,
232
- " core_async " ,
233
- " ens" ,
285
+ " core-pyevm " ,
286
+ " core-pyevm_async " ,
287
+ " ens-pyevm " ,
234
288
" ensip15" ,
235
289
" wheel"
236
290
]
291
+ python_exec : " python"
237
292
name : " py3<< matrix.python_minor_version >>-<< matrix.tox_env >>"
293
+ - common :
294
+ matrix :
295
+ parameters :
296
+ # eels only supports 3.10 and above
297
+ python_minor_version : ["10", "11", "12"]
298
+ tox_env : [
299
+ " core-eels" ,
300
+ " core-eels_async" ,
301
+ " ens-eels" ,
302
+ " integration-ethtester-eels"
303
+ ]
304
+ python_exec : " python"
305
+ name : " py3<< matrix.python_minor_version >>-<< matrix.tox_env >>"
306
+ - common-pypy :
307
+ matrix :
308
+ parameters :
309
+ # eels only supports 3.10 and above; pyenv only has pypy3.10 available
310
+ python_minor_version : ["10"]
311
+ tox_env : [
312
+ " core-eels" ,
313
+ " core-eels_async" ,
314
+ " ens-eels" ,
315
+ " integration-ethtester-eels" ,
316
+ " core-pyevm" ,
317
+ " core-pyevm_async" ,
318
+ " ens-pyevm" ,
319
+ " integration-ethtester-pyevm"
320
+ ]
321
+ python_exec : " pypy3"
322
+ name : " pypy3<< matrix.python_minor_version >>-<< matrix.tox_env >>"
238
323
- geth :
239
324
matrix :
240
325
parameters :
@@ -246,7 +331,7 @@ workflows:
246
331
" integration-goethereum-http_async" ,
247
332
" integration-goethereum-legacy_ws" ,
248
333
" integration-goethereum-ws" ,
249
- " integration-ethtester"
334
+ " integration-ethtester-pyevm "
250
335
]
251
336
name : " py3<< matrix.python_minor_version >>-<< matrix.tox_env >>"
252
337
- docs :
@@ -260,7 +345,6 @@ workflows:
260
345
python_minor_version : ["10", "11", "12"]
261
346
name : " py3<< matrix.python_minor_version >>-windows-wheel"
262
347
263
-
264
348
nightly :
265
349
triggers :
266
350
- schedule :
0 commit comments