diff --git a/script/cibuild b/script/cibuild index 7fa14ba7..29cc3d2d 100755 --- a/script/cibuild +++ b/script/cibuild @@ -5,6 +5,8 @@ import platform import subprocess import sys +from lib.util import get_vs_env + SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) # We're in JENKINS_ROOT/workspace/libchromiumcontent. Walk up to JENKINS_ROOT. @@ -17,9 +19,6 @@ def main(): return 'Error: Can\'t find {0}'.format(S3_CREDENTIALS_FILE) copy_to_environment(S3_CREDENTIALS_FILE) - print 'Python version:', platform.python_version() - print 'OS version:', os_version() - if sys.platform in ['win32', 'cygwin']: return (run_ci(['-t', 'x64']) or run_ci(['-t', 'ia32'])) @@ -51,6 +50,15 @@ def os_version(): def run_ci(args): + if sys.platform in ['win32', 'cygwin']: + target_arch = args[1] + # Set build env for VS. + if target_arch == 'x64': + vs_env = get_vs_env('14.0', 'x86_amd64') + elif target_arch == 'ia32': + vs_env = get_vs_env('14.0', 'amd64_x86') + os.environ.update(vs_env) + return (run_script('bootstrap') or run_script('update', args) or run_script('build', args) or diff --git a/script/update b/script/update index bc97a879..3577b2ae 100755 --- a/script/update +++ b/script/update @@ -10,7 +10,6 @@ import tarfile import tempfile import urllib2 -from lib.util import get_vs_env from lib.config import get_output_dir @@ -131,12 +130,6 @@ def gyp_env(target_arch, component, gyp_defines): env['GYP_MSVS_VERSION'] = '2015' # Use Windows 10 SDK. env['WINDOWSSDKDIR'] = 'C:\\Program Files (x86)\\Windows Kits\\10' - # Set build env for VS. - if target_arch == 'x64': - vs_env = get_vs_env('14.0', 'x86_amd64') - elif target_arch == 'ia32': - vs_env = get_vs_env('14.0', 'amd64_x86') - env.update(vs_env) elif sys.platform == 'linux2' and target_arch in ('arm', 'ia32'): # ARM build requires cross compilation. env['GYP_CROSSCOMPILE'] = '1'