You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by je...@apache.org on 2021/12/18 03:44:46 UTC

[incubator-mxnet] branch v1.9.x updated: [v1.9.x] Fix CD for pypi wheel version (#20782)

This is an automated email from the ASF dual-hosted git repository.

jevans pushed a commit to branch v1.9.x
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git


The following commit(s) were added to refs/heads/v1.9.x by this push:
     new d5f25b9  [v1.9.x] Fix CD for pypi wheel version (#20782)
d5f25b9 is described below

commit d5f25b91a97dc3d70455f6414f2f986c1a069dc0
Author: Joe Evans <jo...@gmail.com>
AuthorDate: Fri Dec 17 19:42:18 2021 -0800

    [v1.9.x] Fix CD for pypi wheel version (#20782)
    
    * Change env variable used to detect whether it's a release build or not. RELEASE_BUILD is already setup in the CD pipeline.
    
    * Refine how variable is compared to trigger release builds.
    
    * Check for 'true' exclusively, to prevent unwanted release builds.
    
    * Make sure we pass any environment variables on the build.py command line to the docker run command.
---
 ci/build.py        | 11 +++--------
 tools/pip/setup.py |  2 +-
 2 files changed, 4 insertions(+), 9 deletions(-)

diff --git a/ci/build.py b/ci/build.py
index 06a7475..b7236dc 100755
--- a/ci/build.py
+++ b/ci/build.py
@@ -273,15 +273,10 @@ def container_run(platform: str,
         # mount mxnet/build for storing build
         '-v', "{}:/work/build".format(local_build_folder),
         '-v', "{}:/work/ccache".format(local_ccache_dir),
-        '-u', '{}:{}'.format(os.getuid(), os.getgid()),
-        '-e', 'CCACHE_MAXSIZE={}'.format(environment['CCACHE_MAXSIZE']),
-        # temp dir should be local and not shared
-        '-e', 'CCACHE_TEMPDIR={}'.format(environment['CCACHE_TEMPDIR']),
-        # this path is inside the container as /work/ccache is mounted
-        '-e', "CCACHE_DIR={}".format(environment['CCACHE_DIR']),
-        # a container-scoped log, useful for ccache verification.
-        '-e', "CCACHE_LOGFILE={}".format(environment['CCACHE_LOGFILE']),
+        '-u', '{}:{}'.format(os.getuid(), os.getgid())
     ]
+    for e in environment.keys():
+        docker_arg_list += ['-e', '{}={}'.format(e, environment[e])]
     docker_arg_list += [tag]
     docker_arg_list.extend(command)
 
diff --git a/tools/pip/setup.py b/tools/pip/setup.py
index bd18f1e..a8ab7b0 100644
--- a/tools/pip/setup.py
+++ b/tools/pip/setup.py
@@ -45,7 +45,7 @@ LIB_PATH = libinfo['find_lib_path']()
 __version__ = libinfo['__version__']
 
 # set by the CD pipeline
-is_release = os.environ.get("IS_RELEASE", "").strip()
+is_release = (os.environ.get("RELEASE_BUILD", "false").strip().lower() == "true")
 
 # set by the travis build pipeline
 travis_tag = os.environ.get("TRAVIS_TAG", "").strip()