|
|
@@ -350,11 +350,14 @@ 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'"
|
|
|
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'}"
|
|
|
@@ -643,9 +646,9 @@ task :ci_timer do
|
|
|
end
|
|
|
|
|
|
# Usage: NOT Intended to be used manually
|
|
|
-desc 'Check if the time is up'
|
|
|
+desc 'Check if the time is up when the time check is enabled'
|
|
|
task :ci_timeup do
|
|
|
- abort "Time up!" if timeup true
|
|
|
+ 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
|
|
|
@@ -656,9 +659,11 @@ def timeup quiet = false
|
|
|
end
|
|
|
current_time = Time.now
|
|
|
elapsed_time = (current_time - File.atime('start_time.log')) / 60.0
|
|
|
- lap_time = (current_time - File.atime('split_time.log')) / 60.0
|
|
|
- system 'touch split_time.log'
|
|
|
- puts "\n=== elapsed time: #{elapsed_time.to_i} minutes #{((elapsed_time - elapsed_time.to_i) * 60.0).round} seconds, lap time: #{lap_time.to_i} minutes #{((lap_time - lap_time.to_i) * 60.0).round} seconds ===\n\n" unless quiet || File.exists?('already_timeup.log'); $stdout.flush
|
|
|
+ unless quiet
|
|
|
+ lap_time = (current_time - File.atime('split_time.log')) / 60.0
|
|
|
+ system 'touch split_time.log'
|
|
|
+ puts "\n=== elapsed time: #{elapsed_time.to_i} minutes #{((elapsed_time - elapsed_time.to_i) * 60.0).round} seconds, lap time: #{lap_time.to_i} minutes #{((lap_time - lap_time.to_i) * 60.0).round} seconds ===\n\n" unless File.exists?('already_timeup.log'); $stdout.flush
|
|
|
+ end
|
|
|
return system('touch already_timeup.log') if elapsed_time > 40.0
|
|
|
end
|
|
|
|