From 299f8aac8de06e4e3f67224d86dc79113b6973bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20BRIOL?= Date: Tue, 5 Nov 2024 23:11:44 +0100 Subject: [PATCH] Refactor CI pipeline to activate Miniconda environment directly from the installation path --- azure-pipelines.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 3ab6a7d..9a5e8df 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -115,23 +115,27 @@ jobs: displayName: Add Homebrew to PATH - bash: brew install --cask miniconda displayName: Install Miniconda with Homebrew - - bash: echo "##vso[task.prependpath]$CONDA/bin" - displayName: Add conda to PATH - - bash: conda create --yes --quiet --name Build + - bash: | + source /usr/local/Caskroom/miniconda/base/bin/activate + conda create --yes --quiet --name Build displayName: Create Anaconda environment - bash: | + source /usr/local/Caskroom/miniconda/base/bin/activate source activate Build conda install --yes --quiet -c conda-forge mamba python=$PYTHON_VERSION displayName: Install mamba - bash: | + source /usr/local/Caskroom/miniconda/base/bin/activate source activate Build mamba install --yes --quiet -c conda-forge dask cmake coverage eigen boost-cpp numpy pytest-cov setuptools xarray displayName: Install build requirements - bash: | + source /usr/local/Caskroom/miniconda/base/bin/activate source activate Build python setup.py build displayName: Build package - bash: | + source /usr/local/Caskroom/miniconda/base/bin/activate source activate Build python setup.py test displayName: Test cases