From 07af12d489ec82b5bbc4bfa14176a4b63dc7947c Mon Sep 17 00:00:00 2001 From: Ognyan Moore Date: Fri, 21 Feb 2020 09:28:48 -0800 Subject: [PATCH] Update CI Config --- azure-pipelines.yml | 14 +++++----- azure-test-template.yml | 62 +++++++++++++++++------------------------ 2 files changed, 33 insertions(+), 43 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 657189f8..b9abcf86 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -23,7 +23,7 @@ stages: jobs: - job: check_diff_size pool: - vmImage: 'Ubuntu 16.04' + vmImage: 'Ubuntu 18.04' steps: - bash: | git config --global advice.detachedHead false @@ -56,7 +56,7 @@ stages: - job: "style_check" pool: - vmImage: "Ubuntu 16.04" + vmImage: "Ubuntu 18.04" steps: - task: UsePythonVersion@0 inputs: @@ -69,11 +69,11 @@ stages: - job: "build_wheel" pool: - vmImage: 'Ubuntu 16.04' + vmImage: 'Ubuntu 18.04' steps: - task: UsePythonVersion@0 inputs: - versionSpec: 3.7 + versionSpec: 3.8 - script: | python -m pip install setuptools wheel python setup.py bdist_wheel --universal @@ -87,12 +87,12 @@ stages: - template: azure-test-template.yml parameters: name: linux - vmImage: 'Ubuntu 16.04' + vmImage: 'Ubuntu 18.04' - template: azure-test-template.yml parameters: name: windows - vmImage: 'vs2017-win2016' + vmImage: 'windows-2019' - template: azure-test-template.yml parameters: name: macOS - vmImage: 'macOS-10.13' + vmImage: 'macOS-10.15' diff --git a/azure-test-template.yml b/azure-test-template.yml index 5d204009..bc1a16df 100644 --- a/azure-test-template.yml +++ b/azure-test-template.yml @@ -22,17 +22,13 @@ jobs: python.version: "3.6" qt.bindings: "pyqt" install.method: "conda" - Python36-PySide2-5.9: - python.version: "3.6" - qt.bindings: "pyside2" - install.method: "conda" - Python37-PyQt-5.13: - python.version: '3.7' - qt.bindings: "PyQt5" - install.method: "pip" Python37-PySide2-5.13: python.version: "3.7" - qt.bindings: "PySide2" + qt.bindings: "pyside2" + install.method: "conda" + Python38-PyQt-5.14: + python.version: '3.8' + qt.bindings: "PyQt5" install.method: "pip" steps: @@ -75,22 +71,10 @@ jobs: if [ $(agent.os) == 'Linux' ] then echo "##vso[task.prependpath]$CONDA/bin" - if [ $(python.version) == '2.7' ] - then - echo "Grabbing Older Miniconda" - wget https://repo.anaconda.com/miniconda/Miniconda2-4.6.14-Linux-x86_64.sh -O Miniconda.sh - bash Miniconda.sh -b -p $CONDA -f - fi elif [ $(agent.os) == 'Darwin' ] then sudo chown -R $USER $CONDA echo "##vso[task.prependpath]$CONDA/bin" - if [ $(python.version) == '2.7' ] - then - echo "Grabbing Older Miniconda" - wget https://repo.anaconda.com/miniconda/Miniconda2-4.6.14-MacOSX-x86_64.sh -O Miniconda.sh - bash Miniconda.sh -b -p $CONDA -f - fi elif [ $(agent.os) == 'Windows_NT' ] then echo "##vso[task.prependpath]$CONDA/Scripts" @@ -103,25 +87,31 @@ jobs: - bash: | if [ $(install.method) == "conda" ] then - conda create --name test-environment-$(python.version) python=$(python.version) --yes - echo "Conda Info:" - conda info - echo "Installing qt-bindings" + conda create --name test-environment-$(python.version) python=$(python.version) --yes --quiet source activate test-environment-$(python.version) - - if [ $(agent.os) == "Linux" ] && [ $(python.version) == "2.7" ] + conda config --env --set always_yes true + if [ $(python.version) == '2.7' ] && [ $(agent.os) != 'Windows_NT' ] then - conda install $(qt.bindings) --yes - else - conda install -c conda-forge $(qt.bindings) --yes + conda config --set restore_free_channel true fi - echo "Installing remainder of dependencies" - conda install -c conda-forge numpy scipy six pyopengl h5py --yes + + if [ $(qt.bindings) == "pyside2" ] || ([ $(qt.bindings) == 'pyside' ] && [ $(agent.os) == 'Darwin' ]) + then + conda config --prepend channels conda-forge + fi + conda info + if [ $(python.version) == '2.7' ] && [ $(agent.os) == 'Linux' ] + then + pip install --upgrade pip==19.3.1 + conda install setuptools=44.0.0 --yes --quiet + conda install nomkl + fi + conda install $(qt.bindings) numpy scipy pyopengl h5py six --yes --quiet else - pip install $(qt.bindings) numpy scipy pyopengl six h5py + pip install $(qt.bindings) numpy scipy pyopengl h5py six fi echo "" - pip install pytest pytest-xdist pytest-cov coverage + pip install pytest pytest-cov coverage if [ $(python.version) == "2.7" ] then pip install pytest-faulthandler==1.6.0 @@ -180,9 +170,9 @@ jobs: mkdir -p "$SCREENSHOT_DIR" # echo "If Screenshots are generated, they may be downloaded from:" # echo "https://dev.azure.com/pyqtgraph/pyqtgraph/_apis/build/builds/$(Build.BuildId)/artifacts?artifactName=Screenshots&api-version=5.0" - pytest . -sv \ + pytest . -v \ --junitxml=junit/test-results.xml \ - -n 1 --cov pyqtgraph --cov-report=xml --cov-report=html + --cov pyqtgraph --cov-report=xml --cov-report=html displayName: 'Unit tests' env: AZURE: 1