mirror of https://github.com/axmolengine/axmol.git
add JSB to jenkins
This commit is contained in:
parent
a6a5318e13
commit
c7d698362f
|
@ -58,8 +58,8 @@ endif()
|
||||||
set(BUILD_CPP_TESTS_DEFAULT ON)
|
set(BUILD_CPP_TESTS_DEFAULT ON)
|
||||||
set(BUILD_LUA_LIBS_DEFAULT ON)
|
set(BUILD_LUA_LIBS_DEFAULT ON)
|
||||||
set(BUILD_LUA_TESTS_DEFAULT ON)
|
set(BUILD_LUA_TESTS_DEFAULT ON)
|
||||||
set(BUILD_JS_LIBS_DEFAULT OFF)
|
set(BUILD_JS_LIBS_DEFAULT ON)
|
||||||
set(BUILD_JS_TESTS_DEFAULT OFF)
|
set(BUILD_JS_TESTS_DEFAULT ON)
|
||||||
# TODO: fix test samples for MSVC
|
# TODO: fix test samples for MSVC
|
||||||
if(MSVC)
|
if(MSVC)
|
||||||
set(BUILD_CPP_TESTS_DEFAULT OFF)
|
set(BUILD_CPP_TESTS_DEFAULT OFF)
|
||||||
|
|
|
@ -4,12 +4,12 @@
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
import os, os.path
|
import os, os.path
|
||||||
import shutil
|
|
||||||
from optparse import OptionParser
|
from optparse import OptionParser
|
||||||
|
|
||||||
CPP_SAMPLES = ['cpp-empty-test', 'cpp-tests', 'game-controller-test']
|
CPP_SAMPLES = ['cpp-empty-test', 'cpp-tests', 'game-controller-test']
|
||||||
LUA_SAMPLES = ['lua-empty-test', 'lua-tests', 'lua-game-controller-test']
|
LUA_SAMPLES = ['lua-empty-test', 'lua-tests', 'lua-game-controller-test']
|
||||||
ALL_SAMPLES = CPP_SAMPLES + LUA_SAMPLES
|
JS_SAMPLES = ['js-tests']
|
||||||
|
ALL_SAMPLES = CPP_SAMPLES + LUA_SAMPLES + JS_SAMPLES
|
||||||
|
|
||||||
def caculate_built_samples(args):
|
def caculate_built_samples(args):
|
||||||
''' Compute the sampels to be built
|
''' Compute the sampels to be built
|
||||||
|
@ -27,6 +27,9 @@ def caculate_built_samples(args):
|
||||||
if 'lua' in args:
|
if 'lua' in args:
|
||||||
targets += LUA_SAMPLES
|
targets += LUA_SAMPLES
|
||||||
args.remove('lua')
|
args.remove('lua')
|
||||||
|
if 'js' in args:
|
||||||
|
targets += JS_SAMPLES
|
||||||
|
args.remove('js')
|
||||||
|
|
||||||
targets += args
|
targets += args
|
||||||
|
|
||||||
|
@ -60,7 +63,8 @@ def build_samples(target, build_mode):
|
||||||
"cpp-tests": "tests/cpp-tests",
|
"cpp-tests": "tests/cpp-tests",
|
||||||
"lua-empty-test": "tests/lua-empty-test",
|
"lua-empty-test": "tests/lua-empty-test",
|
||||||
"lua-tests": "tests/lua-tests",
|
"lua-tests": "tests/lua-tests",
|
||||||
"lua-game-controller-test": "tests/lua-game-controller-test"
|
"lua-game-controller-test": "tests/lua-game-controller-test",
|
||||||
|
"js-tests": "tests/js-tests"
|
||||||
}
|
}
|
||||||
|
|
||||||
cocos_root = os.path.join(os.path.dirname(os.path.realpath(__file__)), "..")
|
cocos_root = os.path.join(os.path.dirname(os.path.realpath(__file__)), "..")
|
||||||
|
@ -81,7 +85,7 @@ if __name__ == '__main__':
|
||||||
usage = """
|
usage = """
|
||||||
This script is mainy used for building tests built-in with cocos2d-x.
|
This script is mainy used for building tests built-in with cocos2d-x.
|
||||||
|
|
||||||
Usage: %prog [options] [cpp-empty-test|cpp-tests|lua-empty-test|lua-tests|cpp|lua|all]
|
Usage: %prog [options] [cpp-empty-test|cpp-tests|lua-empty-test|lua-tests|js-tests|cpp|lua|all]
|
||||||
|
|
||||||
If you are new to cocos2d-x, I recommend you start with cpp-empty-test, lua-empty-test.
|
If you are new to cocos2d-x, I recommend you start with cpp-empty-test, lua-empty-test.
|
||||||
|
|
||||||
|
@ -97,7 +101,9 @@ if __name__ == '__main__':
|
||||||
parser.add_option("-p", "--platform", dest="android_platform",
|
parser.add_option("-p", "--platform", dest="android_platform",
|
||||||
help='This parameter is not used any more, just keep compatible.')
|
help='This parameter is not used any more, just keep compatible.')
|
||||||
parser.add_option("-b", "--build", dest="build_mode",
|
parser.add_option("-b", "--build", dest="build_mode",
|
||||||
help='The build mode for java project,debug[default] or release. Get more information,please refer to http://developer.android.com/tools/building/building-cmdline.html')
|
help='The build mode for java project,debug[default] or release. \
|
||||||
|
Get more information, \
|
||||||
|
please refer to http://developer.android.com/tools/building/building-cmdline.html')
|
||||||
(opts, args) = parser.parse_args()
|
(opts, args) = parser.parse_args()
|
||||||
|
|
||||||
if len(args) == 0:
|
if len(args) == 0:
|
||||||
|
|
|
@ -48,10 +48,13 @@ def do_build_slaves():
|
||||||
js_tests_build_scripts = jenkins_script_path + "win32-js-build.bat"
|
js_tests_build_scripts = jenkins_script_path + "win32-js-build.bat"
|
||||||
elif(node_name == 'windows-universal' or node_name == 'windows-universal_bak'):
|
elif(node_name == 'windows-universal' or node_name == 'windows-universal_bak'):
|
||||||
slave_build_scripts = jenkins_script_path + "windows-universal.bat"
|
slave_build_scripts = jenkins_script_path + "windows-universal.bat"
|
||||||
|
js_tests_build_scripts = jenkins_script_path + "windows-js-universal.bat"
|
||||||
elif(node_name == 'ios_mac' or node_name == 'ios' or node_name == 'ios_bak'):
|
elif(node_name == 'ios_mac' or node_name == 'ios' or node_name == 'ios_bak'):
|
||||||
slave_build_scripts = jenkins_script_path + "ios-build.sh"
|
slave_build_scripts = jenkins_script_path + "ios-build.sh"
|
||||||
|
js_tests_build_scripts = jenkins_script_path + "ios-js-build.sh"
|
||||||
elif(node_name == 'mac' or node_name == 'mac_bak'):
|
elif(node_name == 'mac' or node_name == 'mac_bak'):
|
||||||
slave_build_scripts = jenkins_script_path + "mac-build.sh"
|
slave_build_scripts = jenkins_script_path + "mac-build.sh"
|
||||||
|
js_tests_build_scripts = jenkins_script_path + "mac-js-build.sh"
|
||||||
elif(node_name == 'linux_centos' or node_name == 'linux' or node_name == 'linux_bak'):
|
elif(node_name == 'linux_centos' or node_name == 'linux' or node_name == 'linux_bak'):
|
||||||
slave_build_scripts = jenkins_script_path + "linux-build.sh"
|
slave_build_scripts = jenkins_script_path + "linux-build.sh"
|
||||||
elif(node_name == 'wp8'):
|
elif(node_name == 'wp8'):
|
||||||
|
|
|
@ -2,4 +2,4 @@
|
||||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
COCOS2DX_ROOT="$DIR"/../../..
|
COCOS2DX_ROOT="$DIR"/../../..
|
||||||
cd ${COCOS2DX_ROOT}
|
cd ${COCOS2DX_ROOT}
|
||||||
python build/android-build.py -p 10 cpp-tests lua-tests
|
python build/android-build.py -p 10 cpp-tests lua-tests js-tests
|
||||||
|
|
|
@ -4,7 +4,7 @@ import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
ret = 0
|
ret = 0
|
||||||
genbindings_dirs = ['tolua']
|
genbindings_dirs = ['tolua', 'tojs']
|
||||||
for item in genbindings_dirs:
|
for item in genbindings_dirs:
|
||||||
os.chdir("tools/" + item)
|
os.chdir("tools/" + item)
|
||||||
ret = os.system('python genbindings.py')
|
ret = os.system('python genbindings.py')
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
#put xctool.sh into your PATH
|
||||||
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
|
COCOS2DX_ROOT="$DIR"/../../..
|
||||||
|
xcodebuild -project "$COCOS2DX_ROOT"/build/cocos2d_js_tests.xcodeproj -scheme "js-tests iOS" -destination "platform=iOS Simulator,name=iPhone Retina (4-inch)" clean | xcpretty
|
||||||
|
xcodebuild -project "$COCOS2DX_ROOT"/build/cocos2d_js_tests.xcodeproj -scheme "js-tests iOS" -destination "platform=iOS Simulator,name=iPhone Retina (4-inch)" build | xcpretty
|
||||||
|
#the following commands must not be removed
|
||||||
|
xcodebuild -project "$COCOS2DX_ROOT"/build/cocos2d_js_tests.xcodeproj -scheme "js-tests iOS" -destination "platform=iOS Simulator,name=iPhone Retina (4-inch)" build
|
|
@ -0,0 +1,22 @@
|
||||||
|
#put xctool.sh into your PATH
|
||||||
|
|
||||||
|
#######
|
||||||
|
# Cmake build
|
||||||
|
#######
|
||||||
|
# DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
|
# COCOS2DX_ROOT="$DIR"/../../..
|
||||||
|
# cd ${COCOS2DX_ROOT}
|
||||||
|
# mkdir mac-build
|
||||||
|
# cd mac-build
|
||||||
|
# cmake ..
|
||||||
|
# make -j4
|
||||||
|
|
||||||
|
#######
|
||||||
|
# xcode build
|
||||||
|
#######
|
||||||
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
|
COCOS2DX_ROOT="$DIR"/../../..
|
||||||
|
xcodebuild -project "$COCOS2DX_ROOT"/build/cocos2d_js_tests.xcodeproj -scheme "js-tests Mac" clean | xcpretty
|
||||||
|
xcodebuild -project "$COCOS2DX_ROOT"/build/cocos2d_js_tests.xcodeproj -scheme "js-tests Mac" build | xcpretty
|
||||||
|
#xcpretty has a bug, some xcodebuid fails return value would be treated as 0.
|
||||||
|
xcodebuild -project "$COCOS2DX_ROOT"/build/cocos2d_js_tests.xcodeproj -scheme "js-tests Mac" build
|
|
@ -0,0 +1,2 @@
|
||||||
|
call "%VS120COMNTOOLS%vsvars32.bat"
|
||||||
|
msbuild build\cocos2d-js-win8.1-universal.sln /t:Build /p:Platform="Win32" /p:Configuration="Release" /m
|
Loading…
Reference in New Issue