diff --git a/scripts/binaries.csv b/scripts/binaries.csv index 8daab3d5f1..e2d4415dca 100644 --- a/scripts/binaries.csv +++ b/scripts/binaries.csv @@ -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 diff --git a/scripts/generate.py b/scripts/generate.py index 2304ed49a2..784406c8cc 100644 --- a/scripts/generate.py +++ b/scripts/generate.py @@ -1,4 +1,5 @@ import csv +import itertools from concurrent.futures import ThreadPoolExecutor import requests @@ -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 @@ -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