Browse Source

Simplify "logic" for 'Urho3D_universal' custom target.
For Travis CI - adjust heuristic rule for cutting of iOS universal binary build.
For Travis CI - clean up the Android SDK before performing the packaging for Android build.

(Test quotation marks escape in commit message)
[ci only: Android, OSX] [skip appveyor] [ci package]

Yao Wei Tjong 姚伟忠 10 years ago
parent
commit
2d39e2823e
3 changed files with 4 additions and 4 deletions
  1. 1 1
      .bash_helpers.sh
  2. 2 2
      Rakefile
  3. 1 1
      Source/Urho3D/CMakeLists.txt

+ 1 - 1
.bash_helpers.sh

@@ -98,7 +98,7 @@ post_cmake() {
     elif [ -e "$BUILD"/*.xcodeproj/project.pbxproj ] && perl -v >/dev/null 2>&1; then
     elif [ -e "$BUILD"/*.xcodeproj/project.pbxproj ] && perl -v >/dev/null 2>&1; then
         echo -- post_cmake: Fix generated Xcode project
         echo -- post_cmake: Fix generated Xcode project
         # Temporary workaround to fix file references being added into multiple groups warnings (CMake bug http://www.cmake.org/Bug/view.php?id=15272, stil exists in 3.1)
         # Temporary workaround to fix file references being added into multiple groups warnings (CMake bug http://www.cmake.org/Bug/view.php?id=15272, stil exists in 3.1)
-        perl -i -pe 'BEGIN {$/=undef} s/(Begin PBXGroup section.*?,).*?,/\1/s' "$BUILD"/*.xcodeproj/project.pbxproj
+        perl -i -pe 'BEGIN {$/=undef} s/(Begin PBXGroup section.*?\/\* Sources \*\/,).*?,/\1/s' "$BUILD"/*.xcodeproj/project.pbxproj
         # Set Xcode build settings to skip dSYM file generation for Debug configuration (other configurations still use the default dwarf-with-dsym)
         # Set Xcode build settings to skip dSYM file generation for Debug configuration (other configurations still use the default dwarf-with-dsym)
         if [ $IOS ]; then
         if [ $IOS ]; then
             perl -i -pe 'BEGIN {$/=undef} s/(Begin XCBuildConfiguration.*?Debug.*?Settings = {\n)/\1DEBUG_INFORMATION_FORMAT = dwarf;\n/s' "$BUILD"/*.xcodeproj/project.pbxproj
             perl -i -pe 'BEGIN {$/=undef} s/(Begin XCBuildConfiguration.*?Debug.*?Settings = {\n)/\1DEBUG_INFORMATION_FORMAT = dwarf;\n/s' "$BUILD"/*.xcodeproj/project.pbxproj

+ 2 - 2
Rakefile

@@ -406,7 +406,7 @@ task :ci_package_upload do
       elapsed_time = (Time.now - Time.at(ENV['CI_START_TIME'].to_i)) / 60
       elapsed_time = (Time.now - Time.at(ENV['CI_START_TIME'].to_i)) / 60
       puts "\niOS checkpoint reached, elapsed time: #{elapsed_time}\n\n"
       puts "\niOS checkpoint reached, elapsed time: #{elapsed_time}\n\n"
     end
     end
-    if !ENV['CI_START_TIME'] || elapsed_time < 25 # minutes
+    if !ENV['CI_START_TIME'] || elapsed_time < 20 # minutes
       # Build Mach-O universal binary consisting of iphoneos (universal ARM archs including 'arm64' if 64-bit is enabled) and iphonesimulator (i386 arch and also x86_64 arch if 64-bit is enabled)
       # Build Mach-O universal binary consisting of iphoneos (universal ARM archs including 'arm64' if 64-bit is enabled) and iphonesimulator (i386 arch and also x86_64 arch if 64-bit is enabled)
       system 'echo Rebuilding Urho3D library as Mach-O universal binary...'
       system 'echo Rebuilding Urho3D library as Mach-O universal binary...'
       xcode_build(0, '../Build/Urho3D.xcodeproj', 'Urho3D_universal') or abort 'Failed to build Mach-O universal binary'
       xcode_build(0, '../Build/Urho3D.xcodeproj', 'Urho3D_universal') or abort 'Failed to build Mach-O universal binary'
@@ -420,7 +420,7 @@ task :ci_package_upload do
       if !ENV['NO_SDK_SYSIMG']
       if !ENV['NO_SDK_SYSIMG']
         system "cd ../Build && android update project -p . -t $(android list target |grep android-$API |cut -d ' ' -f2) && ant debug" or abort 'Failed to make Urho3D Samples APK'
         system "cd ../Build && android update project -p . -t $(android list target |grep android-$API |cut -d ' ' -f2) && ant debug" or abort 'Failed to make Urho3D Samples APK'
       end
       end
-      system 'rm -rf ../Build/generated ~/usr/local' if ENV['TRAVIS']   # Clean up some disk space before packaging on Travis CI
+      system 'rm -rf ../Build/generated ~/usr/local $(dirname $(which android))/..' if ENV['TRAVIS']   # Clean up some disk space before packaging on Travis CI
     end
     end
     if ENV['URHO3D_USE_LIB64_RPM']
     if ENV['URHO3D_USE_LIB64_RPM']
       system "cd ../Build && cmake . -DURHO3D_USE_LIB64_RPM=#{ENV['URHO3D_USE_LIB64_RPM']}" or abort 'Failed to reconfigure to generate 64-bit RPM package'
       system "cd ../Build && cmake . -DURHO3D_USE_LIB64_RPM=#{ENV['URHO3D_USE_LIB64_RPM']}" or abort 'Failed to reconfigure to generate 64-bit RPM package'

+ 1 - 1
Source/Urho3D/CMakeLists.txt

@@ -265,7 +265,7 @@ if (APPLE)
         setup_ios_linker_flags (LINKER_FLAGS)
         setup_ios_linker_flags (LINKER_FLAGS)
         # Add a custom target to build Mach-O universal binary consisting of iphoneos (universal ARM archs including 'arm64' if 64-bit is enabled) and iphonesimulator (i386 arch and also x86_64 arch if 64-bit is enabled)
         # Add a custom target to build Mach-O universal binary consisting of iphoneos (universal ARM archs including 'arm64' if 64-bit is enabled) and iphonesimulator (i386 arch and also x86_64 arch if 64-bit is enabled)
         add_custom_target (${TARGET_NAME}_universal
         add_custom_target (${TARGET_NAME}_universal
-            COMMAND if lipo -info $<TARGET_FILE:${TARGET_NAME}> 2>/dev/null |grep -cq 'i386.*armv7'\; then echo $<TARGET_FILE:${TARGET_NAME}> is already a Mach-O universal binary consisting of both iphoneos and iphonesimulator archs\; else if lipo -info $<TARGET_FILE:${TARGET_NAME}> 2>/dev/null |grep -cq i386\; then mv $<TARGET_FILE:${TARGET_NAME}>{,.iphonesimulator}\; fi && if lipo -info $<TARGET_FILE:${TARGET_NAME}> 2>/dev/null |grep -cq armv7\; then mv $<TARGET_FILE:${TARGET_NAME}>{,.iphoneos}\; fi && if [ ! -e $<TARGET_FILE:${TARGET_NAME}>.iphonesimulator ]\; then xcodebuild -target ${TARGET_NAME} -configuration $(CONFIGURATION) -sdk iphonesimulator 2>&1 && mv $<TARGET_FILE:${TARGET_NAME}>{,.iphonesimulator}\; fi && if [ ! -e $<TARGET_FILE:${TARGET_NAME}>.iphoneos ]\; then xcodebuild -target ${TARGET_NAME} -configuration $(CONFIGURATION) -sdk iphoneos 2>&1 && mv $<TARGET_FILE:${TARGET_NAME}>{,.iphoneos}\; fi && lipo -create -output $<TARGET_FILE:${TARGET_NAME}>{,.iphonesimulator,.iphoneos} && rm $<TARGET_FILE:${TARGET_NAME}>{.iphonesimulator,.iphoneos}\; fi
+            COMMAND if lipo -info $<TARGET_FILE:${TARGET_NAME}> 2>/dev/null |grep -cq 'i386.*armv7'\; then echo $<TARGET_FILE:${TARGET_NAME}> is already a Mach-O universal binary consisting of both iphoneos and iphonesimulator archs\; else mv $<TARGET_FILE:${TARGET_NAME}>{,.ori} && if lipo -info $<TARGET_FILE:${TARGET_NAME}> 2>/dev/null |grep -cq i386\; then sdk=iphoneos\; else sdk=iphonesimulator\; fi && xcodebuild -target ${TARGET_NAME} -configuration $(CONFIGURATION) -sdk $sdk 2>&1 && mv $<TARGET_FILE:${TARGET_NAME}>{,.new} && lipo -create -output $<TARGET_FILE:${TARGET_NAME}>{,.ori,.new} && rm $<TARGET_FILE:${TARGET_NAME}>{.ori,.new}\; fi
             WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
             WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
             COMMENT "Creating Mach-O universal binary library consisting of both iphoneos and iphonesimulator archs")
             COMMENT "Creating Mach-O universal binary library consisting of both iphoneos and iphonesimulator archs")
     else ()
     else ()