Skip to content

Commit

Permalink
Update CI to use mamba and esmf with mpicht
Browse files Browse the repository at this point in the history
  • Loading branch information
xylar committed Nov 6, 2022
1 parent 89f9f86 commit 8a4ecf3
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 20 deletions.
44 changes: 25 additions & 19 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -153,30 +158,31 @@ 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
eval "$(conda shell.bash hook)"
conda activate test
pytest --pyargs pyremap
displayName: pytest
2 changes: 1 addition & 1 deletion recipe/meta.yaml → ci/recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ package:
version: {{ version }}

source:
path: ..
path: ../..

build:
number: 0
Expand Down

0 comments on commit 8a4ecf3

Please sign in to comment.