"benchmarks/benchmark_prioritization.py" did not exist on "91e84ec9febd7089edf53790285c64d3b11b3654"
deployment-pipelines.yml 4.02 KB
Newer Older
chicm-ms's avatar
chicm-ms committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28

jobs:
- job: 'Build_upload_nni_ubuntu'
  pool:
    vmImage: 'Ubuntu 16.04'
  strategy:
    matrix:
      Python36:
        PYTHON_VERSION: '3.6'

  steps:
  - script: |
      python3 -m pip install --upgrade pip setuptools --user
      python3 -m pip install twine --user
    displayName: 'Install twine'
  - script: |
      # NNI build scripts (Makefile) uses branch tag as package version number
      # To test this pipeline without impacting nni testpypi/pypi packages, uncomment following git tag command
      # git tag v0.0.1
      cd deployment/pypi
      if [ $(build_type) = 'prerelease' ]
      then
        echo 'building prerelease package...'
        make version_ts=true build
      else
        echo 'building release package...'
        make build
      fi
chicm-ms's avatar
chicm-ms committed
29
    condition: eq( variables['upload_package'], 'true' )
chicm-ms's avatar
chicm-ms committed
30
31
32
33
34
35
36
37
38
39
40
    displayName: 'build nni bdsit_wheel'
  - script: |
      cd deployment/pypi
      if [ $(build_type) = 'prerelease' ]
      then
        echo 'uploading prerelease package to testpypi...'
        python3 -m twine upload -u $(testpypi_user) -p $(testpypi_pwd) --repository-url https://test.pypi.org/legacy/ dist/*
      else
        echo 'uploading release package to pypi...'
        python3 -m twine upload -u $(pypi_user) -p $(pypi_pwd) dist/*
      fi
chicm-ms's avatar
chicm-ms committed
41
    condition: eq( variables['upload_package'], 'true' )
chicm-ms's avatar
chicm-ms committed
42
43
44
45
46
47
48
    displayName: 'upload nni package to pypi/testpypi'

  - script: |
      cd deployment/docker

      if [ $(build_type) = 'prerelease' ]
      then
chicm-ms's avatar
chicm-ms committed
49
50
51
        docker login -u $(docker_hub_dev_user) -p $(docker_hub_dev_pwd)
        export IMG_NAME=$(dev_docker_img)
        export IMG_TAG=`git describe --tags --abbrev=0`.`date +%y%m%d%H%M`
chicm-ms's avatar
chicm-ms committed
52
        echo 'updating docker file for testpyi...'
chicm-ms's avatar
chicm-ms committed
53
54
55
56
57
        sed -ie 's/RUN python3 -m pip --no-cache-dir install nni/RUN python3 -m pip install --user --no-cache-dir --index-url https:\/\/test.pypi.org\/simple --extra-index-url https:\/\/pypi.org\/simple nni/' Dockerfile
      else
        docker login -u $(docker_hub_user) -p $(docker_hub_pwd)
        export IMG_NAME=msranni/nni
        export IMG_TAG=`git describe --tags --abbrev=0`
chicm-ms's avatar
chicm-ms committed
58
      fi
chicm-ms's avatar
chicm-ms committed
59
60
61
62
63
64
65
66
67
68
69
70
      echo $IMG_NAME:$IMG_TAG
      cat Dockerfile
      docker build -f Dockerfile -t $IMG_NAME:$IMG_TAG .
      docker push $IMG_NAME:$IMG_TAG

      if [ $(update_latest_tag) = 'true' ]
      then
        docker tag $IMG_NAME:$IMG_TAG $IMG_NAME:latest
        docker push $IMG_NAME:latest
      fi

    condition: eq( variables['build_docker_img'], 'true' )
chicm-ms's avatar
chicm-ms committed
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
    displayName: 'build and upload nni docker image'

- job: 'Build_upload_nni_macos'
  pool:
    vmImage: 'macOS 10.13'
  strategy:
    matrix:
      Python36:
        PYTHON_VERSION: '3.6'
  steps:
  - script: |
      python3 -m pip install --upgrade pip setuptools --user
      python3 -m pip install twine --user
    displayName: 'Install twine'
  - script: |
      make install-dependencies
    displayName: 'Install nni dependencies'
  - script: |
      # NNI build scripts (Makefile) uses branch tag as package version number
      # To test this pipeline without impacting nni testpypi/pypi packages, uncomment following git tag command
      # git tag v0.0.1
      cd deployment/pypi
      if [ $(build_type) = 'prerelease' ]
      then
        echo 'building prerelease package...'
        PATH=$HOME/Library/Python/3.7/bin:$PATH make version_ts=true build
      else
        echo 'building release package...'
        PATH=$HOME/Library/Python/3.7/bin:$PATH make build
      fi
chicm-ms's avatar
chicm-ms committed
101
    condition: eq( variables['upload_package'], 'true' )
chicm-ms's avatar
chicm-ms committed
102
103
104
105
106
107
108
109
110
111
112
    displayName: 'build nni bdsit_wheel'
  - script: |
      cd deployment/pypi
      if [ $(build_type) = 'prerelease' ]
      then
        echo 'uploading prerelease package to testpypi...'
        python3 -m twine upload -u $(testpypi_user) -p $(testpypi_pwd) --repository-url https://test.pypi.org/legacy/ dist/*
      else
        echo 'uploading release package to pypi...'
        python3 -m twine upload -u $(pypi_user) -p $(pypi_pwd) dist/*
      fi
chicm-ms's avatar
chicm-ms committed
113
    condition: eq( variables['upload_package'], 'true' )
chicm-ms's avatar
chicm-ms committed
114
    displayName: 'upload nni package to pypi/testpypi'