From a3fb80213bc28b6ac1e6a7da09a2af3149a677aa Mon Sep 17 00:00:00 2001 From: Chiara Marmo Date: Thu, 24 Jun 2021 18:43:34 +0200 Subject: [PATCH 1/2] Add a conda-based CI job on azure. --- azure-pipelines.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 14a59e8800af..1461f5bbc502 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -305,4 +305,34 @@ stages: failTaskOnFailedTests: true testRunTitle: 'Publish test results for gcc 4.8' + - job: Linux_conda + pool: + vmImage: 'ubuntu-20.04' + steps: + - script: | + # Download and install miniconda + MINICONDA_PATH=$HOME/miniconda + wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh + /bin/bash miniconda.sh -b -p $MINICONDA_PATH + export PATH="$MINICONDA_PATH/bin:$PATH" + # >>> conda initialize >>> + # !! Contents within this block are 'conda init' !! + # see https://github.com/conda/conda/issues/7980 + __conda_setup="$('conda' 'shell.bash' 'hook' 2> /dev/null)" + eval "$__conda_setup" + unset __conda_setup + # <<< conda initialize <<< + # create and activate conda environment + conda env create -f environment.yml + conda activate numpy-dev + # Run native baseline Build / Tests + python3 runtests.py --show-build-log --cpu-baseline=native --cpu-dispatch=none \ + --debug-info --mode=full -- -rsx --junitxml=junit/test-results.xml + displayName: 'Run native baseline Build / Tests in conda environment.' + - task: PublishTestResults@2 + condition: succeededOrFailed() + inputs: + testResultsFiles: '**/test-*.xml' + failTaskOnFailedTests: true + testRunTitle: 'Publish test results for conda installation' From d96daa662083aee6608d31645e4caa1950688b28 Mon Sep 17 00:00:00 2001 From: Chiara Marmo Date: Mon, 28 Jun 2021 18:15:39 +0200 Subject: [PATCH 2/2] Split pipeline. Update version of mypy to 0.902. --- azure-pipelines.yml | 15 ++++++--------- environment.yml | 2 +- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 1461f5bbc502..fa527f56544d 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -310,11 +310,10 @@ stages: vmImage: 'ubuntu-20.04' steps: - script: | - # Download and install miniconda - MINICONDA_PATH=$HOME/miniconda - wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh - /bin/bash miniconda.sh -b -p $MINICONDA_PATH - export PATH="$MINICONDA_PATH/bin:$PATH" + # create and activate conda environment + conda env create -f environment.yml + displayName: 'Create conda environment.' + - script: | # >>> conda initialize >>> # !! Contents within this block are 'conda init' !! # see https://github.com/conda/conda/issues/7980 @@ -322,13 +321,11 @@ stages: eval "$__conda_setup" unset __conda_setup # <<< conda initialize <<< - # create and activate conda environment - conda env create -f environment.yml conda activate numpy-dev # Run native baseline Build / Tests - python3 runtests.py --show-build-log --cpu-baseline=native --cpu-dispatch=none \ + python runtests.py --show-build-log --cpu-baseline=native --cpu-dispatch=none \ --debug-info --mode=full -- -rsx --junitxml=junit/test-results.xml - displayName: 'Run native baseline Build / Tests in conda environment.' + displayName: 'Run native baseline Build / Tests in conda.' - task: PublishTestResults@2 condition: succeededOrFailed() inputs: diff --git a/environment.yml b/environment.yml index 607aeb231167..40670b5dfc94 100644 --- a/environment.yml +++ b/environment.yml @@ -18,7 +18,7 @@ dependencies: - pytest-xdist - hypothesis # For type annotations - - mypy=0.812 + - mypy=0.902 - typing_extensions # For building docs - sphinx=4.0.1