88 parameters :
99 dimod-version :
1010 type : string
11+ networkx-version :
12+ type : string
1113 python-version :
1214 type : string
1315
1820 - checkout
1921
2022 - restore_cache : &restore-cache-env
21- key : v1-dependencies -{{ checksum "requirements.txt" }}-{{ checksum "tests/requirements.txt" }}-{{ .Environment.CIRCLE_JOB }}
23+ key : pip -{{ checksum "requirements.txt" }}-{{ checksum "tests/requirements.txt" }}-{{ .Environment.CIRCLE_JOB }}
2224
2325 - run : &create-venv-install-deps
2426 name : Create virtual environment and install dependencies
@@ -30,15 +32,16 @@ jobs:
3032 pip install -r requirements.txt -r tests/requirements.txt
3133
3234 - run :
33- name : Install specified dimod version
35+ name : Install dependencies
3436 command : |
3537 . env/bin/activate
3638 pip install --upgrade 'dimod<< parameters.dimod-version >>'
39+ pip install --upgrade 'networkx<< parameters.networkx-version >>'
3740
3841 - save_cache : &save-cache-env
39- key : v1-dependencies -{{ checksum "requirements.txt" }}-{{ checksum "tests/requirements.txt" }}-{{ .Environment.CIRCLE_JOB }}
42+ key : pip -{{ checksum "requirements.txt" }}-{{ checksum "tests/requirements.txt" }}-{{ .Environment.CIRCLE_JOB }}
4043 paths :
41- - env
44+ - ~/.cache/pip
4245
4346 - run : &run-tests
4447 name : Run unittests
5861 type : string
5962
6063 macos :
61- xcode : " 12 .2.0"
64+ xcode : " 13 .2.0"
6265
6366 environment :
6467 HOMEBREW_NO_AUTO_UPDATE : 1
@@ -72,27 +75,42 @@ jobs:
7275 brew install pyenv
7376
7477 - restore_cache : &restore-cache-pyenv
75- key : v1-pyenv-{{ .Environment.CIRCLE_JOB }}-xcode-12.2.0
78+ key : v1-pyenv-{{ .Environment.CIRCLE_JOB }}-xcode-13.2.0
79+
80+ - when :
81+ # see https://github.com/pyenv/pyenv/issues/1643. We use an intermediate
82+ # file so we can use the --skip-existing without raising errors from curl
83+ condition :
84+ equal : [3.6.8, << parameters.python-version >>]
85+ steps :
86+ - run :
87+ name : Install Python 3.6 with a patch
88+ command : |
89+ curl -sSL https://github.com/python/cpython/commit/8ea6353.patch > tmp.txt
90+ pyenv install -s --patch 3.6.8 < tmp.txt
7691
7792 - run :
7893 name : Install python
7994 command : |
8095 pyenv install << parameters.python-version>> -s
8196
82- - run :
83- name : Set system python
84- command : |
85- pyenv global << parameters.python-version >>
86- echo 'eval "$(pyenv init -)"' >> ~/.bash_profile
87-
8897 - save_cache : &save-cache-pyenv
89- key : v1-pyenv-{{ .Environment.CIRCLE_JOB }}-xcode-12 .2.0
98+ key : v1-pyenv-{{ .Environment.CIRCLE_JOB }}-xcode-13 .2.0
9099 paths :
91100 - ~/.pyenv
92101
93102 - restore_cache : *restore-cache-env
94103
95- - run : *create-venv-install-deps
104+ - run :
105+ name : Create virtualenv and install dependencies
106+ command : |
107+ eval "$(pyenv init --path)"
108+ pyenv local << parameters.python-version >>
109+ python -m venv env
110+ . env/bin/activate
111+ python --version
112+ pip install pip --upgrade
113+ pip install -r requirements.txt -r tests/requirements.txt
96114
97115 - save_cache : *save-cache-env
98116
@@ -207,8 +225,9 @@ workflows:
207225 - test-linux :
208226 matrix :
209227 parameters :
210- python-version : &python-versions [3.6.8, 3.7.9, 3.8.9, 3.9.4]
211- dimod-version : [==0.8.0, <0.9, <0.10, <0.11]
228+ python-version : &python-versions [3.6.8, 3.7.9, 3.8.9, 3.9.4, 3.10.0]
229+ dimod-version : [==0.10.8, ~=0.10.0]
230+ networkx-version : [==2.4, <3.0]
212231 - test-osx :
213232 matrix :
214233 parameters :
0 commit comments