Unverified Commit d04441b1 authored by Yuge Zhang's avatar Yuge Zhang Committed by GitHub
Browse files

Exit when installation failed on pipeline (#2548)

parent 3440e246
......@@ -8,6 +8,7 @@ jobs:
steps:
- script: |
set -e
python3 -m pip install --upgrade pip setuptools --user
python3 -m pip install pylint==2.3.1 astroid==2.2.5 --user
python3 -m pip install coverage --user
......@@ -25,6 +26,7 @@ jobs:
yarn eslint
displayName: 'Run eslint'
- script: |
set -e
python3 -m pip install torch==1.5.0+cpu torchvision==0.6.0+cpu -f https://download.pytorch.org/whl/torch_stable.html --user
python3 -m pip install tensorflow==1.15.2 --user
python3 -m pip install keras==2.1.6 --user
......@@ -44,6 +46,7 @@ jobs:
python3 -m pylint --rcfile pylintrc nnicli
displayName: 'Run pylint'
- script: |
set -e
python3 -m pip install flake8 --user
EXCLUDES=./src/nni_manager/,./src/webui,./tools/nni_annotation/testcase/,./examples/trials/mnist-nas/*/mnist*.py,./examples/trials/nas_cifar10/src/cifar10/general_child.py
python3 -m flake8 . --count --exclude=$EXCLUDES --select=E9,F63,F72,F82 --show-source --statistics
......@@ -67,6 +70,7 @@ jobs:
steps:
- script: |
set -e
python3 -m pip install --upgrade pip setuptools --user
python3 -m pip install coverage --user
echo "##vso[task.setvariable variable=PATH]${HOME}/.local/bin:${PATH}"
......@@ -75,6 +79,7 @@ jobs:
source install.sh
displayName: 'Install nni toolkit via source code'
- script: |
set -e
python3 -m pip install torch==1.3.1+cpu torchvision==0.4.2+cpu -f https://download.pytorch.org/whl/torch_stable.html --user
python3 -m pip install tensorflow==1.15.2 --user
python3 -m pip install keras==2.1.6 --user
......@@ -98,18 +103,20 @@ jobs:
vmImage: 'macOS-10.15'
steps:
- script: python3 -m pip install --upgrade pip setuptools
- script: |
python3 -m pip install --upgrade pip setuptools
echo "##vso[task.setvariable variable=PATH]${HOME}/Library/Python/3.7/bin:${PATH}"
displayName: 'Install python tools'
- script: |
source install.sh
echo "##vso[task.setvariable variable=PATH]${HOME}/Library/Python/3.7/bin:${PATH}"
displayName: 'Install nni toolkit via source code'
- script: |
set -e
# pytorch Mac binary does not support CUDA, default is cpu version
python3 -m pip install torchvision==0.6.0 torch==1.5.0 --user
python3 -m pip install tensorflow==1.15.2 --user
brew install swig@3
rm /usr/local/bin/swig
rm -f /usr/local/bin/swig
ln -s /usr/local/opt/swig\@3/bin/swig /usr/local/bin/swig
nnictl package install --name=SMAC
displayName: 'Install dependencies'
......
......@@ -10,6 +10,7 @@ jobs:
displayName: 'Install python tools'
- script: |
set -e
cd deployment/pypi
if [ -d ./dist ]
then
......@@ -26,6 +27,7 @@ jobs:
displayName: 'Install nni toolkit via source code'
- script: |
set -e
sudo apt-get install swig -y
PATH=$HOME/.local/bin:$PATH nnictl package install --name=SMAC
PATH=$HOME/.local/bin:$PATH nnictl package install --name=BOHB
......
......@@ -10,6 +10,7 @@ jobs:
displayName: 'Install python tools'
- script: |
set -e
cd deployment/pypi
if [ -d ./dist ]
then
......
......@@ -9,6 +9,7 @@ jobs:
source install.sh
displayName: 'Install nni toolkit via source code'
- script: |
set -e
python3 -m pip install scikit-learn==0.20.0 --user
python3 -m pip install torchvision==0.4.1 --user
python3 -m pip install torch==1.3.1 --user
......
......@@ -10,6 +10,7 @@ jobs:
displayName: 'Install python tools'
- script: |
set -e
cd deployment/pypi
if [ -d ./dist ]
then
......@@ -26,6 +27,7 @@ jobs:
displayName: 'Install nni toolkit via source code'
- script: |
set -e
sudo apt-get install swig -y
PATH=$HOME/.local/bin:$PATH nnictl package install --name=SMAC
PATH=$HOME/.local/bin:$PATH nnictl package install --name=BOHB
......
......@@ -10,6 +10,7 @@ jobs:
displayName: 'Install python tools'
- script: |
set -e
cd deployment/pypi
echo 'building prerelease package...'
make build
......@@ -22,6 +23,7 @@ jobs:
displayName: 'Install nni toolkit via source code'
- script: |
set -e
sudo apt-get install swig -y
PATH=$HOME/.local/bin:$PATH nnictl package install --name=SMAC
PATH=$HOME/.local/bin:$PATH nnictl package install --name=BOHB
......
......@@ -6,6 +6,7 @@ jobs:
- script: python3 -m pip install --upgrade pip setuptools --user
displayName: 'Install python tools'
- script: |
set -e
cd deployment/pypi
echo 'building prerelease package...'
make build
......@@ -15,6 +16,7 @@ jobs:
source install.sh
displayName: 'Install nni toolkit via source code'
- script: |
set -e
sudo apt-get install swig -y
PATH=$HOME/.local/bin:$PATH nnictl package install --name=SMAC
PATH=$HOME/.local/bin:$PATH nnictl package install --name=BOHB
......@@ -45,6 +47,7 @@ jobs:
inputs:
secureFile: $(remote_private_key)
- script: |
set -e
cp $(Agent.TempDirectory)/$(remote_private_key) test/id_rsa
chmod 600 test/id_rsa
scp -P $(remote_port) -i test/id_rsa $(remote_user)@$(remote_host):/tmp/nnitest/$(Build.BuildId)/port test/port
......
......@@ -27,6 +27,7 @@ jobs:
- script: make easy-install
displayName: "Install nni via source code"
- script: |
set -e
sudo apt-get install swig -y
PATH=$HOME/.local/bin:$PATH nnictl package install --name=SMAC
PATH=$HOME/.local/bin:$PATH nnictl package install --name=BOHB
......
#!/bin/bash
set -e
CWD=${PWD}
## Export certain environment variables for unittest code to work
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment