Merge pull request #15492 from carlocab/no-run-attempt
github_runner_matrix: remove `GITHUB_RUN_ATTEMPT`
This commit is contained in:
commit
33a3f72fbc
10
.github/workflows/doctor.yml
vendored
10
.github/workflows/doctor.yml
vendored
@ -18,13 +18,13 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- runner: "13-arm64-${{github.run_id}}-${{github.run_attempt}}"
|
- runner: "13-arm64-${{ github.run_id }}"
|
||||||
- runner: "12-arm64-${{github.run_id}}-${{github.run_attempt}}"
|
- runner: "13-${{ github.run_id }}"
|
||||||
- runner: "12-${{github.run_id}}-${{github.run_attempt}}"
|
- runner: "12-arm64-${{ github.run_id }}"
|
||||||
|
- runner: "12-${{ github.run_id }}"
|
||||||
- runner: "11-arm64"
|
- runner: "11-arm64"
|
||||||
cleanup: true
|
cleanup: true
|
||||||
- runner: "11-${{github.run_id}}-${{github.run_attempt}}"
|
- runner: "11-${{ github.run_id }}"
|
||||||
- runner: "10.15-${{github.run_id}}-${{github.run_attempt}}"
|
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
runs-on: ${{ matrix.runner }}
|
runs-on: ${{ matrix.runner }}
|
||||||
env:
|
env:
|
||||||
|
|||||||
@ -112,11 +112,10 @@ class GitHubRunnerMatrix
|
|||||||
@runners << create_runner(:linux, :x86_64, linux_runner_spec)
|
@runners << create_runner(:linux, :x86_64, linux_runner_spec)
|
||||||
|
|
||||||
github_run_id = ENV.fetch("GITHUB_RUN_ID")
|
github_run_id = ENV.fetch("GITHUB_RUN_ID")
|
||||||
github_run_attempt = ENV.fetch("GITHUB_RUN_ATTEMPT")
|
|
||||||
timeout = ENV.fetch("HOMEBREW_MACOS_TIMEOUT").to_i
|
timeout = ENV.fetch("HOMEBREW_MACOS_TIMEOUT").to_i
|
||||||
use_github_runner = ENV.fetch("HOMEBREW_MACOS_BUILD_ON_GITHUB_RUNNER", "false") == "true"
|
use_github_runner = ENV.fetch("HOMEBREW_MACOS_BUILD_ON_GITHUB_RUNNER", "false") == "true"
|
||||||
|
|
||||||
ephemeral_suffix = +"-#{github_run_id}-#{github_run_attempt}"
|
ephemeral_suffix = +"-#{github_run_id}"
|
||||||
ephemeral_suffix << "-deps" if @dependent_matrix
|
ephemeral_suffix << "-deps" if @dependent_matrix
|
||||||
ephemeral_suffix.freeze
|
ephemeral_suffix.freeze
|
||||||
|
|
||||||
|
|||||||
@ -11,13 +11,12 @@ describe "brew determine-test-runners" do
|
|||||||
let(:linux_runner) { "ubuntu-22.04" }
|
let(:linux_runner) { "ubuntu-22.04" }
|
||||||
# We need to make sure we write to a different path for each example.
|
# We need to make sure we write to a different path for each example.
|
||||||
let(:github_output) { "#{TEST_TMPDIR}/github_output#{DetermineRunnerTestHelper.new.number}" }
|
let(:github_output) { "#{TEST_TMPDIR}/github_output#{DetermineRunnerTestHelper.new.number}" }
|
||||||
let(:ephemeral_suffix) { "-12345-1" }
|
let(:ephemeral_suffix) { "-12345" }
|
||||||
let(:runner_env) do
|
let(:runner_env) do
|
||||||
{
|
{
|
||||||
"HOMEBREW_LINUX_RUNNER" => linux_runner,
|
"HOMEBREW_LINUX_RUNNER" => linux_runner,
|
||||||
"HOMEBREW_MACOS_TIMEOUT" => "90",
|
"HOMEBREW_MACOS_TIMEOUT" => "90",
|
||||||
"GITHUB_RUN_ID" => ephemeral_suffix.split("-").second,
|
"GITHUB_RUN_ID" => ephemeral_suffix.split("-").second,
|
||||||
"GITHUB_RUN_ATTEMPT" => ephemeral_suffix.split("-").third,
|
|
||||||
}.freeze
|
}.freeze
|
||||||
end
|
end
|
||||||
let(:all_runners) do
|
let(:all_runners) do
|
||||||
|
|||||||
@ -9,7 +9,6 @@ describe GitHubRunnerMatrix do
|
|||||||
allow(ENV).to receive(:fetch).with("HOMEBREW_MACOS_TIMEOUT").and_return("90")
|
allow(ENV).to receive(:fetch).with("HOMEBREW_MACOS_TIMEOUT").and_return("90")
|
||||||
allow(ENV).to receive(:fetch).with("HOMEBREW_MACOS_BUILD_ON_GITHUB_RUNNER", "false").and_return("false")
|
allow(ENV).to receive(:fetch).with("HOMEBREW_MACOS_BUILD_ON_GITHUB_RUNNER", "false").and_return("false")
|
||||||
allow(ENV).to receive(:fetch).with("GITHUB_RUN_ID").and_return("12345")
|
allow(ENV).to receive(:fetch).with("GITHUB_RUN_ID").and_return("12345")
|
||||||
allow(ENV).to receive(:fetch).with("GITHUB_RUN_ATTEMPT").and_return("1")
|
|
||||||
end
|
end
|
||||||
|
|
||||||
let(:newest_supported_macos) do
|
let(:newest_supported_macos) do
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user