Skip to content

Commit

Permalink
remove macos-10 runner label support which is no longer available
Browse files Browse the repository at this point in the history
  • Loading branch information
rhysd committed May 15, 2024
1 parent 442741a commit 44d144e
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 4 deletions.
5 changes: 1 addition & 4 deletions rule_runner_label.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ const (
compatUbuntu2004 runnerOSCompat = 1 << iota
compatUbuntu2204
compatUbuntu2404
compatMacOS1015
compatMacOS110
compatMacOS120
compatMacOS120L
Expand Down Expand Up @@ -63,7 +62,6 @@ var allGitHubHostedRunnerLabels = []string{
"macos-12.0",
"macos-11",
"macos-11.0",
"macos-10.15",
}

// https://docs.github.com/en/actions/hosting-your-own-runners/using-self-hosted-runners-in-a-workflow#using-default-labels-to-route-jobs
Expand Down Expand Up @@ -110,14 +108,13 @@ var defaultRunnerOSCompats = map[string]runnerOSCompat{
"macos-12.0": compatMacOS120,
"macos-11": compatMacOS110,
"macos-11.0": compatMacOS110,
"macos-10.15": compatMacOS1015,
"windows-latest": compatWindows2022,
"windows-latest-8-cores": compatWindows2022,
"windows-2022": compatWindows2022,
"windows-2019": compatWindows2019,
"windows-2016": compatWindows2016,
"linux": compatUbuntu2404 | compatUbuntu2204 | compatUbuntu2004, // Note: "linux" does not always indicate Ubuntu. It might be Fedora or Arch or ...
"macos": compatMacOS140 | compatMacOS140L | compatMacOS140XL | compatMacOS130 | compatMacOS130L | compatMacOS130XL | compatMacOS120 | compatMacOS120L | compatMacOS120XL | compatMacOS110 | compatMacOS1015,
"macos": compatMacOS140 | compatMacOS140L | compatMacOS140XL | compatMacOS130 | compatMacOS130L | compatMacOS130XL | compatMacOS120 | compatMacOS120L | compatMacOS120XL | compatMacOS110,
"windows": compatWindows2022 | compatWindows2019 | compatWindows2016,
}

Expand Down
4 changes: 4 additions & 0 deletions rule_runner_label_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,10 @@ func TestRuleRunnerLabelCheckLabels(t *testing.T) {
what: "use matrix value but no matrix exist",
labels: []string{"${{matrix.os}}"},
},
{
what: "ubuntu-24.04",
labels: []string{"ubuntu-24.04"},
},
// TODO: Add tests for 'include:'
// TODO: Check matrix with 'include:'

Expand Down
2 changes: 2 additions & 0 deletions testdata/err/macos_10.15_removed.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/test\.yaml:5:14: label "macos-10\.15" is unknown\. available labels are .+ \[runner-label\]/
/test\.yaml:9:14: label "macos-10" is unknown\. available labels are .+ \[runner-label\]/
11 changes: 11 additions & 0 deletions testdata/err/macos_10.15_removed.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
on: push

jobs:
macos-10-15:
runs-on: macos-10.15
steps:
- run: echo test
macos-10:
runs-on: macos-10
steps:
- run: echo test

0 comments on commit 44d144e

Please sign in to comment.