@@ -39,28 +39,51 @@ common: &common
39
39
orbs :
40
40
41
41
42
- windows_steps : &windows_steps
43
- executor :
44
- name : win/default
45
- shell : bash.exe
46
- working_directory : C:\Users\circleci\project\<REPO_NAME>
47
- steps :
48
- - checkout
49
- - restore_cache :
50
- keys :
51
- - cache-v1-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "setup.py" }}-{{ checksum "tox.ini" }}
52
- - run :
53
- name : install dependencies
54
- command : |
55
- python -m pip install --upgrade pip
56
- python -m pip install tox
57
- - run :
58
- name : run tox
59
- command : python -m tox run -r
60
- - save_cache :
61
- paths :
62
- - .tox
63
- key : cache-v1-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "setup.py" }}-{{ checksum "tox.ini" }}
42
+ windows-wheel-steps :
43
+ windows-wheel-setup : &windows-wheel-setup
44
+ executor :
45
+ name : win/default
46
+ shell : bash.exe
47
+ working_directory : C:\Users\circleci\project\<REPO_NAME>
48
+ environment :
49
+ TOXENV : windows-wheel
50
+ restore-cache-step : &restore-cache-step
51
+ restore_cache :
52
+ keys :
53
+ - cache-v1-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "setup.py" }}-{{ checksum "tox.ini" }}
54
+ install-pyenv-step : &install-pyenv-step
55
+ run :
56
+ name : install pyenv
57
+ command : |
58
+ pip install pyenv-win --target $HOME/.pyenv
59
+ echo 'export PYENV="$HOME/.pyenv/pyenv-win/"' >> $BASH_ENV
60
+ echo 'export PYENV_ROOT="$HOME/.pyenv/pyenv-win/"' >> $BASH_ENV
61
+ echo 'export PYENV_USERPROFILE="$HOME/.pyenv/pyenv-win/"' >> $BASH_ENV
62
+ echo 'export PATH="$PATH:$HOME/.pyenv/pyenv-win/bin"' >> $BASH_ENV
63
+ echo 'export PATH="$PATH:$HOME/.pyenv/pyenv-win/shims"' >> $BASH_ENV
64
+ source $BASH_ENV
65
+ pyenv update
66
+ install-latest-python-step : &install-latest-python-step
67
+ run :
68
+ name : install latest python version and tox
69
+ command : |
70
+ LATEST_VERSION=$(pyenv install --list | grep -E "${MINOR_VERSION}\.[0-9]+$" | tail -1)
71
+ echo "installing python version $LATEST_VERSION"
72
+ pyenv install $LATEST_VERSION
73
+ pyenv global $LATEST_VERSION
74
+ python3 -m pip install --upgrade pip
75
+ python3 -m pip install tox
76
+ run-tox-step : &run-tox-step
77
+ run :
78
+ name : run tox
79
+ command : |
80
+ echo 'running tox with' $(python3 --version)
81
+ python3 -m tox run -r
82
+ save-cache-step : &save-cache-step
83
+ save_cache :
84
+ paths :
85
+ - .tox
86
+ key : cache-v1-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "setup.py" }}-{{ checksum "tox.ini" }}
64
87
65
88
jobs :
66
89
docs :
@@ -163,10 +186,31 @@ jobs:
163
186
environment :
164
187
TOXENV : py312-wheel
165
188
166
- py311-wheel-windows :
167
- << : *windows_steps
168
- environment :
169
- TOXENV : py311-wheel-windows
189
+ py311-windows-wheel :
190
+ << : *windows-wheel-setup
191
+ steps :
192
+ - checkout
193
+ - << : *restore-cache-step
194
+ - << : *install-pyenv-step
195
+ - run :
196
+ name : set minor version
197
+ command : echo "export MINOR_VERSION='3.11'" >> $BASH_ENV
198
+ - << : *install-latest-python-step
199
+ - << : *run-tox-step
200
+ - << : *save-cache-step
201
+
202
+ py312-windows-wheel :
203
+ << : *windows-wheel-setup
204
+ steps :
205
+ - checkout
206
+ - << : *restore-cache-step
207
+ - << : *install-pyenv-step
208
+ - run :
209
+ name : set minor version
210
+ command : echo "export MINOR_VERSION='3.12'" >> $BASH_ENV
211
+ - << : *install-latest-python-step
212
+ - << : *run-tox-step
213
+ - << : *save-cache-step
170
214
171
215
workflows :
172
216
version : 2
@@ -188,4 +232,5 @@ workflows:
188
232
- py310-wheel
189
233
- py311-wheel
190
234
- py312-wheel
191
- - py311-wheel-windows
235
+ - py311-windows-wheel
236
+ - py312-windows-wheel
0 commit comments