Skip to content
This repository has been archived by the owner on Sep 18, 2024. It is now read-only.

Commit

Permalink
Exit when installation failed on pipeline (#2548)
Browse files Browse the repository at this point in the history
  • Loading branch information
ultmaster authored Jun 17, 2020
1 parent 3440e24 commit d04441b
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 3 deletions.
13 changes: 10 additions & 3 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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}"
Expand All @@ -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
Expand All @@ -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'
Expand Down
2 changes: 2 additions & 0 deletions test/pipelines/pipelines-it-frameworkcontroller.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ jobs:
displayName: 'Install python tools'

- script: |
set -e
cd deployment/pypi
if [ -d ./dist ]
then
Expand All @@ -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
Expand Down
1 change: 1 addition & 0 deletions test/pipelines/pipelines-it-kubeflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ jobs:
displayName: 'Install python tools'

- script: |
set -e
cd deployment/pypi
if [ -d ./dist ]
then
Expand Down
1 change: 1 addition & 0 deletions test/pipelines/pipelines-it-local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions test/pipelines/pipelines-it-pai.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ jobs:
displayName: 'Install python tools'

- script: |
set -e
cd deployment/pypi
if [ -d ./dist ]
then
Expand All @@ -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
Expand Down
2 changes: 2 additions & 0 deletions test/pipelines/pipelines-it-paiYarn.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ jobs:
displayName: 'Install python tools'

- script: |
set -e
cd deployment/pypi
echo 'building prerelease package...'
make build
Expand All @@ -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
Expand Down
3 changes: 3 additions & 0 deletions test/pipelines/pipelines-it-remote-linux-to-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions test/pipelines/pipelines-it-remote-linux-to-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions test/scripts/it.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/bash
set -e
CWD=${PWD}

## Export certain environment variables for unittest code to work
Expand Down

0 comments on commit d04441b

Please sign in to comment.