From 8a4ecf3119676bbfa278d6b3fda00e7f8868b7d3 Mon Sep 17 00:00:00 2001 From: Xylar Asay-Davis Date: Sun, 6 Nov 2022 19:52:57 +0100 Subject: [PATCH] Update CI to use mamba and esmf with mpicht --- azure-pipelines.yml | 44 +++++++++++++++++++-------------- {recipe => ci/recipe}/meta.yaml | 2 +- 2 files changed, 26 insertions(+), 20 deletions(-) rename {recipe => ci/recipe}/meta.yaml (98%) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 131ebdd..ce9d84d 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -31,25 +31,29 @@ jobs: - bash: | set -e + eval "$(conda shell.bash hook)" conda config --add channels conda-forge conda config --set channel_priority strict - conda create --yes --quiet --name build python=$PYTHON_VERSION conda conda-build - displayName: Create Anaconda build environment + conda install --yes python=$PYTHON_VERSION conda conda-build mamba boa + conda update --all --yes + displayName: Update conda base environment - bash: | set -e eval "$(conda shell.bash hook)" - conda activate build - conda build -m "ci/python${PYTHON_VERSION}.yaml" "recipe" + conda activate + # workaround based on recent failures + rm /usr/share/miniconda/pkgs/cache/*.json + conda mambabuild -m "ci/python${PYTHON_VERSION}.yaml" "ci/recipe" displayName: Build pyremap - bash: | set -e eval "$(conda shell.bash hook)" - conda activate build - conda create --yes --quiet --name test -c ${CONDA_PREFIX}/conda-bld/ \ - python=$PYTHON_VERSION pyremap pytest - displayName: Create Anaconda test environment + conda activate + mamba create --yes --quiet --name test -c ${CONDA_PREFIX}/conda-bld/ \ + python=$PYTHON_VERSION pyremap "esmf=*=mpi_mpich_*" pytest + displayName: Create Anaconda pyremap environment - bash: | set -e @@ -61,9 +65,10 @@ jobs: - bash: | set -e eval "$(conda shell.bash hook)" - conda activate build + conda activate conda create --yes --quiet --name docs -c ${CONDA_PREFIX}/conda-bld/ \ - python=$PYTHON_VERSION pyremap sphinx mock sphinx_rtd_theme m2r2 + python=$PYTHON_VERSION pyremap sphinx mock sphinx_rtd_theme m2r2 \ + "mistune<2" condition: eq(variables['python.version'], '3.10') displayName: Create Anaconda docs environment @@ -153,25 +158,27 @@ jobs: - bash: | set -e + eval "$(conda shell.bash hook)" conda config --add channels conda-forge conda config --set channel_priority strict - conda create --yes --quiet --name build python=$PYTHON_VERSION conda conda-build - displayName: Create Anaconda build environment + conda install --yes python=$PYTHON_VERSION conda conda-build mamba boa + conda update --all --yes + displayName: Update conda base environment - bash: | set -e eval "$(conda shell.bash hook)" - conda activate build - conda build -m "ci/python${PYTHON_VERSION}.yaml" "recipe" + conda activate + conda mambabuild -m "ci/python${PYTHON_VERSION}.yaml" "ci/recipe" displayName: Build pyremap - bash: | set -e eval "$(conda shell.bash hook)" - conda activate build - conda create --yes --quiet --name test -c ${CONDA_PREFIX}/conda-bld/ \ - python=$PYTHON_VERSION pyremap pytest sphinx mock sphinx_rtd_theme m2r2 - displayName: Create Anaconda test environment + conda activate + mamba create --yes --quiet --name test -c ${CONDA_PREFIX}/conda-bld/ \ + python=$PYTHON_VERSION pyremap "esmf=*=mpi_mpich_*" pytest + displayName: Create Anaconda pyremap environment - bash: | set -e @@ -179,4 +186,3 @@ jobs: conda activate test pytest --pyargs pyremap displayName: pytest - diff --git a/recipe/meta.yaml b/ci/recipe/meta.yaml similarity index 98% rename from recipe/meta.yaml rename to ci/recipe/meta.yaml index 2ff5b67..622f71d 100644 --- a/recipe/meta.yaml +++ b/ci/recipe/meta.yaml @@ -6,7 +6,7 @@ package: version: {{ version }} source: - path: .. + path: ../.. build: number: 0