Skip to content

Commit d9a3493

Browse files
drelaptopminggo
authored andcommitted
need to generate binding codes for all targets (#19424)
* need to generate binding codes for all targets * all targets depend on ndk, for gen bindings * fix lack python module
1 parent fa3ab72 commit d9a3493

File tree

3 files changed

+22
-18
lines changed

3 files changed

+22
-18
lines changed

tools/appveyor-scripts/before-build.ps1

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,11 @@ Download-Deps
4040

4141
& python -m pip install retry
4242

43-
If ($env:build_type -eq "windows32") {
44-
& $python -u .\tools\appveyor-scripts\setup_android.py --ndk_only
45-
Generate-Binding-Codes
46-
} elseif ($env:build_type -like "android*") {
43+
# need to generate binding codes for all targets
44+
& $python -u .\tools\appveyor-scripts\setup_android.py --ndk_only
45+
Generate-Binding-Codes
46+
47+
If ($env:build_type -like "android*") {
4748
& choco install ninja
4849
& ninja --version
4950
& $python -u .\tools\appveyor-scripts\setup_android.py

tools/travis-scripts/before-install.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,9 @@ fi
103103
if [ "$BUILD_TARGET" == "linux_cocos_new_test" ]; then
104104
download_deps
105105
install_linux_environment
106+
sudo python -m pip install retry
107+
# set android ndk environment by setup_android.py
108+
python $COCOS2DX_ROOT/tools/appveyor-scripts/setup_android.py --ndk_only
106109
exit 0
107110
fi
108111

tools/travis-scripts/run-script.sh

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -285,11 +285,6 @@ function generate_pull_request_for_binding_codes_and_cocosfiles()
285285

286286
function run_pull_request()
287287
{
288-
echo "Building pull request ..."
289-
290-
# need to generate binding codes for all targets
291-
genernate_binding_codes
292-
293288
# linux
294289
if [ $BUILD_TARGET == 'linux' ]; then
295290
build_linux
@@ -327,6 +322,14 @@ function run_pull_request()
327322
if [ $BUILD_TARGET == 'ios' ]; then
328323
build_ios
329324
fi
325+
326+
if [ $BUILD_TARGET == 'mac_cmake' ]; then
327+
build_mac_cmake
328+
fi
329+
330+
if [ $BUILD_TARGET == 'ios_cmake' ]; then
331+
build_ios_cmake
332+
fi
330333
}
331334

332335
function run_after_merge()
@@ -356,6 +359,12 @@ function run_after_merge()
356359

357360
# build pull request
358361
if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
362+
363+
echo "Building pull request ..."
364+
365+
# need to generate binding codes for all targets
366+
genernate_binding_codes
367+
359368
if [ "$BUILD_TARGET" == "android_cocos_new_test" ]; then
360369
source ../environment.sh
361370
pushd $COCOS2DX_ROOT
@@ -382,15 +391,6 @@ if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
382391
cmake --build .
383392
exit 0
384393
fi
385-
if [ $BUILD_TARGET == 'mac_cmake' ]; then
386-
build_mac_cmake
387-
exit 0
388-
fi
389-
390-
if [ $BUILD_TARGET == 'ios_cmake' ]; then
391-
build_ios_cmake
392-
exit 0
393-
fi
394394

395395
run_pull_request
396396
fi

0 commit comments

Comments
 (0)