Skip to content

Commit

Permalink
follow up for #299
Browse files Browse the repository at this point in the history
  • Loading branch information
rhysd committed Jun 2, 2023
1 parent 7aab63e commit 6e2d243
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 22 deletions.
2 changes: 2 additions & 0 deletions fuzz/check.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
//go:build gofuzz
// +build gofuzz

package actionlint_fuzz

import "github.com/rhysd/actionlint"
Expand Down
2 changes: 2 additions & 0 deletions fuzz/expr.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
//go:build gofuzz
// +build gofuzz

package actionlint_fuzz

import (
Expand Down
2 changes: 2 additions & 0 deletions fuzz/glob.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
//go:build gofuzz
// +build gofuzz

package actionlint_fuzz

import (
Expand Down
2 changes: 2 additions & 0 deletions fuzz/parse.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
//go:build gofuzz
// +build gofuzz

package actionlint_fuzz

import (
Expand Down
45 changes: 23 additions & 22 deletions rule_runner_label.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ const (
compatMacOS1015
compatMacOS110
compatMacOS120
compatMacOS120xl
compatMacOS130
compatMacOS130xl
compatWindows2016
compatWindows2019
compatWindows2022
Expand All @@ -36,6 +34,7 @@ var allGitHubHostedRunnerLabels = []string{
"macos-latest-xl",
"macos-13-xl",
"macos-13",
"macos-13.0",
"macos-12-xl",
"macos-12",
"macos-12.0",
Expand All @@ -60,26 +59,28 @@ var selfHostedRunnerPresetOtherLabels = []string{
}

var defaultRunnerOSCompats = map[string]runnerOSCompat{
"ubuntu-latest": compatUbuntu2204,
"ubuntu-22.04": compatUbuntu2204,
"ubuntu-20.04": compatUbuntu2004,
"ubuntu-18.04": compatUbuntu1804,
"macos-13-xl": compatMacOS130xl,
"macos-13": compatMacOS130,
"macos-latest": compatMacOS120,
"macos-latest-xl": compatMacOS120xl,
"macos-12": compatMacOS120,
"macos-12.0": compatMacOS120,
"macos-11": compatMacOS110,
"macos-11.0": compatMacOS110,
"macos-10.15": compatMacOS1015,
"windows-latest": compatWindows2022,
"windows-2022": compatWindows2022,
"windows-2019": compatWindows2019,
"windows-2016": compatWindows2016,
"linux": compatUbuntu2204 | compatUbuntu2004 | compatUbuntu1804, // Note: "linux" does not always indicate Ubuntu. It might be Fedora or Arch or ...
"macos": compatMacOS130xl | compatMacOS120xl | compatMacOS130 | compatMacOS120 | compatMacOS110 | compatMacOS1015,
"windows": compatWindows2022 | compatWindows2019 | compatWindows2016,
"ubuntu-latest": compatUbuntu2204,
"ubuntu-22.04": compatUbuntu2204,
"ubuntu-20.04": compatUbuntu2004,
"ubuntu-18.04": compatUbuntu1804,
"macos-13-xl": compatMacOS130,
"macos-13": compatMacOS130,
"macos-13.0": compatMacOS130,
"macos-latest-xl": compatMacOS120,
"macos-latest": compatMacOS120,
"macos-12-xl": compatMacOS120,
"macos-12": compatMacOS120,
"macos-12.0": compatMacOS120,
"macos-11": compatMacOS110,
"macos-11.0": compatMacOS110,
"macos-10.15": compatMacOS1015,
"windows-latest": compatWindows2022,
"windows-2022": compatWindows2022,
"windows-2019": compatWindows2019,
"windows-2016": compatWindows2016,
"linux": compatUbuntu2204 | compatUbuntu2004 | compatUbuntu1804, // Note: "linux" does not always indicate Ubuntu. It might be Fedora or Arch or ...
"macos": compatMacOS130 | compatMacOS120 | compatMacOS110 | compatMacOS1015,
"windows": compatWindows2022 | compatWindows2019 | compatWindows2016,
}

// RuleRunnerLabel is a rule to check runner label like "ubuntu-latest". There are two types of
Expand Down

0 comments on commit 6e2d243

Please sign in to comment.