diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 2921ea0f..2c6b1ed9 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -33,21 +33,25 @@ pool: steps: # Setup the conda environment and install the needed packages (use conda-forge) -- task: CondaEnvironment@1 - displayName: 'Install Conda and packages' - inputs: - packageSpecs: 'python=3 numpy=1.15.* pyside pytest pip python-dateutil requests setuptools pyinstaller' - installOptions: '-q -c conda-forge' +#- task: CondaEnvironment@1 +# displayName: 'Install Conda and packages' +# inputs: +# packageSpecs: 'python=3 numpy=1.15.* pyside pytest pip python-dateutil requests setuptools pyinstaller' +# installOptions: '-q -c conda-forge' # environmentName: 'test-env' # createCustomEnvironment: true +- script: conda env create --quiet --file environment.yml + displayName: Create Anaconda environment + # Output the conda environment packages and which python and pip is being used (for diagnostic purposes) - script: which python & which pip & which pyinstaller & conda list displayName: "Show python and conda configuration" # Install and test scripts for Ubuntu/Linuxs - script: | - python setup.py -q install --user # Install the + source activate devel + python setup.py -q install # Install the Xvfb :99 -screen 0 $(screen_w)x$(screen_h)x$(screen_d) & # Spin up a virtual screen with the correct dimensions export DISPLAY=:99 # Set up the DISPLAY variable sleep 3 # give xvfb some time to start @@ -64,17 +68,18 @@ steps: # Must use sudo for python-dependent stuff because conda permissions have # stupid bug under macOS. - script: | - sudo conda install -y -q -c anaconda python.app + source activate devel + conda install -y -q -c anaconda python.app which python.app ls /usr/local/miniconda/python.app/Contents/Resources system_profiler SPDisplaysDataType | grep Resolution # Check display dimensions using OS tools - sudo python ci/screen.py # Check display dimensions as seen by PySide - sudo python setup.py -q install + python ci/screen.py # Check display dimensions as seen by PySide + python setup.py -q install #sudo pytest -v --junitxml=junit/test-results.xml #sudo mv examples/data/14061619.png examples/data/14061619_mac.png cd runsharp - sudo pyinstaller SHARPpy-osx.spec --noconsole --onefile --log-level DEBUG - sudo chmod 777 dist/SHARPpy.app + pyinstaller SHARPpy-osx.spec --noconsole --onefile --log-level DEBUG + #sudo chmod 777 dist/SHARPpy.app ls -lh dist cd .. displayName: "Installing code and running tests (macOS)" @@ -89,8 +94,9 @@ steps: # Install and test scripts for Windows - script: | + call activate devel python ci/screen.py - SET PYTHONPATH=%PYTHONPATH%;%CD% + #SET PYTHONPATH=%PYTHONPATH%;%CD% python setup.py -q install #pip install -e . #pytest -v --junitxml=junit/test-results.xml diff --git a/environment.yml b/environment.yml index b5bb1f8d..14718754 100644 --- a/environment.yml +++ b/environment.yml @@ -2,17 +2,21 @@ name: devel channels: - conda-forge/label/testing - conda-forge + - anaconda dependencies: - python=3 - numpy=1.15.* - pyside - sphinx + - pytest - sphinx-gallery - sphinx-rtd-theme - pytest-cov - matplotlib - requests - python-dateutil + - pyinstaller + - setuptools - pip: - sphinx-prompt - pydocstyle