Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions tools/appveyor-scripts/before-build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,11 @@ Download-Deps

& python -m pip install retry

If ($env:build_type -eq "windows32") {
& $python -u .\tools\appveyor-scripts\setup_android.py --ndk_only
Generate-Binding-Codes
} elseif ($env:build_type -like "android*") {
# need to generate binding codes for all targets
& $python -u .\tools\appveyor-scripts\setup_android.py --ndk_only
Generate-Binding-Codes

If ($env:build_type -like "android*") {
& choco install ninja
& ninja --version
& $python -u .\tools\appveyor-scripts\setup_android.py
Expand Down
1 change: 1 addition & 0 deletions tools/travis-scripts/before-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ fi
if [ "$BUILD_TARGET" == "linux_cocos_new_test" ]; then
download_deps
install_linux_environment
python $COCOS2DX_ROOT/tools/appveyor-scripts/setup_android.py --ndk_only
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why travis invoke appveyor related script?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's a pure python script to setup android environment

exit 0
fi

Expand Down
28 changes: 14 additions & 14 deletions tools/travis-scripts/run-script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -285,11 +285,6 @@ function generate_pull_request_for_binding_codes_and_cocosfiles()

function run_pull_request()
{
echo "Building pull request ..."

# need to generate binding codes for all targets
genernate_binding_codes

# linux
if [ $BUILD_TARGET == 'linux' ]; then
build_linux
Expand Down Expand Up @@ -327,6 +322,14 @@ function run_pull_request()
if [ $BUILD_TARGET == 'ios' ]; then
build_ios
fi

if [ $BUILD_TARGET == 'mac_cmake' ]; then
build_mac_cmake
fi

if [ $BUILD_TARGET == 'ios_cmake' ]; then
build_ios_cmake
fi
}

function run_after_merge()
Expand Down Expand Up @@ -356,6 +359,12 @@ function run_after_merge()

# build pull request
if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then

echo "Building pull request ..."

# need to generate binding codes for all targets
genernate_binding_codes

if [ "$BUILD_TARGET" == "android_cocos_new_test" ]; then
source ../environment.sh
pushd $COCOS2DX_ROOT
Expand All @@ -382,15 +391,6 @@ if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
cmake --build .
exit 0
fi
if [ $BUILD_TARGET == 'mac_cmake' ]; then
build_mac_cmake
exit 0
fi

if [ $BUILD_TARGET == 'ios_cmake' ]; then
build_ios_cmake
exit 0
fi

run_pull_request
fi
Expand Down