[infra] More gen_tasks tweaks
Behavioral changes: - CreateDockerImage and PushAppsFrom*DockerImage tasks no longer get go or protoc assets and caches. - Skpbench on desktop uses CIPD packages for [m]skp, rather than the isolated versions. Change-Id: I0532546be9a4a79434b2d2017061322884ba11fb Reviewed-on: https://skia-review.googlesource.com/c/skia/+/275956 Reviewed-by: Kevin Lubick <kjlubick@google.com> Reviewed-by: Ravi Mistry <rmistry@google.com> Commit-Queue: Eric Boren <borenet@google.com>
This commit is contained in:
parent
4cf2ab6ffe
commit
8a05d23363
@ -161,6 +161,7 @@ var (
|
||||
path: "android_sdk_linux",
|
||||
},
|
||||
"win_toolchain": {
|
||||
alwaysIsolate: true,
|
||||
isolateTaskName: ISOLATE_WIN_TOOLCHAIN_NAME,
|
||||
path: "win_toolchain",
|
||||
},
|
||||
@ -854,10 +855,8 @@ func (b *jobBuilder) createDockerImage(wasm bool) string {
|
||||
|
||||
// Add the task.
|
||||
b.addTask(taskName, func(b *taskBuilder) {
|
||||
// TODO(borenet): Why does this task need go?
|
||||
b.usesGo()
|
||||
// TODO(borenet): Why does this task need protoc?
|
||||
b.asset("protoc")
|
||||
// TODO(borenet): Make this task not use Git.
|
||||
b.usesGit()
|
||||
b.cmd(
|
||||
"./build_push_docker_image",
|
||||
"--image_name", fmt.Sprintf("gcr.io/skia-public/%s", imageName),
|
||||
@ -890,10 +889,8 @@ func (b *jobBuilder) createDockerImage(wasm bool) string {
|
||||
// (eg: fiddler, debugger, api) using the skia-release docker image.
|
||||
func (b *jobBuilder) createPushAppsFromSkiaDockerImage() {
|
||||
b.addTask(b.Name, func(b *taskBuilder) {
|
||||
// TODO(borenet): Why does this task need go?
|
||||
b.usesGo()
|
||||
// TODO(borenet): Why does this task need protoc?
|
||||
b.asset("protoc")
|
||||
// TODO(borenet): Make this task not use Git.
|
||||
b.usesGit()
|
||||
b.cmd(
|
||||
"./push_apps_from_skia_image",
|
||||
"--project_id", "skia-swarming-bots",
|
||||
@ -923,10 +920,8 @@ func (b *jobBuilder) createPushAppsFromSkiaDockerImage() {
|
||||
// (eg: jsfiddle, skottie, particles) using the skia-wasm-release docker image.
|
||||
func (b *jobBuilder) createPushAppsFromWASMDockerImage() {
|
||||
b.addTask(b.Name, func(b *taskBuilder) {
|
||||
// TODO(borenet): Why does this task need go?
|
||||
b.usesGo()
|
||||
// TODO(borenet): Why does this task need protoc?
|
||||
b.asset("protoc")
|
||||
// TODO(borenet): Make this task not use Git.
|
||||
b.usesGit()
|
||||
b.cmd(
|
||||
"./push_apps_from_wasm_image",
|
||||
"--project_id", "skia-swarming-bots",
|
||||
@ -957,10 +952,8 @@ func (b *jobBuilder) createPushAppsFromWASMDockerImage() {
|
||||
// docker images.
|
||||
func (b *jobBuilder) createPushAppsFromSkiaWASMDockerImages() {
|
||||
b.addTask(b.Name, func(b *taskBuilder) {
|
||||
// TODO(borenet): Why does this task need go?
|
||||
b.usesGo()
|
||||
// TODO(borenet): Why does this task need protoc?
|
||||
b.asset("protoc")
|
||||
// TODO(borenet): Make this task not use Git.
|
||||
b.usesGit()
|
||||
b.cmd(
|
||||
"./push_apps_from_skia_wasm_images",
|
||||
"--project_id", "skia-swarming-bots",
|
||||
|
@ -66,7 +66,7 @@ func (b *jobBuilder) isolateCIPDAsset(asset string) string {
|
||||
log.Fatalf("No isolate task for asset %q", asset)
|
||||
}
|
||||
b.addTask(cfg.isolateTaskName, func(b *taskBuilder) {
|
||||
b.asset(asset)
|
||||
b.cipd(b.MustGetCipdPackageFromAsset(asset))
|
||||
b.cmd("/bin/cp", "-rL", cfg.path, "${ISOLATED_OUTDIR}")
|
||||
b.linuxGceDimensions(MACHINE_TYPE_SMALL)
|
||||
b.idempotent()
|
||||
|
@ -155,26 +155,18 @@ func (b *taskBuilder) cipd(pkgs ...*specs.CipdPackage) {
|
||||
// useIsolatedAssets returns true if this task should use assets which are
|
||||
// isolated rather than downloading directly from CIPD.
|
||||
func (b *taskBuilder) useIsolatedAssets() bool {
|
||||
// TODO(borenet): Do we need the isolate tasks for non-RPi Skpbench?
|
||||
if b.extraConfig("Skpbench") {
|
||||
return true
|
||||
}
|
||||
// Only do this on the RPIs for now. Other, faster machines shouldn't
|
||||
// see much benefit and we don't need the extra complexity, for now.
|
||||
if b.os("Android", "ChromeOS", "iOS") {
|
||||
return true
|
||||
}
|
||||
// TODO(borenet): Do we need the isolate tasks for Windows builds?
|
||||
if b.matchOs("Win") && b.role("Build") {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// isolateAssetConfig represents a task which copies a CIPD package into
|
||||
// isolate.
|
||||
type isolateAssetCfg struct {
|
||||
alwaysIsolate bool
|
||||
isolateTaskName string
|
||||
path string
|
||||
}
|
||||
@ -184,7 +176,7 @@ func (b *taskBuilder) asset(assets ...string) {
|
||||
shouldIsolate := b.useIsolatedAssets()
|
||||
pkgs := make([]*specs.CipdPackage, 0, len(assets))
|
||||
for _, asset := range assets {
|
||||
if _, ok := ISOLATE_ASSET_MAPPING[asset]; ok && shouldIsolate {
|
||||
if cfg, ok := ISOLATE_ASSET_MAPPING[asset]; ok && (cfg.alwaysIsolate || shouldIsolate) {
|
||||
b.dep(b.isolateCIPDAsset(asset))
|
||||
} else {
|
||||
pkgs = append(pkgs, b.MustGetCipdPackageFromAsset(asset))
|
||||
|
@ -15169,14 +15169,6 @@
|
||||
{
|
||||
"name": "docker",
|
||||
"path": "cache/docker"
|
||||
},
|
||||
{
|
||||
"name": "go_cache",
|
||||
"path": "cache/go_cache"
|
||||
},
|
||||
{
|
||||
"name": "gopath",
|
||||
"path": "cache/gopath"
|
||||
}
|
||||
],
|
||||
"cipd_packages": [
|
||||
@ -15194,16 +15186,6 @@
|
||||
"name": "infra/tools/luci/git-credential-luci/${platform}",
|
||||
"path": "cipd_bin_packages",
|
||||
"version": "git_revision:27f8448ba7ae1dd64574aefa41b762c3d22a42f4"
|
||||
},
|
||||
{
|
||||
"name": "skia/bots/go",
|
||||
"path": "go",
|
||||
"version": "version:8"
|
||||
},
|
||||
{
|
||||
"name": "skia/bots/protoc",
|
||||
"path": "protoc",
|
||||
"version": "version:0"
|
||||
}
|
||||
],
|
||||
"command": [
|
||||
@ -15264,14 +15246,6 @@
|
||||
{
|
||||
"name": "docker",
|
||||
"path": "cache/docker"
|
||||
},
|
||||
{
|
||||
"name": "go_cache",
|
||||
"path": "cache/go_cache"
|
||||
},
|
||||
{
|
||||
"name": "gopath",
|
||||
"path": "cache/gopath"
|
||||
}
|
||||
],
|
||||
"cipd_packages": [
|
||||
@ -15289,16 +15263,6 @@
|
||||
"name": "infra/tools/luci/git-credential-luci/${platform}",
|
||||
"path": "cipd_bin_packages",
|
||||
"version": "git_revision:27f8448ba7ae1dd64574aefa41b762c3d22a42f4"
|
||||
},
|
||||
{
|
||||
"name": "skia/bots/go",
|
||||
"path": "go",
|
||||
"version": "version:8"
|
||||
},
|
||||
{
|
||||
"name": "skia/bots/protoc",
|
||||
"path": "protoc",
|
||||
"version": "version:0"
|
||||
}
|
||||
],
|
||||
"command": [
|
||||
@ -15722,14 +15686,6 @@
|
||||
{
|
||||
"name": "docker",
|
||||
"path": "cache/docker"
|
||||
},
|
||||
{
|
||||
"name": "go_cache",
|
||||
"path": "cache/go_cache"
|
||||
},
|
||||
{
|
||||
"name": "gopath",
|
||||
"path": "cache/gopath"
|
||||
}
|
||||
],
|
||||
"cipd_packages": [
|
||||
@ -15747,16 +15703,6 @@
|
||||
"name": "infra/tools/luci/git-credential-luci/${platform}",
|
||||
"path": "cipd_bin_packages",
|
||||
"version": "git_revision:27f8448ba7ae1dd64574aefa41b762c3d22a42f4"
|
||||
},
|
||||
{
|
||||
"name": "skia/bots/go",
|
||||
"path": "go",
|
||||
"version": "version:8"
|
||||
},
|
||||
{
|
||||
"name": "skia/bots/protoc",
|
||||
"path": "protoc",
|
||||
"version": "version:0"
|
||||
}
|
||||
],
|
||||
"command": [
|
||||
@ -15812,14 +15758,6 @@
|
||||
{
|
||||
"name": "docker",
|
||||
"path": "cache/docker"
|
||||
},
|
||||
{
|
||||
"name": "go_cache",
|
||||
"path": "cache/go_cache"
|
||||
},
|
||||
{
|
||||
"name": "gopath",
|
||||
"path": "cache/gopath"
|
||||
}
|
||||
],
|
||||
"cipd_packages": [
|
||||
@ -15837,16 +15775,6 @@
|
||||
"name": "infra/tools/luci/git-credential-luci/${platform}",
|
||||
"path": "cipd_bin_packages",
|
||||
"version": "git_revision:27f8448ba7ae1dd64574aefa41b762c3d22a42f4"
|
||||
},
|
||||
{
|
||||
"name": "skia/bots/go",
|
||||
"path": "go",
|
||||
"version": "version:8"
|
||||
},
|
||||
{
|
||||
"name": "skia/bots/protoc",
|
||||
"path": "protoc",
|
||||
"version": "version:0"
|
||||
}
|
||||
],
|
||||
"command": [
|
||||
@ -15903,14 +15831,6 @@
|
||||
{
|
||||
"name": "docker",
|
||||
"path": "cache/docker"
|
||||
},
|
||||
{
|
||||
"name": "go_cache",
|
||||
"path": "cache/go_cache"
|
||||
},
|
||||
{
|
||||
"name": "gopath",
|
||||
"path": "cache/gopath"
|
||||
}
|
||||
],
|
||||
"cipd_packages": [
|
||||
@ -15928,16 +15848,6 @@
|
||||
"name": "infra/tools/luci/git-credential-luci/${platform}",
|
||||
"path": "cipd_bin_packages",
|
||||
"version": "git_revision:27f8448ba7ae1dd64574aefa41b762c3d22a42f4"
|
||||
},
|
||||
{
|
||||
"name": "skia/bots/go",
|
||||
"path": "go",
|
||||
"version": "version:8"
|
||||
},
|
||||
{
|
||||
"name": "skia/bots/protoc",
|
||||
"path": "protoc",
|
||||
"version": "version:0"
|
||||
}
|
||||
],
|
||||
"command": [
|
||||
@ -23198,6 +23108,16 @@
|
||||
"name": "infra/tools/luci/vpython/${platform}",
|
||||
"path": "cipd_bin_packages",
|
||||
"version": "git_revision:27f8448ba7ae1dd64574aefa41b762c3d22a42f4"
|
||||
},
|
||||
{
|
||||
"name": "skia/bots/mskp",
|
||||
"path": "mskp",
|
||||
"version": "version:2"
|
||||
},
|
||||
{
|
||||
"name": "skia/bots/skp",
|
||||
"path": "skp",
|
||||
"version": "version:228"
|
||||
}
|
||||
],
|
||||
"command": [
|
||||
@ -23211,9 +23131,7 @@
|
||||
],
|
||||
"dependencies": [
|
||||
"Build-Win-Clang-x86_64-Release-Vulkan",
|
||||
"Housekeeper-PerCommit-BundleRecipes",
|
||||
"Housekeeper-PerCommit-IsolateMSKP",
|
||||
"Housekeeper-PerCommit-IsolateSKP"
|
||||
"Housekeeper-PerCommit-BundleRecipes"
|
||||
],
|
||||
"dimensions": [
|
||||
"gpu:10de:1cb3-25.21.14.1678",
|
||||
@ -23268,6 +23186,16 @@
|
||||
"name": "infra/tools/luci/vpython/${platform}",
|
||||
"path": "cipd_bin_packages",
|
||||
"version": "git_revision:27f8448ba7ae1dd64574aefa41b762c3d22a42f4"
|
||||
},
|
||||
{
|
||||
"name": "skia/bots/mskp",
|
||||
"path": "mskp",
|
||||
"version": "version:2"
|
||||
},
|
||||
{
|
||||
"name": "skia/bots/skp",
|
||||
"path": "skp",
|
||||
"version": "version:228"
|
||||
}
|
||||
],
|
||||
"command": [
|
||||
@ -23281,9 +23209,7 @@
|
||||
],
|
||||
"dependencies": [
|
||||
"Build-Win-Clang-x86_64-Release-Vulkan",
|
||||
"Housekeeper-PerCommit-BundleRecipes",
|
||||
"Housekeeper-PerCommit-IsolateMSKP",
|
||||
"Housekeeper-PerCommit-IsolateSKP"
|
||||
"Housekeeper-PerCommit-BundleRecipes"
|
||||
],
|
||||
"dimensions": [
|
||||
"gpu:10de:1cb3-25.21.14.1678",
|
||||
|
Loading…
Reference in New Issue
Block a user