Skip to content

Commit

Permalink
Trying to use different conda syntax in Azure
Browse files Browse the repository at this point in the history
  • Loading branch information
Greg Blumberg committed Feb 12, 2019
1 parent ae6f43b commit fc27d63
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 12 deletions.
30 changes: 18 additions & 12 deletions azure-pipelines.yml
Expand Up @@ -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
Expand All @@ -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)"
Expand All @@ -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
Expand Down
4 changes: 4 additions & 0 deletions environment.yml
Expand Up @@ -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
Expand Down

0 comments on commit fc27d63

Please sign in to comment.