|
@@ -81,7 +81,8 @@ task :ci do
|
|
|
$testing = (ENV['LINUX'] && !ENV['URHO3D_64BIT']) || (ENV['OSX'] && ENV['IOS'].to_i != 1) ? 1 : 0
|
|
$testing = (ENV['LINUX'] && !ENV['URHO3D_64BIT']) || (ENV['OSX'] && ENV['IOS'].to_i != 1) ? 1 : 0
|
|
|
end
|
|
end
|
|
|
# Define the build option string only when the override environment variable is given
|
|
# Define the build option string only when the override environment variable is given
|
|
|
- $urho3d_64bit = "-DURHO3D_64BIT=#{ENV['URHO3D_64BIT']}" if ENV['URHO3D_64BIT']
|
|
|
|
|
|
|
+ $build_options = "-DURHO3D_64BIT=#{ENV['URHO3D_64BIT']}" if ENV['URHO3D_64BIT']
|
|
|
|
|
+ $build_options = " -DURHO3D_OPENGL=#{ENV['URHO3D_OPENGL']}" if ENV['URHO3D_OPENGL']
|
|
|
if ENV['XCODE']
|
|
if ENV['XCODE']
|
|
|
# xctool or xcodebuild
|
|
# xctool or xcodebuild
|
|
|
xcode_ci
|
|
xcode_ci
|
|
@@ -277,14 +278,14 @@ def makefile_ci
|
|
|
jit = ''
|
|
jit = ''
|
|
|
amalg = ''
|
|
amalg = ''
|
|
|
# Lua on MinGW build requires tolua++ tool to be built natively first
|
|
# Lua on MinGW build requires tolua++ tool to be built natively first
|
|
|
- system "MINGW_PREFIX= ./cmake_gcc.sh -DURHO3D_LIB_TYPE=$URHO3D_LIB_TYPE #{$urho3d_64bit} -DURHO3D_LUA=1 -DURHO3D_TOOLS=0" or abort 'Failed to configure native build for tolua++ target'
|
|
|
|
|
|
|
+ system "MINGW_PREFIX= ./cmake_gcc.sh -DURHO3D_LIB_TYPE=$URHO3D_LIB_TYPE #{$build_options} -DURHO3D_LUA=1 -DURHO3D_TOOLS=0" or abort 'Failed to configure native build for tolua++ target'
|
|
|
system "cd Build/ThirdParty/toluapp/src/bin && make -j$NUMJOBS" or abort 'Failed to build tolua++ tool'
|
|
system "cd Build/ThirdParty/toluapp/src/bin && make -j$NUMJOBS" or abort 'Failed to build tolua++ tool'
|
|
|
ENV['SKIP_NATIVE'] = '1'
|
|
ENV['SKIP_NATIVE'] = '1'
|
|
|
else
|
|
else
|
|
|
jit = 'JIT'
|
|
jit = 'JIT'
|
|
|
amalg = '-DURHO3D_LUAJIT_AMALG=1'
|
|
amalg = '-DURHO3D_LUAJIT_AMALG=1'
|
|
|
end
|
|
end
|
|
|
- system "./cmake_gcc.sh -DURHO3D_LIB_TYPE=$URHO3D_LIB_TYPE #{$urho3d_64bit} -DURHO3D_LUA#{jit}=1 #{amalg} -DURHO3D_SAMPLES=1 -DURHO3D_TOOLS=1 -DURHO3D_EXTRAS=1 -DURHO3D_TESTING=#{$testing} -DCMAKE_BUILD_TYPE=#{$configuration}" or abort 'Failed to configure Urho3D library build'
|
|
|
|
|
|
|
+ system "./cmake_gcc.sh -DURHO3D_LIB_TYPE=$URHO3D_LIB_TYPE #{$build_options} -DURHO3D_LUA#{jit}=1 #{amalg} -DURHO3D_SAMPLES=1 -DURHO3D_TOOLS=1 -DURHO3D_EXTRAS=1 -DURHO3D_TESTING=#{$testing} -DCMAKE_BUILD_TYPE=#{$configuration}" or abort 'Failed to configure Urho3D library build'
|
|
|
if ENV['ANDROID']
|
|
if ENV['ANDROID']
|
|
|
# The AVD on Travis-CI does not have enough memory for STATIC lib installation, so only prepare device for SHARED lib test run
|
|
# The AVD on Travis-CI does not have enough memory for STATIC lib installation, so only prepare device for SHARED lib test run
|
|
|
android_test = !ENV['PACKAGE_UPLOAD'] && (ENV['URHO3D_LIB_TYPE'] == 'SHARED' || !ENV['CI'])
|
|
android_test = !ENV['PACKAGE_UPLOAD'] && (ENV['URHO3D_LIB_TYPE'] == 'SHARED' || !ENV['CI'])
|
|
@@ -319,7 +320,7 @@ def makefile_ci
|
|
|
system "cd #{platform_prefix}Build && make -j$NUMJOBS #{test}" or abort 'Failed to build or test Urho3D library'
|
|
system "cd #{platform_prefix}Build && make -j$NUMJOBS #{test}" or abort 'Failed to build or test Urho3D library'
|
|
|
# Create a new project on the fly that uses newly built Urho3D library
|
|
# Create a new project on the fly that uses newly built Urho3D library
|
|
|
scaffolding "#{platform_prefix}Build/generated/externallib"
|
|
scaffolding "#{platform_prefix}Build/generated/externallib"
|
|
|
- system "URHO3D_HOME=`pwd`; export URHO3D_HOME && cd #{platform_prefix}Build/generated/externallib && echo '\nUsing Urho3D as external library in external project' && ./cmake_gcc.sh #{$urho3d_64bit} -DURHO3D_LUA#{jit}=1 -DURHO3D_TESTING=#{$testing} -DCMAKE_BUILD_TYPE=#{$configuration} && cd #{platform_prefix}Build && make -j$NUMJOBS #{test}" or abort 'Failed to configure/build/test temporary project using Urho3D as external library'
|
|
|
|
|
|
|
+ system "URHO3D_HOME=`pwd`; export URHO3D_HOME && cd #{platform_prefix}Build/generated/externallib && echo '\nUsing Urho3D as external library in external project' && ./cmake_gcc.sh #{$build_options} -DURHO3D_LUA#{jit}=1 -DURHO3D_TESTING=#{$testing} -DCMAKE_BUILD_TYPE=#{$configuration} && cd #{platform_prefix}Build && make -j$NUMJOBS #{test}" or abort 'Failed to configure/build/test temporary project using Urho3D as external library'
|
|
|
# Make, deploy, and test run Android APK in an Android (virtual) device
|
|
# Make, deploy, and test run Android APK in an Android (virtual) device
|
|
|
if android_test
|
|
if android_test
|
|
|
system "cd #{platform_prefix}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 #{platform_prefix}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'
|
|
@@ -389,7 +390,7 @@ def xcode_ci
|
|
|
platform_prefix = 'ios-'
|
|
platform_prefix = 'ios-'
|
|
|
deployment_target = "-DIPHONEOS_DEPLOYMENT_TARGET=#{ENV['DEPLOYMENT_TARGET']}"
|
|
deployment_target = "-DIPHONEOS_DEPLOYMENT_TARGET=#{ENV['DEPLOYMENT_TARGET']}"
|
|
|
# Lua on IOS build requires tolua++ tool to be built natively first
|
|
# Lua on IOS build requires tolua++ tool to be built natively first
|
|
|
- system "./cmake_macosx.sh -DURHO3D_LIB_TYPE=$URHO3D_LIB_TYPE #{$urho3d_64bit} -DURHO3D_LUA=1 -DURHO3D_TOOLS=0" or abort 'Failed to configure native build for tolua++ target'
|
|
|
|
|
|
|
+ system "./cmake_macosx.sh -DURHO3D_LIB_TYPE=$URHO3D_LIB_TYPE #{$build_options} -DURHO3D_LUA=1 -DURHO3D_TOOLS=0" or abort 'Failed to configure native build for tolua++ target'
|
|
|
xcode_build(0, 'Build/Urho3D.xcodeproj', 'tolua++') or abort 'Failed to build tolua++ tool'
|
|
xcode_build(0, 'Build/Urho3D.xcodeproj', 'tolua++') or abort 'Failed to build tolua++ tool'
|
|
|
else
|
|
else
|
|
|
jit = 'JIT'
|
|
jit = 'JIT'
|
|
@@ -397,11 +398,11 @@ def xcode_ci
|
|
|
platform_prefix = ''
|
|
platform_prefix = ''
|
|
|
deployment_target = "-DCMAKE_OSX_DEPLOYMENT_TARGET=#{ENV['DEPLOYMENT_TARGET']}"
|
|
deployment_target = "-DCMAKE_OSX_DEPLOYMENT_TARGET=#{ENV['DEPLOYMENT_TARGET']}"
|
|
|
end
|
|
end
|
|
|
- system "./cmake_macosx.sh -DIOS=$IOS #{deployment_target} -DURHO3D_LIB_TYPE=$URHO3D_LIB_TYPE #{$urho3d_64bit} -DURHO3D_LUA#{jit}=1 #{amalg} -DURHO3D_SAMPLES=1 -DURHO3D_TOOLS=1 -DURHO3D_EXTRAS=1 -DURHO3D_TESTING=#{$testing}" or abort 'Failed to configure Urho3D library build'
|
|
|
|
|
|
|
+ system "./cmake_macosx.sh -DIOS=$IOS #{deployment_target} -DURHO3D_LIB_TYPE=$URHO3D_LIB_TYPE #{$build_options} -DURHO3D_LUA#{jit}=1 #{amalg} -DURHO3D_SAMPLES=1 -DURHO3D_TOOLS=1 -DURHO3D_EXTRAS=1 -DURHO3D_TESTING=#{$testing}" or abort 'Failed to configure Urho3D library build'
|
|
|
xcode_build(ENV['IOS'], "#{platform_prefix}Build/Urho3D.xcodeproj") or abort 'Failed to build or test Urho3D library'
|
|
xcode_build(ENV['IOS'], "#{platform_prefix}Build/Urho3D.xcodeproj") or abort 'Failed to build or test Urho3D library'
|
|
|
# Create a new project on the fly that uses newly built Urho3D library
|
|
# Create a new project on the fly that uses newly built Urho3D library
|
|
|
scaffolding "#{platform_prefix}Build/generated/externallib"
|
|
scaffolding "#{platform_prefix}Build/generated/externallib"
|
|
|
- system "URHO3D_HOME=`pwd`; export URHO3D_HOME && cd #{platform_prefix}Build/generated/externallib && echo '\nUsing Urho3D as external library in external project' && ./cmake_macosx.sh -DIOS=$IOS #{deployment_target} #{$urho3d_64bit} -DURHO3D_LUA#{jit}=1 -DURHO3D_TESTING=#{$testing}" or abort 'Failed to configure temporary project using Urho3D as external library'
|
|
|
|
|
|
|
+ system "URHO3D_HOME=`pwd`; export URHO3D_HOME && cd #{platform_prefix}Build/generated/externallib && echo '\nUsing Urho3D as external library in external project' && ./cmake_macosx.sh -DIOS=$IOS #{deployment_target} #{$build_options} -DURHO3D_LUA#{jit}=1 -DURHO3D_TESTING=#{$testing}" or abort 'Failed to configure temporary project using Urho3D as external library'
|
|
|
xcode_build(ENV['IOS'], "#{platform_prefix}Build/generated/externallib/#{platform_prefix}Build/Scaffolding.xcodeproj") or abort 'Failed to configure/build/test temporary project using Urho3D as external library'
|
|
xcode_build(ENV['IOS'], "#{platform_prefix}Build/generated/externallib/#{platform_prefix}Build/Scaffolding.xcodeproj") or abort 'Failed to configure/build/test temporary project using Urho3D as external library'
|
|
|
end
|
|
end
|
|
|
|
|
|