|
|
@@ -350,14 +350,11 @@ task :ci do
|
|
|
system 'rake ci_push_bindings' or abort
|
|
|
next
|
|
|
end
|
|
|
- # Enable more granular timeup check for Xcode
|
|
|
- system 'touch enabled_time_check.log' if ENV['XCODE']
|
|
|
- if !system "bash -c 'rake make'"
|
|
|
+ if wait_for_block { system "bash -c 'rake make'"; Thread.current[:exit_code] = $?.exitstatus } != 0
|
|
|
abort 'Failed to build Urho3D library' unless File.exists?('already_timeup.log')
|
|
|
$stderr.puts "Skipped the rest of the CI processes due to insufficient time"
|
|
|
next
|
|
|
end
|
|
|
- File.delete 'enabled_time_check.log' if ENV['XCODE']
|
|
|
if ENV['URHO3D_TESTING'] && !timeup
|
|
|
# Multi-config CMake generators use different test target name than single-config ones for no good reason
|
|
|
test = "rake make target=#{ENV['OS'] || ENV['XCODE'] ? 'RUN_TESTS' : 'test'}"
|
|
|
@@ -370,13 +367,11 @@ task :ci do
|
|
|
unless ENV['CI'] && (ENV['IOS'] || ENV['WEB']) && ENV['PACKAGE_UPLOAD'] || ENV['XCODE_64BIT_ONLY'] || timeup
|
|
|
# Staged-install Urho3D SDK when on Travis-CI; normal install when on AppVeyor
|
|
|
ENV['DESTDIR'] = ENV['HOME'] || Dir.home unless ENV['APPVEYOR']
|
|
|
- system 'touch enabled_time_check.log' if ENV['XCODE']
|
|
|
if wait_for_block("Installing Urho3D SDK to #{ENV['DESTDIR'] ? "#{ENV['DESTDIR']}/usr/local" : 'default system-wide location'}...") { system "bash -c 'rake make target=install >/dev/null'"; Thread.current[:exit_code] = $?.exitstatus } != 0
|
|
|
abort 'Failed to install Urho3D SDK' unless File.exists?('already_timeup.log')
|
|
|
$stderr.puts "Skipped the rest of the CI processes due to insufficient time"
|
|
|
next
|
|
|
end
|
|
|
- File.delete 'enabled_time_check.log' if ENV['XCODE']
|
|
|
# Alternate to use in-the-source build tree for test coverage
|
|
|
ENV['build_tree'] = '.' unless ENV['APPVEYOR']
|
|
|
# Ensure the following variables are auto-discovered during scaffolding test
|
|
|
@@ -651,12 +646,6 @@ task :ci_timer do
|
|
|
timeup
|
|
|
end
|
|
|
|
|
|
-# Usage: NOT Intended to be used manually
|
|
|
-desc 'Check if the time is up when the time check is enabled'
|
|
|
-task :ci_timeup do
|
|
|
- abort "Time up!" if File.exists?('enabled_time_check.log') && timeup(true)
|
|
|
-end
|
|
|
-
|
|
|
# Always call this function last in the multiple conditional check so that the checkpoint message does not being echoed unnecessarily
|
|
|
def timeup quiet = false
|
|
|
unless File.exists?('start_time.log')
|
|
|
@@ -843,12 +832,16 @@ def wait_for_block comment = '', retries = -1, retry_interval = 60, exit_code_sy
|
|
|
thread.join
|
|
|
break
|
|
|
end
|
|
|
+ if timeup(true)
|
|
|
+ thread.kill
|
|
|
+ break
|
|
|
+ end
|
|
|
print str; str = '.'; $stdout.flush # Flush the standard output stream in case it is buffered to prevent Travis-CI into thinking that the build/test has stalled
|
|
|
sleep retry_interval
|
|
|
retries -= 1 if retries > 0
|
|
|
end
|
|
|
puts "\n" if str == '.'; $stdout.flush
|
|
|
- return retries == 0 ? nil : (exit_code_sym ? thread[exit_code_sym] : 0)
|
|
|
+ return retries == 0 || File.exists?('already_timeup.log') ? nil : (exit_code_sym ? thread[exit_code_sym] : 0)
|
|
|
end
|
|
|
|
|
|
def append_new_release release, filename = '../urho3d.github.io/_data/urho3d.json'
|