Skip to content

Commit

Permalink
test: add go1.23 to test matrix
Browse files Browse the repository at this point in the history
Signed-off-by: Zxilly <[email protected]>
  • Loading branch information
Zxilly committed Aug 30, 2024
1 parent e36546f commit ea0782e
Show file tree
Hide file tree
Showing 2 changed files with 124 additions and 63 deletions.
63 changes: 63 additions & 0 deletions scripts/binaries.csv
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,69 @@ bin-darwin-1.22-amd64,https://github.com/Zxilly/go-testdata/releases/download/la
bin-darwin-1.22-arm64-strip,https://github.com/Zxilly/go-testdata/releases/download/latest/bin-darwin-1.22-arm64-strip,15,raw,bin-darwin-1.22-arm64-strip
bin-darwin-1.22-arm64-stripdwarf,https://github.com/Zxilly/go-testdata/releases/download/latest/bin-darwin-1.22-arm64-stripdwarf,15,raw,bin-darwin-1.22-arm64-stripdwarf
bin-darwin-1.22-arm64,https://github.com/Zxilly/go-testdata/releases/download/latest/bin-darwin-1.22-arm64,15,raw,bin-darwin-1.22-arm64
bin-linux-1.23-amd64-strip-pie-cgo,https://github.com/Zxilly/go-testdata/releases/download/latest/bin-linux-1.23-amd64-strip-pie-cgo,15,raw,bin-linux-1.23-amd64-strip-pie-cgo
bin-linux-1.23-amd64-stripdwarf-pie-cgo,https://github.com/Zxilly/go-testdata/releases/download/latest/bin-linux-1.23-amd64-stripdwarf-pie-cgo,15,raw,bin-linux-1.23-amd64-stripdwarf-pie-cgo
bin-linux-1.23-amd64-pie-cgo,https://github.com/Zxilly/go-testdata/releases/download/latest/bin-linux-1.23-amd64-pie-cgo,15,raw,bin-linux-1.23-amd64-pie-cgo
bin-linux-1.23-arm64-strip-pie-cgo,https://github.com/Zxilly/go-testdata/releases/download/latest/bin-linux-1.23-arm64-strip-pie-cgo,15,raw,bin-linux-1.23-arm64-strip-pie-cgo
bin-linux-1.23-arm64-stripdwarf-pie-cgo,https://github.com/Zxilly/go-testdata/releases/download/latest/bin-linux-1.23-arm64-stripdwarf-pie-cgo,15,raw,bin-linux-1.23-arm64-stripdwarf-pie-cgo
bin-linux-1.23-arm64-pie-cgo,https://github.com/Zxilly/go-testdata/releases/download/latest/bin-linux-1.23-arm64-pie-cgo,15,raw,bin-linux-1.23-arm64-pie-cgo
bin-linux-1.23-386-strip-pie-cgo,https://github.com/Zxilly/go-testdata/releases/download/latest/bin-linux-1.23-386-strip-pie-cgo,15,raw,bin-linux-1.23-386-strip-pie-cgo
bin-linux-1.23-386-stripdwarf-pie-cgo,https://github.com/Zxilly/go-testdata/releases/download/latest/bin-linux-1.23-386-stripdwarf-pie-cgo,15,raw,bin-linux-1.23-386-stripdwarf-pie-cgo
bin-linux-1.23-386-pie-cgo,https://github.com/Zxilly/go-testdata/releases/download/latest/bin-linux-1.23-386-pie-cgo,15,raw,bin-linux-1.23-386-pie-cgo
bin-linux-1.23-amd64-strip-cgo,https://github.com/Zxilly/go-testdata/releases/download/latest/bin-linux-1.23-amd64-strip-cgo,15,raw,bin-linux-1.23-amd64-strip-cgo
bin-linux-1.23-amd64-stripdwarf-cgo,https://github.com/Zxilly/go-testdata/releases/download/latest/bin-linux-1.23-amd64-stripdwarf-cgo,15,raw,bin-linux-1.23-amd64-stripdwarf-cgo
bin-linux-1.23-amd64-cgo,https://github.com/Zxilly/go-testdata/releases/download/latest/bin-linux-1.23-amd64-cgo,15,raw,bin-linux-1.23-amd64-cgo
bin-linux-1.23-arm64-strip-cgo,https://github.com/Zxilly/go-testdata/releases/download/latest/bin-linux-1.23-arm64-strip-cgo,15,raw,bin-linux-1.23-arm64-strip-cgo
bin-linux-1.23-arm64-stripdwarf-cgo,https://github.com/Zxilly/go-testdata/releases/download/latest/bin-linux-1.23-arm64-stripdwarf-cgo,15,raw,bin-linux-1.23-arm64-stripdwarf-cgo
bin-linux-1.23-arm64-cgo,https://github.com/Zxilly/go-testdata/releases/download/latest/bin-linux-1.23-arm64-cgo,15,raw,bin-linux-1.23-arm64-cgo
bin-linux-1.23-386-strip-cgo,https://github.com/Zxilly/go-testdata/releases/download/latest/bin-linux-1.23-386-strip-cgo,15,raw,bin-linux-1.23-386-strip-cgo
bin-linux-1.23-386-stripdwarf-cgo,https://github.com/Zxilly/go-testdata/releases/download/latest/bin-linux-1.23-386-stripdwarf-cgo,15,raw,bin-linux-1.23-386-stripdwarf-cgo
bin-linux-1.23-386-cgo,https://github.com/Zxilly/go-testdata/releases/download/latest/bin-linux-1.23-386-cgo,15,raw,bin-linux-1.23-386-cgo
bin-linux-1.23-amd64-strip,https://github.com/Zxilly/go-testdata/releases/download/latest/bin-linux-1.23-amd64-strip,15,raw,bin-linux-1.23-amd64-strip
bin-linux-1.23-amd64-stripdwarf,https://github.com/Zxilly/go-testdata/releases/download/latest/bin-linux-1.23-amd64-stripdwarf,15,raw,bin-linux-1.23-amd64-stripdwarf
bin-linux-1.23-amd64,https://github.com/Zxilly/go-testdata/releases/download/latest/bin-linux-1.23-amd64,15,raw,bin-linux-1.23-amd64
bin-linux-1.23-arm64-strip,https://github.com/Zxilly/go-testdata/releases/download/latest/bin-linux-1.23-arm64-strip,15,raw,bin-linux-1.23-arm64-strip
bin-linux-1.23-arm64-stripdwarf,https://github.com/Zxilly/go-testdata/releases/download/latest/bin-linux-1.23-arm64-stripdwarf,15,raw,bin-linux-1.23-arm64-stripdwarf
bin-linux-1.23-arm64,https://github.com/Zxilly/go-testdata/releases/download/latest/bin-linux-1.23-arm64,15,raw,bin-linux-1.23-arm64
bin-linux-1.23-386-strip,https://github.com/Zxilly/go-testdata/releases/download/latest/bin-linux-1.23-386-strip,15,raw,bin-linux-1.23-386-strip
bin-linux-1.23-386-stripdwarf,https://github.com/Zxilly/go-testdata/releases/download/latest/bin-linux-1.23-386-stripdwarf,15,raw,bin-linux-1.23-386-stripdwarf
bin-linux-1.23-386,https://github.com/Zxilly/go-testdata/releases/download/latest/bin-linux-1.23-386,15,raw,bin-linux-1.23-386
bin-windows-1.23-amd64-strip-pie-cgo,https://github.com/Zxilly/go-testdata/releases/download/latest/bin-windows-1.23-amd64-strip-pie-cgo,15,raw,bin-windows-1.23-amd64-strip-pie-cgo
bin-windows-1.23-amd64-stripdwarf-pie-cgo,https://github.com/Zxilly/go-testdata/releases/download/latest/bin-windows-1.23-amd64-stripdwarf-pie-cgo,15,raw,bin-windows-1.23-amd64-stripdwarf-pie-cgo
bin-windows-1.23-amd64-pie-cgo,https://github.com/Zxilly/go-testdata/releases/download/latest/bin-windows-1.23-amd64-pie-cgo,15,raw,bin-windows-1.23-amd64-pie-cgo
bin-windows-1.23-386-strip-pie-cgo,https://github.com/Zxilly/go-testdata/releases/download/latest/bin-windows-1.23-386-strip-pie-cgo,15,raw,bin-windows-1.23-386-strip-pie-cgo
bin-windows-1.23-386-stripdwarf-pie-cgo,https://github.com/Zxilly/go-testdata/releases/download/latest/bin-windows-1.23-386-stripdwarf-pie-cgo,15,raw,bin-windows-1.23-386-stripdwarf-pie-cgo
bin-windows-1.23-386-pie-cgo,https://github.com/Zxilly/go-testdata/releases/download/latest/bin-windows-1.23-386-pie-cgo,15,raw,bin-windows-1.23-386-pie-cgo
bin-windows-1.23-amd64-strip-cgo,https://github.com/Zxilly/go-testdata/releases/download/latest/bin-windows-1.23-amd64-strip-cgo,15,raw,bin-windows-1.23-amd64-strip-cgo
bin-windows-1.23-amd64-stripdwarf-cgo,https://github.com/Zxilly/go-testdata/releases/download/latest/bin-windows-1.23-amd64-stripdwarf-cgo,15,raw,bin-windows-1.23-amd64-stripdwarf-cgo
bin-windows-1.23-amd64-cgo,https://github.com/Zxilly/go-testdata/releases/download/latest/bin-windows-1.23-amd64-cgo,15,raw,bin-windows-1.23-amd64-cgo
bin-windows-1.23-386-strip-cgo,https://github.com/Zxilly/go-testdata/releases/download/latest/bin-windows-1.23-386-strip-cgo,15,raw,bin-windows-1.23-386-strip-cgo
bin-windows-1.23-386-stripdwarf-cgo,https://github.com/Zxilly/go-testdata/releases/download/latest/bin-windows-1.23-386-stripdwarf-cgo,15,raw,bin-windows-1.23-386-stripdwarf-cgo
bin-windows-1.23-386-cgo,https://github.com/Zxilly/go-testdata/releases/download/latest/bin-windows-1.23-386-cgo,15,raw,bin-windows-1.23-386-cgo
bin-windows-1.23-amd64-strip,https://github.com/Zxilly/go-testdata/releases/download/latest/bin-windows-1.23-amd64-strip,15,raw,bin-windows-1.23-amd64-strip
bin-windows-1.23-amd64-stripdwarf,https://github.com/Zxilly/go-testdata/releases/download/latest/bin-windows-1.23-amd64-stripdwarf,15,raw,bin-windows-1.23-amd64-stripdwarf
bin-windows-1.23-amd64,https://github.com/Zxilly/go-testdata/releases/download/latest/bin-windows-1.23-amd64,15,raw,bin-windows-1.23-amd64
bin-windows-1.23-386-strip,https://github.com/Zxilly/go-testdata/releases/download/latest/bin-windows-1.23-386-strip,15,raw,bin-windows-1.23-386-strip
bin-windows-1.23-386-stripdwarf,https://github.com/Zxilly/go-testdata/releases/download/latest/bin-windows-1.23-386-stripdwarf,15,raw,bin-windows-1.23-386-stripdwarf
bin-windows-1.23-386,https://github.com/Zxilly/go-testdata/releases/download/latest/bin-windows-1.23-386,15,raw,bin-windows-1.23-386
bin-darwin-1.23-amd64-strip-pie-cgo,https://github.com/Zxilly/go-testdata/releases/download/latest/bin-darwin-1.23-amd64-strip-pie-cgo,15,raw,bin-darwin-1.23-amd64-strip-pie-cgo
bin-darwin-1.23-amd64-stripdwarf-pie-cgo,https://github.com/Zxilly/go-testdata/releases/download/latest/bin-darwin-1.23-amd64-stripdwarf-pie-cgo,15,raw,bin-darwin-1.23-amd64-stripdwarf-pie-cgo
bin-darwin-1.23-amd64-pie-cgo,https://github.com/Zxilly/go-testdata/releases/download/latest/bin-darwin-1.23-amd64-pie-cgo,15,raw,bin-darwin-1.23-amd64-pie-cgo
bin-darwin-1.23-arm64-strip-pie-cgo,https://github.com/Zxilly/go-testdata/releases/download/latest/bin-darwin-1.23-arm64-strip-pie-cgo,15,raw,bin-darwin-1.23-arm64-strip-pie-cgo
bin-darwin-1.23-arm64-stripdwarf-pie-cgo,https://github.com/Zxilly/go-testdata/releases/download/latest/bin-darwin-1.23-arm64-stripdwarf-pie-cgo,15,raw,bin-darwin-1.23-arm64-stripdwarf-pie-cgo
bin-darwin-1.23-arm64-pie-cgo,https://github.com/Zxilly/go-testdata/releases/download/latest/bin-darwin-1.23-arm64-pie-cgo,15,raw,bin-darwin-1.23-arm64-pie-cgo
bin-darwin-1.23-amd64-strip-cgo,https://github.com/Zxilly/go-testdata/releases/download/latest/bin-darwin-1.23-amd64-strip-cgo,15,raw,bin-darwin-1.23-amd64-strip-cgo
bin-darwin-1.23-amd64-stripdwarf-cgo,https://github.com/Zxilly/go-testdata/releases/download/latest/bin-darwin-1.23-amd64-stripdwarf-cgo,15,raw,bin-darwin-1.23-amd64-stripdwarf-cgo
bin-darwin-1.23-amd64-cgo,https://github.com/Zxilly/go-testdata/releases/download/latest/bin-darwin-1.23-amd64-cgo,15,raw,bin-darwin-1.23-amd64-cgo
bin-darwin-1.23-arm64-strip-cgo,https://github.com/Zxilly/go-testdata/releases/download/latest/bin-darwin-1.23-arm64-strip-cgo,15,raw,bin-darwin-1.23-arm64-strip-cgo
bin-darwin-1.23-arm64-stripdwarf-cgo,https://github.com/Zxilly/go-testdata/releases/download/latest/bin-darwin-1.23-arm64-stripdwarf-cgo,15,raw,bin-darwin-1.23-arm64-stripdwarf-cgo
bin-darwin-1.23-arm64-cgo,https://github.com/Zxilly/go-testdata/releases/download/latest/bin-darwin-1.23-arm64-cgo,15,raw,bin-darwin-1.23-arm64-cgo
bin-darwin-1.23-amd64-strip,https://github.com/Zxilly/go-testdata/releases/download/latest/bin-darwin-1.23-amd64-strip,15,raw,bin-darwin-1.23-amd64-strip
bin-darwin-1.23-amd64-stripdwarf,https://github.com/Zxilly/go-testdata/releases/download/latest/bin-darwin-1.23-amd64-stripdwarf,15,raw,bin-darwin-1.23-amd64-stripdwarf
bin-darwin-1.23-amd64,https://github.com/Zxilly/go-testdata/releases/download/latest/bin-darwin-1.23-amd64,15,raw,bin-darwin-1.23-amd64
bin-darwin-1.23-arm64-strip,https://github.com/Zxilly/go-testdata/releases/download/latest/bin-darwin-1.23-arm64-strip,15,raw,bin-darwin-1.23-arm64-strip
bin-darwin-1.23-arm64-stripdwarf,https://github.com/Zxilly/go-testdata/releases/download/latest/bin-darwin-1.23-arm64-stripdwarf,15,raw,bin-darwin-1.23-arm64-stripdwarf
bin-darwin-1.23-arm64,https://github.com/Zxilly/go-testdata/releases/download/latest/bin-darwin-1.23-arm64,15,raw,bin-darwin-1.23-arm64
const-windows,https://github.com/Zxilly/go-testdata/releases/download/const/const-windows,2,raw,const-windows
const-linux,https://github.com/Zxilly/go-testdata/releases/download/const/const-linux,2,raw,const-linux
const-macos,https://github.com/Zxilly/go-testdata/releases/download/const/const-macos,2,raw,const-macos
Expand Down
124 changes: 61 additions & 63 deletions scripts/generate.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import csv
import itertools
from concurrent.futures import ThreadPoolExecutor

import requests
Expand Down Expand Up @@ -43,42 +44,41 @@ def generate_cockroachdb() -> list[RemoteBinary]:
def generate_kubernetes() -> list[RemoteBinary]:
ret = []

for o in ["windows", "linux", "darwin"]:
for a in ["amd64", "arm64", "386"]:
if o == "darwin" and a == "386":
continue
# kubectl 部分
kubectl_oses = ["windows", "linux", "darwin"]
kubectl_archs = ["amd64", "arm64", "386"]

name = f"kubectl-{o}-{a}"
url = f"https://dl.k8s.io/v1.30.1/bin/{o}/{a}/kubectl"
if o == "windows":
url += ".exe"
ret.append(
RemoteBinary(
name,
url,
TestType.JSON_TEST,
RemoteBinaryType.RAW,
[
Target(None, name)
]
)
)
for o, a in itertools.product(kubectl_oses, kubectl_archs):
if o == "darwin" and a == "386":
continue

for n in ["kube-proxy", "kube-apiserver"]:
for a in ["amd64", "arm64"]:
name = f"{n}-{a}"
url = f"https://dl.k8s.io/v1.30.1/bin/linux/{a}/{n}"
ret.append(
RemoteBinary(
name,
url,
TestType.JSON_TEST,
RemoteBinaryType.RAW,
[
Target(None, name)
]
)
)
name = f"kubectl-{o}-{a}"
url = f"https://dl.k8s.io/v1.30.1/bin/{o}/{a}/kubectl"
url += ".exe" if o == "windows" else ""

ret.append(RemoteBinary(
name,
url,
TestType.JSON_TEST,
RemoteBinaryType.RAW,
[Target(None, name)]
))

# kube-proxy 和 kube-apiserver 部分
kube_components = ["kube-proxy", "kube-apiserver"]
kube_archs = ["amd64", "arm64"]

for n, a in itertools.product(kube_components, kube_archs):
name = f"{n}-{a}"
url = f"https://dl.k8s.io/v1.30.1/bin/linux/{a}/{n}"

ret.append(RemoteBinary(
name,
url,
TestType.JSON_TEST,
RemoteBinaryType.RAW,
[Target(None, name)]
))

return ret

Expand Down Expand Up @@ -128,36 +128,34 @@ def generate_vitess() -> list[RemoteBinary]:


def generate_example() -> list[RemoteBinary]:
versions = ["1.21", "1.22", "1.23"]
oses = ["linux", "windows", "darwin"]
pies = ["-pie", ""]
cgos = ["-cgo", ""]
archs = ["amd64", "arm64", "386"]
strips = ["-strip", "-stripdwarf", ""]

ret = []
for v in ["1.21", "1.22"]:
for o in ["linux", "windows", "darwin"]:
for pie in ["-pie", ""]:
for cgo in ["-cgo", ""]:
for a in ["amd64", "arm64", "386"]:
for s in ["-strip", "-stripdwarf", ""]:
if pie == "-pie" and cgo == "":
continue

if o == "darwin" and a == "386":
continue

if o == "windows" and a == "arm64":
continue

name = f"bin-{o}-{v}-{a}{s}{pie}{cgo}"
url = get_example_download_url(name)

if url is None:
continue

ret.append(
RemoteBinary(
name,
get_example_download_url(name),
TestType.TEXT_TEST | TestType.JSON_TEST | TestType.HTML_TEST | TestType.SVG_TEST,
RemoteBinaryType.RAW,
)
)
for v, o, pie, cgo, a, s in itertools.product(versions, oses, pies, cgos, archs, strips):
if (pie == "-pie" and cgo == "") or \
(o == "darwin" and a == "386") or \
(o == "windows" and a == "arm64"):
continue

name = f"bin-{o}-{v}-{a}{s}{pie}{cgo}"
url = get_example_download_url(name)

if url is None:
continue

ret.append(
RemoteBinary(
name,
url,
TestType.TEXT_TEST | TestType.JSON_TEST | TestType.HTML_TEST | TestType.SVG_TEST,
RemoteBinaryType.RAW,
)
)

return ret

Expand Down

0 comments on commit ea0782e

Please sign in to comment.