@@ -67,28 +67,51 @@ common: &common
67
67
orbs :
68
68
69
69
70
- windows_steps : &windows_steps
71
- executor :
72
- name : win/default
73
- shell : bash.exe
74
- working_directory : C:\Users\circleci\project\py-evm
75
- steps :
76
- - checkout
77
- - restore_cache :
78
- keys :
79
- - cache-v1-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "setup.py" }}-{{ checksum "tox.ini" }}
80
- - run :
81
- name : install dependencies
82
- command : |
83
- python -m pip install --upgrade pip
84
- python -m pip install tox
85
- - run :
86
- name : run tox
87
- command : python -m tox run -r
88
- - save_cache :
89
- paths :
90
- - .tox
91
- key : cache-v1-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "setup.py" }}-{{ checksum "tox.ini" }}
70
+ windows-wheel-steps :
71
+ windows-wheel-setup : &windows-wheel-setup
72
+ executor :
73
+ name : win/default
74
+ shell : bash.exe
75
+ working_directory : C:\Users\circleci\project\py-evm
76
+ environment :
77
+ TOXENV : windows-wheel
78
+ restore-cache-step : &restore-cache-step
79
+ restore_cache :
80
+ keys :
81
+ - cache-v1-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "setup.py" }}-{{ checksum "tox.ini" }}
82
+ install-pyenv-step : &install-pyenv-step
83
+ run :
84
+ name : install pyenv
85
+ command : |
86
+ pip install pyenv-win --target $HOME/.pyenv
87
+ echo 'export PYENV="$HOME/.pyenv/pyenv-win/"' >> $BASH_ENV
88
+ echo 'export PYENV_ROOT="$HOME/.pyenv/pyenv-win/"' >> $BASH_ENV
89
+ echo 'export PYENV_USERPROFILE="$HOME/.pyenv/pyenv-win/"' >> $BASH_ENV
90
+ echo 'export PATH="$PATH:$HOME/.pyenv/pyenv-win/bin"' >> $BASH_ENV
91
+ echo 'export PATH="$PATH:$HOME/.pyenv/pyenv-win/shims"' >> $BASH_ENV
92
+ source $BASH_ENV
93
+ pyenv update
94
+ install-latest-python-step : &install-latest-python-step
95
+ run :
96
+ name : install latest python version and tox
97
+ command : |
98
+ LATEST_VERSION=$(pyenv install --list | grep -E "${MINOR_VERSION}\.[0-9]+$" | tail -1)
99
+ echo "installing python version $LATEST_VERSION"
100
+ pyenv install $LATEST_VERSION
101
+ pyenv global $LATEST_VERSION
102
+ python3 -m pip install --upgrade pip
103
+ python3 -m pip install tox
104
+ run-tox-step : &run-tox-step
105
+ run :
106
+ name : run tox
107
+ command : |
108
+ echo 'running tox with' $(python3 --version)
109
+ python3 -m tox run -r
110
+ save-cache-step : &save-cache-step
111
+ save_cache :
112
+ paths :
113
+ - .tox
114
+ key : cache-v1-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "setup.py" }}-{{ checksum "tox.ini" }}
92
115
93
116
docs : &docs
94
117
docker :
@@ -364,6 +387,18 @@ jobs:
364
387
- image : cimg/python:3.11
365
388
environment :
366
389
TOXENV : py311-wheel
390
+ py311-windows-wheel :
391
+ << : *windows-wheel-setup
392
+ steps :
393
+ - checkout
394
+ - << : *restore-cache-step
395
+ - << : *install-pyenv-step
396
+ - run :
397
+ name : set minor version
398
+ command : echo "export MINOR_VERSION='3.11'" >> $BASH_ENV
399
+ - << : *install-latest-python-step
400
+ - << : *run-tox-step
401
+ - << : *save-cache-step
367
402
368
403
py312-core :
369
404
<< : *common
@@ -407,10 +442,18 @@ jobs:
407
442
- image : cimg/python:3.12
408
443
environment :
409
444
TOXENV : py312-wheel
410
- py312-wheel-windows :
411
- << : *windows_steps
412
- environment :
413
- TOXENV : py312-wheel-windows
445
+ py312-windows-wheel :
446
+ << : *windows-wheel-setup
447
+ steps :
448
+ - checkout
449
+ - << : *restore-cache-step
450
+ - << : *install-pyenv-step
451
+ - run :
452
+ name : set minor version
453
+ command : echo "export MINOR_VERSION='3.12'" >> $BASH_ENV
454
+ - << : *install-latest-python-step
455
+ - << : *run-tox-step
456
+ - << : *save-cache-step
414
457
415
458
workflows :
416
459
version : 2
@@ -466,4 +509,5 @@ workflows:
466
509
- py310-wheel
467
510
- py311-wheel
468
511
- py312-wheel
469
- - py312-wheel-windows
512
+ - py311-windows-wheel
513
+ - py312-windows-wheel
0 commit comments