mirror of https://github.com/axmolengine/axmol.git
Merge pull request #4040 from dumganhar/travis-update
Updating travic-ci scripts.
This commit is contained in:
commit
afeb38be51
|
@ -102,8 +102,8 @@ elif [ "$PLATFORM"x = "linux"x ]; then
|
|||
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.6 60 --slave /usr/bin/g++ g++ /usr/bin/g++-4.6
|
||||
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.7 90 --slave /usr/bin/g++ g++ /usr/bin/g++-4.7
|
||||
g++ --version
|
||||
bash $COCOS2DX_ROOT/install-deps-linux.sh
|
||||
bash $DIR/install_glfw.sh
|
||||
bash $COCOS2DX_ROOT/build/install-deps-linux.sh
|
||||
bash $COCOS2DX_ROOT/build/install_glfw.sh
|
||||
install_android_ndk
|
||||
install_llvm
|
||||
elif [ "$PLATFORM"x = "nacl"x ]; then
|
||||
|
|
|
@ -20,7 +20,7 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|||
COCOS2DX_ROOT="$DIR"/../..
|
||||
TOJS_ROOT=$COCOS2DX_ROOT/tools/tojs
|
||||
TOLUA_ROOT=$COCOS2DX_ROOT/tools/tolua
|
||||
GENERATED_WORKTREE="$COCOS2DX_ROOT"/scripting/auto-generated
|
||||
GENERATED_WORKTREE="$COCOS2DX_ROOT"/cocos/scripting/auto-generated
|
||||
COMMITTAG="[AUTO]"
|
||||
|
||||
# Exit on error
|
||||
|
@ -75,10 +75,10 @@ echo "Set git user for the submodule of ${GENERATED_WORKTREE}"
|
|||
git config user.email ${GH_EMAIL}
|
||||
git config user.name ${GH_USER}
|
||||
#Set remotes
|
||||
git remote add upstream https://${GH_USER}:${GH_PASSWORD}@github.com/folecr/cocos2dx-autogen-bindings.git 2> /dev/null > /dev/null
|
||||
git remote add upstream https://${GH_USER}:${GH_PASSWORD}@github.com/cocos2d-x/bindings-auto-generated.git 2> /dev/null > /dev/null
|
||||
|
||||
echo "Delete all directories and files except '.git' and 'README'."
|
||||
ls -a | grep -E -v ^\[.\]\{1,2\}$ | grep -E -v ^\.git$ | grep -E -v ^README$ | xargs -I{} rm -rf {}
|
||||
echo "Delete all directories and files except '.git' and 'README.md'."
|
||||
ls -a | grep -E -v ^\[.\]\{1,2\}$ | grep -E -v ^\.git$ | grep -E -v ^README\.md$ | xargs -I{} rm -rf {}
|
||||
echo "Show files in ${GENERATED_WORKTREE} folder."
|
||||
ls -a
|
||||
popd
|
||||
|
|
|
@ -5,15 +5,6 @@ set -e
|
|||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
COCOS2DX_ROOT="$DIR"/../..
|
||||
|
||||
build_android()
|
||||
{
|
||||
echo "Current dir: `pwd`"
|
||||
pushd $1/proj.android
|
||||
ln -s $COCOS2DX_ROOT/android_build_objs obj
|
||||
./build_native.sh
|
||||
popd
|
||||
}
|
||||
|
||||
if [ "$GEN_JSB"x = "YES"x ]; then
|
||||
# Re-generation of the javascript bindings can perform push of the new
|
||||
# version back to github. We don't do this for pull requests, or if
|
||||
|
@ -51,23 +42,15 @@ elif [ "$PLATFORM"x = "android"x ]; then
|
|||
# Create a directory for temporary objects
|
||||
mkdir android_build_objs
|
||||
|
||||
# Build samples
|
||||
echo "Building samples ..."
|
||||
cd $COCOS2DX_ROOT/samples/Cpp
|
||||
build_android HelloCpp
|
||||
build_android TestCpp
|
||||
build_android AssetsManagerTest
|
||||
PROJECTS=("Cpp/HelloCpp" "Cpp/TestCpp" "Cpp/AssetsManagerTest" "Javascript/TestJavascript" "Javascript/CocosDragonJS" "Javascript/CrystalCraze" "Javascript/MoonWarriors" "Javascript/WatermelonWithMe" "Lua/HelloLua" "Lua/TestLua")
|
||||
for i in ${PROJECTS[*]}; do
|
||||
ln -s $COCOS2DX_ROOT/android_build_objs $COCOS2DX_ROOT/samples/$i/proj.android/obj
|
||||
done
|
||||
|
||||
cd $COCOS2DX_ROOT/samples/Javascript
|
||||
build_android TestJavascript
|
||||
build_android CocosDragonJS
|
||||
build_android CrystalCraze
|
||||
build_android MoonWarriors
|
||||
build_android WatermelonWithMe
|
||||
|
||||
cd $COCOS2DX_ROOT/samples/Lua
|
||||
build_android HelloLua
|
||||
build_android TestLua
|
||||
# Build all samples
|
||||
echo "Building all samples ..."
|
||||
cd $COCOS2DX_ROOT/build
|
||||
./android-build.py all
|
||||
|
||||
# Build template
|
||||
# echo "Building template ..."
|
||||
|
@ -80,7 +63,7 @@ elif [ "$PLATFORM"x = "nacl"x ]; then
|
|||
export NACL_SDK_ROOT=$HOME/bin/nacl_sdk/pepper_canary
|
||||
export PATH=$PATH:$NACL_SDK_ROOT/toolchain/linux_x86_newlib/bin
|
||||
export PATH=$PATH:$NACL_SDK_ROOT/toolchain/linux_arm_newlib/bin
|
||||
cd $COCOS2DX_ROOT
|
||||
cd $COCOS2DX_ROOT/build
|
||||
make -j4
|
||||
elif [ "$PLATFORM"x = "linux"x ]; then
|
||||
# Generate binding glue codes
|
||||
|
@ -88,7 +71,7 @@ elif [ "$PLATFORM"x = "linux"x ]; then
|
|||
cd $COCOS2DX_ROOT/tools/travis-scripts
|
||||
./generate-jsbindings.sh
|
||||
|
||||
cd $COCOS2DX_ROOT
|
||||
cd $COCOS2DX_ROOT/build
|
||||
make -j4
|
||||
elif [ "$PLATFORM"x = "emscripten"x ]; then
|
||||
# Generate binding glue codes
|
||||
|
@ -96,7 +79,7 @@ elif [ "$PLATFORM"x = "emscripten"x ]; then
|
|||
cd $COCOS2DX_ROOT/tools/travis-scripts
|
||||
./generate-jsbindings.sh
|
||||
|
||||
cd $COCOS2DX_ROOT
|
||||
cd $COCOS2DX_ROOT/build
|
||||
export PYTHON=/usr/bin/python
|
||||
export LLVM=$HOME/bin/clang+llvm-3.2/bin
|
||||
export LLVM_ROOT=$LLVM
|
||||
|
|
Loading…
Reference in New Issue