forked from nodejs/node
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a22de4f
commit 4ec189b
Showing
16 changed files
with
1,785 additions
and
119 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,6 +23,8 @@ | |
TRUNK_DIR = os.path.dirname(BUILDBOT_DIR) | ||
ROOT_DIR = os.path.dirname(TRUNK_DIR) | ||
ANDROID_DIR = os.path.join(ROOT_DIR, 'android') | ||
CMAKE_DIR = os.path.join(ROOT_DIR, 'cmake') | ||
CMAKE_BIN_DIR = os.path.join(CMAKE_DIR, 'bin') | ||
OUT_DIR = os.path.join(TRUNK_DIR, 'out') | ||
|
||
|
||
|
@@ -34,6 +36,43 @@ def CallSubProcess(*args, **kwargs): | |
sys.exit(1) | ||
|
||
|
||
def PrepareCmake(): | ||
"""Build CMake 2.8.8 since the version in Precise is 2.8.7.""" | ||
if os.environ['BUILDBOT_CLOBBER'] == '1': | ||
print '@@@BUILD_STEP Clobber CMake checkout@@@' | ||
shutil.rmtree(CMAKE_DIR) | ||
|
||
# We always build CMake 2.8.8, so no need to do anything | ||
# if the directory already exists. | ||
if os.path.isdir(CMAKE_DIR): | ||
return | ||
|
||
print '@@@BUILD_STEP Initialize CMake checkout@@@' | ||
os.mkdir(CMAKE_DIR) | ||
CallSubProcess(['git', 'config', '--global', 'user.name', 'trybot']) | ||
CallSubProcess(['git', 'config', '--global', | ||
'user.email', '[email protected]']) | ||
CallSubProcess(['git', 'config', '--global', 'color.ui', 'false']) | ||
|
||
print '@@@BUILD_STEP Sync CMake@@@' | ||
CallSubProcess( | ||
['git', 'clone', | ||
'--depth', '1', | ||
'--single-branch', | ||
'--branch', 'v2.8.8', | ||
'--', | ||
'git://cmake.org/cmake.git', | ||
CMAKE_DIR], | ||
cwd=CMAKE_DIR) | ||
|
||
print '@@@BUILD_STEP Build CMake@@@' | ||
CallSubProcess( | ||
['/bin/bash', 'bootstrap', '--prefix=%s' % CMAKE_DIR], | ||
cwd=CMAKE_DIR) | ||
|
||
CallSubProcess( ['make', 'cmake'], cwd=CMAKE_DIR) | ||
|
||
|
||
def PrepareAndroidTree(): | ||
"""Prepare an Android tree to run 'android' format tests.""" | ||
if os.environ['BUILDBOT_CLOBBER'] == '1': | ||
|
@@ -91,6 +130,7 @@ def GypTestFormat(title, format=None, msvs_version=None): | |
'--all', | ||
'--passed', | ||
'--format', format, | ||
'--path', CMAKE_BIN_DIR, | ||
'--chdir', 'trunk']) | ||
if format == 'android': | ||
# gyptest needs the environment setup from envsetup/lunch in order to build | ||
|
@@ -124,6 +164,8 @@ def GypBuild(): | |
elif sys.platform.startswith('linux'): | ||
retcode += GypTestFormat('ninja') | ||
retcode += GypTestFormat('make') | ||
PrepareCmake() | ||
retcode += GypTestFormat('cmake') | ||
elif sys.platform == 'darwin': | ||
retcode += GypTestFormat('ninja') | ||
retcode += GypTestFormat('xcode') | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.