@@ -21,52 +21,61 @@ jobs:
2121 vmImage : ' ubuntu-latest'
2222 strategy :
2323 matrix :
24- Python38 :
25- python.version : ' 3.8'
2624 Python39 :
2725 python.version : ' 3.9'
2826 Python310 :
2927 python.version : ' 3.10'
28+ Python311 :
29+ python.version : ' 3.11'
3030
3131 steps :
3232 - bash : echo "##vso[task.prependpath]$CONDA/bin"
3333 displayName : Add conda to PATH
3434
3535 - bash : |
36+ set -e
37+ eval "$(conda shell.bash hook)"
3638 conda config --add channels conda-forge
3739 conda config --set channel_priority strict
38- conda create --yes --quiet --name build python=$PYTHON_VERSION conda conda-build
39- displayName: Create Anaconda build environment
40+ conda install --yes " conda<22.11.0" conda-build mamba boa
41+ displayName: Update conda base environment
4042
4143 - bash : |
44+ set -e
4245 eval "$(conda shell.bash hook)"
43- conda activate build
44- conda build -m "ci/python${PYTHON_VERSION}.yaml" "ci/recipe"
46+ conda activate
47+ # workaround based on recent failures
48+ rm /usr/share/miniconda/pkgs/cache/*.json
49+ conda mambabuild -m "ci/python${PYTHON_VERSION}.yaml" "ci/recipe"
4550 displayName: Build MPAS-Analysis
4651
4752 - bash : |
53+ set -e
4854 eval "$(conda shell.bash hook)"
49- conda activate build
50- conda create --yes --quiet --name test -c ${CONDA_PREFIX}/conda-bld/ \
55+ conda activate
56+ mamba create --yes --quiet --name mpas -c ${CONDA_PREFIX}/conda-bld/ \
5157 python=$PYTHON_VERSION mpas-analysis pytest
52- displayName: Create Anaconda test environment
58+ displayName: Create Anaconda mpas environment
5359
5460 - bash : |
61+ set -e
5562 eval "$(conda shell.bash hook)"
56- conda activate test
63+ conda activate mpas
5764 pytest --pyargs mpas_analysis
5865 displayName: pytest
5966
6067 - bash : |
68+ set -e
6169 eval "$(conda shell.bash hook)"
62- conda activate build
63- conda create --yes --quiet --name docs -c ${CONDA_PREFIX}/conda-bld/ \
70+ conda activate
71+ mamba create --yes --quiet --name docs -c ${CONDA_PREFIX}/conda-bld/ \
6472 python=$PYTHON_VERSION mpas-analysis sphinx mock sphinx_rtd_theme \
6573 tabulate m2r2 "mistune<2"
66- condition: eq(variables['python.version'], '3.9 ')
74+ condition: eq(variables['python.version'], '3.10 ')
6775 displayName: Create Anaconda docs environment
6876
6977 - bash : |
78+ set -e
7079 eval "$(conda shell.bash hook)"
7180 conda activate docs
7281
@@ -128,7 +137,7 @@ jobs:
128137 fi
129138 popd || exit 1
130139 fi
131- condition: eq(variables['python.version'], '3.9 ')
140+ condition: eq(variables['python.version'], '3.10 ')
132141 displayName: build and deploy docs
133142
134143 - job :
@@ -137,38 +146,45 @@ jobs:
137146 vmImage : ' ubuntu-latest'
138147 strategy :
139148 matrix :
140- Python39 :
141- python.version : ' 3.9 '
149+ Python310 :
150+ python.version : ' 3.10 '
142151
143152 steps :
144153 - bash : echo "##vso[task.prependpath]$CONDA/bin"
145154 displayName : Add conda to PATH
146155
147156 - bash : |
157+ set -e
158+ eval "$(conda shell.bash hook)"
148159 conda config --add channels conda-forge
149160 conda config --set channel_priority strict
150- conda create --yes --quiet --name build python=$PYTHON_VERSION conda conda-build
151- displayName: Create Anaconda build environment
161+ conda install --yes python=$PYTHON_VERSION " conda<22.11.0" conda-build mamba boa
162+ displayName: Update conda base environment
152163
153164 - bash : |
165+ set -e
154166 eval "$(conda shell.bash hook)"
155- conda activate build
156- conda build -m "ci/python${PYTHON_VERSION}.yaml" "ci/recipe"
167+ conda activate
168+ # workaround based on recent failures
169+ rm /usr/share/miniconda/pkgs/cache/*.json
170+ conda mambabuild -m "ci/python${PYTHON_VERSION}.yaml" "ci/recipe"
157171 displayName: Build MPAS-Analysis
158172
159173 - bash : |
174+ set -e
160175 eval "$(conda shell.bash hook)"
161- conda activate build
162- conda create --yes --quiet --name test -c ${CONDA_PREFIX}/conda-bld/ \
176+ conda activate
177+ mamba create --yes --quiet --name mpas -c ${CONDA_PREFIX}/conda-bld/ \
163178 python=$PYTHON_VERSION mpas-analysis pytest
164- conda activate test
179+ conda activate mpas
165180 pip install git+https://github.com/pydata/xarray.git
166181
167- displayName: Create Anaconda test environment
182+ displayName: Create Anaconda mpas environment
168183
169184 - bash : |
185+ set -e
170186 eval "$(conda shell.bash hook)"
171- conda activate test
187+ conda activate mpas
172188 pytest --pyargs mpas_analysis
173189 displayName: pytest
174190
@@ -178,12 +194,12 @@ jobs:
178194 vmImage : ' macOS-latest'
179195 strategy :
180196 matrix :
181- Python38 :
182- python.version : ' 3.8'
183197 Python39 :
184198 python.version : ' 3.9'
185199 Python310 :
186200 python.version : ' 3.10'
201+ Python311 :
202+ python.version : ' 3.11'
187203
188204 steps :
189205 - bash : echo "##vso[task.prependpath]$CONDA/bin"
@@ -193,26 +209,31 @@ jobs:
193209 displayName : Fix permissions
194210
195211 - bash : |
212+ set -e
213+ eval "$(conda shell.bash hook)"
196214 conda config --add channels conda-forge
197215 conda config --set channel_priority strict
198- conda create --yes --quiet --name build python=$PYTHON_VERSION conda conda-build
199- displayName: Create Anaconda build environment
216+ conda install --yes " conda<22.11.0" conda-build mamba boa
217+ displayName: Update conda base environment
200218
201219 - bash : |
220+ set -e
202221 eval "$(conda shell.bash hook)"
203- conda activate build
204- conda build -m "ci/python${PYTHON_VERSION}.yaml" "ci/recipe"
222+ conda activate
223+ conda mambabuild -m "ci/python${PYTHON_VERSION}.yaml" "ci/recipe"
205224 displayName: Build MPAS-Analysis
206225
207226 - bash : |
227+ set -e
208228 eval "$(conda shell.bash hook)"
209- conda activate build
210- conda create --yes --quiet --name test -c ${CONDA_PREFIX}/conda-bld/ \
229+ conda activate
230+ mamba create --yes --quiet --name mpas -c ${CONDA_PREFIX}/conda-bld/ \
211231 python=$PYTHON_VERSION mpas-analysis pytest
212- displayName: Create Anaconda test environment
232+ displayName: Create Anaconda mpas environment
213233
214234 - bash : |
235+ set -e
215236 eval "$(conda shell.bash hook)"
216- conda activate test
237+ conda activate mpas
217238 pytest --pyargs mpas_analysis
218239 displayName: pytest
0 commit comments