Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
nni
Commits
9f9aa43e
Unverified
Commit
9f9aa43e
authored
Dec 25, 2020
by
liuzhe-lz
Committed by
GitHub
Dec 25, 2020
Browse files
Fix releasing (#3216)
parent
54ed2b93
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
17 deletions
+23
-17
.gitignore
.gitignore
+1
-0
nni/__init__.py
nni/__init__.py
+1
-1
pipelines/release.yml
pipelines/release.yml
+18
-12
setup.py
setup.py
+3
-4
No files found.
.gitignore
View file @
9f9aa43e
/nni/version.py
/nni_node/
/toolchain/
...
...
nni/__init__.py
View file @
9f9aa43e
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
__
version
__
=
'999.0.0-developing'
from
.
version
import
__version__
from
.runtime.log
import
init_logger
init_logger
()
...
...
pipelines/release.yml
View file @
9f9aa43e
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
trigger
:
none
pr
:
none
jobs
:
-
job
:
validate_version_number
pool
:
...
...
@@ -49,22 +52,22 @@ jobs:
displayName
:
Configure Python version
-
script
:
|
python -m pip install --upgrade pip setuptools twine
python -m pip install --upgrade pip setuptools
wheel
twine
python test/vso_tools/build_wheel.py $(NNI_RELEASE)
displayName
:
Build wheel
if [ $(build_type) = 'release' ]
-
script
:
|
if [ $(build_type) = 'release' ]; then
echo 'uploading release package to pypi...'
python -m twine upload -u nni -p $(pypi_password) dist/*
then
else
echo 'uploading prerelease package to testpypi...'
python -m twine upload -u nni -p $(pypi_password) --repository-url https://test.pypi.org/legacy/ dist/*
fi
displayName
:
Build and u
pload wheel
displayName
:
U
pload wheel
-
script
:
|
if [ $(build_type) = 'release' ]
then
if [ $(build_type) = 'release' ]; then
docker login -u msranni -p $(docker_hub_password)
export IMAGE_NAME=msranni/nni
else
...
...
@@ -92,18 +95,19 @@ jobs:
displayName
:
Configure Python version
-
script
:
|
python -m pip install --upgrade pip setuptools twine
python -m pip install --upgrade pip setuptools
wheel
twine
python test/vso_tools/build_wheel.py $(NNI_RELEASE)
displayName
:
Build wheel
if [ $(build_type) = 'release' ]
-
script
:
|
if [ $(build_type) = 'release' ]; then
echo '## uploading to pypi ##'
python -m twine upload -u nni -p $(pypi_password) dist/*
then
else
echo '## uploading to testpypi ##'
python -m twine upload -u nni -p $(pypi_password) --repository-url https://test.pypi.org/legacy/ dist/*
fi
displayName
:
Build and u
pload wheel
displayName
:
U
pload wheel
-
job
:
windows
dependsOn
:
validate_version_number
...
...
@@ -118,9 +122,11 @@ jobs:
displayName
:
Configure Python version
-
powershell
:
|
python -m pip install --upgrade pip setuptools twine
python -m pip install --upgrade pip setuptools
wheel
twine
python test/vso_tools/build_wheel.py $(NNI_RELEASE)
displayName
:
Build wheel
-
powershell
:
|
if($env:BUILD_TYPE -eq 'release'){
Write-Host '## uploading to pypi ##'
python -m twine upload -u nni -p $(pypi_password) dist/*
...
...
@@ -129,4 +135,4 @@ jobs:
Write-Host '## uploading to testpypi ##'
python -m twine upload -u nni -p $(pypi_password) --repository-url https://test.pypi.org/legacy/ dist/*
}
displayName
:
Build and u
pload wheel
displayName
:
U
pload wheel
setup.py
View file @
9f9aa43e
...
...
@@ -112,10 +112,7 @@ def _setup():
python_requires
=
'>=3.6'
,
install_requires
=
dependencies
,
extras_require
=
{
'SMAC'
:
[
'ConfigSpaceNNI @ git+https://github.com/QuanluZhang/ConfigSpace.git'
,
'smac @ git+https://github.com/QuanluZhang/SMAC3.git'
],
'SMAC'
:
[
'ConfigSpaceNNI'
,
'smac4nni'
],
'BOHB'
:
[
'ConfigSpace==0.4.7'
,
'statsmodels==0.10.0'
],
'PPOTuner'
:
[
'enum34'
,
'gym'
]
},
...
...
@@ -189,6 +186,7 @@ class Build(build):
sys
.
exit
(
'Please set environment variable "NNI_RELEASE=<release_version>"'
)
if
os
.
path
.
islink
(
'nni_node/main.js'
):
sys
.
exit
(
'A development build already exists. Please uninstall NNI and run "python3 setup.py clean --all".'
)
open
(
'nni/version.py'
,
'w'
).
write
(
f
"__version__ = '
{
release
}
'"
)
super
().
run
()
class
Develop
(
develop
):
...
...
@@ -212,6 +210,7 @@ class Develop(develop):
super
().
finalize_options
()
def
run
(
self
):
open
(
'nni/version.py'
,
'w'
).
write
(
"__version__ = '999.dev0'"
)
if
not
self
.
skip_ts
:
setup_ts
.
build
(
release
=
None
)
super
().
run
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment