| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 | 5 |
| 6 """Entry point for both build and try bots. | 6 """Entry point for both build and try bots. |
| 7 | 7 |
| 8 This script is invoked from XXX, usually without arguments | 8 This script is invoked from XXX, usually without arguments |
| 9 to package an SDK. It automatically determines whether | 9 to package an SDK. It automatically determines whether |
| 10 this SDK is for mac, win, linux. | 10 this SDK is for mac, win, linux. |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 import getos | 49 import getos |
| 50 import oshelpers | 50 import oshelpers |
| 51 | 51 |
| 52 BUILD_DIR = os.path.join(NACL_DIR, 'build') | 52 BUILD_DIR = os.path.join(NACL_DIR, 'build') |
| 53 NACL_TOOLCHAIN_DIR = os.path.join(NACL_DIR, 'toolchain') | 53 NACL_TOOLCHAIN_DIR = os.path.join(NACL_DIR, 'toolchain') |
| 54 NACL_TOOLCHAINTARS_DIR = os.path.join(NACL_TOOLCHAIN_DIR, '.tars') | 54 NACL_TOOLCHAINTARS_DIR = os.path.join(NACL_TOOLCHAIN_DIR, '.tars') |
| 55 | 55 |
| 56 CYGTAR = os.path.join(BUILD_DIR, 'cygtar.py') | 56 CYGTAR = os.path.join(BUILD_DIR, 'cygtar.py') |
| 57 PKGVER = os.path.join(BUILD_DIR, 'package_version', 'package_version.py') | 57 PKGVER = os.path.join(BUILD_DIR, 'package_version', 'package_version.py') |
| 58 | 58 |
| 59 NACLPORTS_URL = 'https://naclports.googlecode.com/svn/trunk/src' | 59 NACLPORTS_URL = 'https://chromium.googlesource.com/external/naclports.git' |
| 60 NACLPORTS_REV = 1293 | 60 NACLPORTS_REV = '99f2417' |
| 61 | 61 |
| 62 GYPBUILD_DIR = 'gypbuild' | 62 GYPBUILD_DIR = 'gypbuild' |
| 63 | 63 |
| 64 options = None | 64 options = None |
| 65 | 65 |
| 66 # Map of: ToolchainName: (PackageName, SDKDir). | 66 # Map of: ToolchainName: (PackageName, SDKDir). |
| 67 TOOLCHAIN_PACKAGE_MAP = { | 67 TOOLCHAIN_PACKAGE_MAP = { |
| 68 'newlib': ('nacl_x86_newlib', '%(platform)s_x86_newlib'), | 68 'newlib': ('nacl_x86_newlib', '%(platform)s_x86_newlib'), |
| 69 'bionic': ('nacl_arm_bionic', '%(platform)s_arm_bionic'), | 69 'bionic': ('nacl_arm_bionic', '%(platform)s_arm_bionic'), |
| 70 'arm': ('nacl_arm_newlib', '%(platform)s_arm_newlib'), | 70 'arm': ('nacl_arm_newlib', '%(platform)s_arm_newlib'), |
| (...skipping 730 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 801 step_link=False) | 801 step_link=False) |
| 802 buildbot_common.Archive('nacl_sdk.zip', bucket_path, OUT_DIR, | 802 buildbot_common.Archive('nacl_sdk.zip', bucket_path, OUT_DIR, |
| 803 step_link=False) | 803 step_link=False) |
| 804 | 804 |
| 805 | 805 |
| 806 def BuildStepSyncNaClPorts(): | 806 def BuildStepSyncNaClPorts(): |
| 807 """Pull the pinned revision of naclports from SVN.""" | 807 """Pull the pinned revision of naclports from SVN.""" |
| 808 buildbot_common.BuildStep('Sync naclports') | 808 buildbot_common.BuildStep('Sync naclports') |
| 809 if not os.path.exists(NACLPORTS_DIR): | 809 if not os.path.exists(NACLPORTS_DIR): |
| 810 # checkout new copy of naclports | 810 # checkout new copy of naclports |
| 811 cmd = ['svn', 'checkout', '-q', '-r', str(NACLPORTS_REV), NACLPORTS_URL, | 811 cmd = ['git', 'clone', NACLPORTS_URL, 'naclports'] |
| 812 'naclports'] | |
| 813 buildbot_common.Run(cmd, cwd=os.path.dirname(NACLPORTS_DIR)) | 812 buildbot_common.Run(cmd, cwd=os.path.dirname(NACLPORTS_DIR)) |
| 814 else: | 813 else: |
| 815 # sync existing copy to pinned revision. | 814 # checkout new copy of naclports |
| 816 cmd = ['svn', 'update', '-r', str(NACLPORTS_REV)] | 815 buildbot_common.Run(['git', 'fetch'], cwd=NACLPORTS_DIR) |
| 817 buildbot_common.Run(cmd, cwd=NACLPORTS_DIR) | 816 |
| 817 # sync to required revision |
| 818 cmd = ['git', 'checkout', str(NACLPORTS_REV)] |
| 819 buildbot_common.Run(cmd, cwd=NACLPORTS_DIR) |
| 818 | 820 |
| 819 | 821 |
| 820 def BuildStepBuildNaClPorts(pepper_ver, pepperdir): | 822 def BuildStepBuildNaClPorts(pepper_ver, pepperdir): |
| 821 """Build selected naclports in all configurations.""" | 823 """Build selected naclports in all configurations.""" |
| 822 # TODO(sbc): currently naclports doesn't know anything about | 824 # TODO(sbc): currently naclports doesn't know anything about |
| 823 # Debug builds so the Debug subfolders are all empty. | 825 # Debug builds so the Debug subfolders are all empty. |
| 824 | 826 |
| 825 env = dict(os.environ) | 827 env = dict(os.environ) |
| 826 env['NACL_SDK_ROOT'] = pepperdir | 828 env['NACL_SDK_ROOT'] = pepperdir |
| 827 env['PEPPER_DIR'] = os.path.basename(pepperdir) # pepper_NN | 829 env['PEPPER_DIR'] = os.path.basename(pepperdir) # pepper_NN |
| (...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1045 BuildStepArchiveSDKTools() | 1047 BuildStepArchiveSDKTools() |
| 1046 | 1048 |
| 1047 return 0 | 1049 return 0 |
| 1048 | 1050 |
| 1049 | 1051 |
| 1050 if __name__ == '__main__': | 1052 if __name__ == '__main__': |
| 1051 try: | 1053 try: |
| 1052 sys.exit(main(sys.argv)) | 1054 sys.exit(main(sys.argv)) |
| 1053 except KeyboardInterrupt: | 1055 except KeyboardInterrupt: |
| 1054 buildbot_common.ErrorExit('build_sdk: interrupted') | 1056 buildbot_common.ErrorExit('build_sdk: interrupted') |
| OLD | NEW |