github_runner_matrix: align Intel and ARM timeouts

This prevents situations where the Intel runners have a 360 minute
timeout but the ARM runners only have 45 minutes.

See Homebrew/homebrew-core#130284.
This commit is contained in:
Carlo Cabrera 2023-05-07 00:14:54 +08:00
parent c1fdb59081
commit 0b33a09090
No known key found for this signature in database
GPG Key ID: C74D447FC549A1D0

View File

@ -158,8 +158,7 @@ class GitHubRunnerMatrix
runner.freeze
# The ARM runners are typically over twice as fast as the Intel runners.
runner_timeout = timeout
runner_timeout /= 2 if timeout < GITHUB_ACTIONS_LONG_TIMEOUT
runner_timeout /= 2 if runner_timeout < GITHUB_ACTIONS_LONG_TIMEOUT
spec = MacOSRunnerSpec.new(
name: "macOS #{version}-arm64",
runner: runner,