Skip to content

Commit

Permalink
Simply changing GH Actions runner (vitessio#17788)
Browse files Browse the repository at this point in the history
Signed-off-by: Tim Vaillancourt <[email protected]>
  • Loading branch information
timvaillancourt authored Feb 14, 2025
1 parent 624a7ea commit efa30d4
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 10 deletions.
16 changes: 11 additions & 5 deletions test/ci_workflow_gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ const (
mysql80 mysqlVersion = "mysql80"
mysql84 mysqlVersion = "mysql84"

cores16RunnerName = "gh-hosted-runners-16cores-1-24.04"
defaultRunnerName = "ubuntu-24.04"
defaultMySQLVersion = mysql80
)

Expand Down Expand Up @@ -164,27 +166,28 @@ var (
)

type unitTest struct {
Name, Platform, FileName, Evalengine string
Name, RunsOn, Platform, FileName, Evalengine string
}

type clusterTest struct {
Name, Shard, Platform string
FileName string
BuildTag string
RunsOn string
MemoryCheck bool
MakeTools, InstallXtraBackup bool
Docker bool
LimitResourceUsage bool
EnableBinlogTransactionCompression bool
EnablePartialJSON bool
PartialKeyspace bool
Cores16 bool
NeedsMinio bool
}

type vitessTesterTest struct {
FileName string
Name string
RunsOn string
Path string
}

Expand Down Expand Up @@ -241,8 +244,9 @@ func canonnizeList(list []string) []string {
func generateVitessTesterWorkflows(mp map[string]string, tpl string) {
for test, testPath := range mp {
tt := &vitessTesterTest{
Name: fmt.Sprintf("Vitess Tester (%v)", test),
Path: testPath,
Name: fmt.Sprintf("Vitess Tester (%v)", test),
RunsOn: defaultRunnerName,
Path: testPath,
}

templateFileName := tpl
Expand All @@ -263,11 +267,12 @@ func generateClusterWorkflows(list []string, tpl string) {
Name: fmt.Sprintf("Cluster (%s)", cluster),
Shard: cluster,
BuildTag: buildTag[cluster],
RunsOn: defaultRunnerName,
}
cores16Clusters := canonnizeList(clusterRequiring16CoresMachines)
for _, cores16Cluster := range cores16Clusters {
if cores16Cluster == cluster {
test.Cores16 = true
test.RunsOn = cores16RunnerName
break
}
}
Expand Down Expand Up @@ -339,6 +344,7 @@ func generateUnitTestWorkflows() {
for _, evalengine := range []string{"1", "0"} {
test := &unitTest{
Name: fmt.Sprintf("Unit Test (%s%s)", evalengineToString(evalengine), platform),
RunsOn: defaultRunnerName,
Platform: string(platform),
Evalengine: evalengine,
}
Expand Down
2 changes: 1 addition & 1 deletion test/templates/cluster_endtoend_test.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
build:
timeout-minutes: 60
name: Run endtoend tests on {{.Name}}
runs-on: {{if .Cores16}}gh-hosted-runners-16cores-1-24.04{{else}}ubuntu-24.04{{end}}
runs-on: {{.RunsOn}}

steps:
- name: Skip CI
Expand Down
2 changes: 1 addition & 1 deletion test/templates/cluster_endtoend_test_docker.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ permissions: read-all
jobs:
build:
name: Run endtoend tests on {{.Name}}
runs-on: {{if .Cores16}}gh-hosted-runners-16cores-1-24.04{{else}}ubuntu-24.04{{end}}
runs-on: {{.RunsOn}}

steps:
- name: Skip CI
Expand Down
2 changes: 1 addition & 1 deletion test/templates/cluster_endtoend_test_mysql57.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ env:
jobs:
build:
name: Run endtoend tests on {{.Name}}
runs-on: {{if .Cores16}}gh-hosted-runners-16cores-1-24.04{{else}}ubuntu-24.04{{end}}
runs-on: {{.RunsOn}}

steps:
- name: Skip CI
Expand Down
2 changes: 1 addition & 1 deletion test/templates/cluster_vitess_tester.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ env:
jobs:
build:
name: Run endtoend tests on {{.Name}}
runs-on: ubuntu-24.04
runs-on: {{.RunsOn}}

steps:
- name: Skip CI
Expand Down
2 changes: 1 addition & 1 deletion test/templates/unit_test.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ env:
jobs:
test:
name: {{.Name}}
runs-on: ubuntu-24.04
runs-on: {{.RunsOn}}

steps:
- name: Skip CI
Expand Down

0 comments on commit efa30d4

Please sign in to comment.