[infra] Switch from isolate to RBE-CAS
Bug: skia:10883 Change-Id: I4bab202c89253248b7c93d23540038f83af97d33 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/340100 Commit-Queue: Eric Boren <borenet@google.com> Reviewed-by: Weston Tracey <westont@google.com>
This commit is contained in:
parent
554e7574e9
commit
03d69876ff
22
PRESUBMIT.py
22
PRESUBMIT.py
@ -201,27 +201,6 @@ def _CheckIncludesFormatted(input_api, output_api):
|
||||
return [output_api.PresubmitError('`%s` failed' % ' '.join(cmd))]
|
||||
return []
|
||||
|
||||
def _CheckCompileIsolate(input_api, output_api):
|
||||
"""Ensure that gen_compile_isolate.py does not change compile.isolate."""
|
||||
# Only run the check if files were added or removed.
|
||||
results = []
|
||||
script = os.path.join('infra', 'bots', 'gen_compile_isolate.py')
|
||||
isolate = os.path.join('infra', 'bots', 'compile.isolated')
|
||||
for f in input_api.AffectedFiles():
|
||||
if f.Action() in ('A', 'D', 'R'):
|
||||
break
|
||||
if f.LocalPath() in (script, isolate):
|
||||
break
|
||||
else:
|
||||
return results
|
||||
|
||||
cmd = ['python', script, 'test']
|
||||
try:
|
||||
subprocess.check_output(cmd, stderr=subprocess.STDOUT)
|
||||
except subprocess.CalledProcessError as e:
|
||||
results.append(output_api.PresubmitError(e.output))
|
||||
return results
|
||||
|
||||
|
||||
class _WarningsAsErrors():
|
||||
def __init__(self, output_api):
|
||||
@ -276,7 +255,6 @@ def _CommonChecks(input_api, output_api):
|
||||
results.extend(_IfDefChecks(input_api, output_api))
|
||||
results.extend(_CopyrightChecks(input_api, output_api,
|
||||
source_file_filter=sources))
|
||||
results.extend(_CheckCompileIsolate(input_api, output_api))
|
||||
results.extend(_CheckDEPSValid(input_api, output_api))
|
||||
results.extend(_CheckIncludesFormatted(input_api, output_api))
|
||||
results.extend(_CheckGNFormatted(input_api, output_api))
|
||||
|
18
go.mod
18
go.mod
@ -12,13 +12,11 @@ require (
|
||||
github.com/Microsoft/go-winio v0.4.15 // indirect
|
||||
github.com/VividCortex/godaemon v0.0.0-20150910212227-3d9f6e0b234f // indirect
|
||||
github.com/andygrunwald/go-gerrit v0.0.0-20200503132804-ed2419acda39
|
||||
github.com/bazelbuild/remote-apis v0.0.0-20201113154229-1e9ccef3705c // indirect
|
||||
github.com/bazelbuild/remote-apis-sdks v0.0.0-20201120151053-8f976b9bf4fc // indirect
|
||||
github.com/boltdb/bolt v1.3.1 // indirect
|
||||
github.com/flynn/json5 v0.0.0-20160717195620-7620272ed633
|
||||
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b
|
||||
github.com/google/addlicense v0.0.0-20190510175307-22550fa7c1b0 // indirect
|
||||
github.com/google/go-cmp v0.5.3 // indirect
|
||||
github.com/google/go-cmp v0.5.4 // indirect
|
||||
github.com/google/licenseclassifier v0.0.0-20201113175434-78a70215ca36 // indirect
|
||||
github.com/google/uuid v1.1.2
|
||||
github.com/huin/goserial v0.0.0-20121012073615-7b90efdb22b1 // indirect
|
||||
@ -36,17 +34,19 @@ require (
|
||||
github.com/stretchr/testify v1.6.1
|
||||
github.com/vektra/mockery v1.1.2 // indirect
|
||||
github.com/xanzy/ssh-agent v0.3.0 // indirect
|
||||
go.chromium.org/luci v0.0.0-20201121231857-b9ab316d7198 // indirect
|
||||
go.chromium.org/luci v0.0.0-20201202134105-6d694edf1d32 // indirect
|
||||
go.skia.org/infra v0.0.0-20201207203943-872c83842f7f
|
||||
golang.org/x/crypto v0.0.0-20201117144127-c1f2f97bffc9
|
||||
golang.org/x/crypto v0.0.0-20201124201722-c8d3bf9c5392
|
||||
golang.org/x/exp v0.0.0-20200228211341-fcea875c7e85 // indirect
|
||||
golang.org/x/image v0.0.0-20191009234506-e7c1f5e7dbb8 // indirect
|
||||
golang.org/x/net v0.0.0-20201110031124-69a78807bb2b // indirect
|
||||
golang.org/x/mod v0.4.0 // indirect
|
||||
golang.org/x/net v0.0.0-20201201195509-5d6afe98e0b7 // indirect
|
||||
golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58
|
||||
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68 // indirect
|
||||
golang.org/x/tools v0.0.0-20201121010211-780cb80bd7fb // indirect
|
||||
golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3 // indirect
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 // indirect
|
||||
golang.org/x/tools v0.0.0-20201202100533-7534955ac86b // indirect
|
||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1
|
||||
google.golang.org/api v0.35.0
|
||||
google.golang.org/genproto v0.0.0-20201119123407-9b1e624d6bc4 // indirect
|
||||
google.golang.org/genproto v0.0.0-20201202151023-55d61f90c1ce // indirect
|
||||
sigs.k8s.io/structured-merge-diff v0.0.0-20190525122527-15d366b2352e // indirect
|
||||
)
|
||||
|
26
go.sum
26
go.sum
@ -286,6 +286,10 @@ github.com/bazelbuild/remote-apis-sdks v0.0.0-20201117200903-8ec2ee2346e2 h1:hZb
|
||||
github.com/bazelbuild/remote-apis-sdks v0.0.0-20201118210229-b732553f9d45 h1:w/E5Tqx2yumJ5+wYa4Jekq3lr57DmxrSc+xD3SaY13k=
|
||||
github.com/bazelbuild/remote-apis-sdks v0.0.0-20201120151053-8f976b9bf4fc h1:T8tt5LPzm/nE/+DdopIs+6qOOAUNme01K7+d5y5lkxc=
|
||||
github.com/bazelbuild/remote-apis-sdks v0.0.0-20201120151053-8f976b9bf4fc/go.mod h1:SvHtabqK9r562BLgmQfd+s5hzd9UUS903b0OmQHvzrI=
|
||||
github.com/bazelbuild/remote-apis-sdks v0.0.0-20201130212440-f4871fb981c0 h1:WVXNCIBQSaGe8aB5qZQUE4lWbG3SSY2jzN8UOjuCdN8=
|
||||
github.com/bazelbuild/remote-apis-sdks v0.0.0-20201130212440-f4871fb981c0/go.mod h1:ahIZpzFN9NO6j+ipRrTNL96jIgmxySfJHvQaoLAyuXs=
|
||||
github.com/bazelbuild/remote-apis-sdks v0.0.0-20201203174028-110bf499050c h1:kULAbeyGlF97BjUuLognIUfLngBHpApmKP36lIzMdIg=
|
||||
github.com/bazelbuild/remote-apis-sdks v0.0.0-20201203174028-110bf499050c/go.mod h1:ahIZpzFN9NO6j+ipRrTNL96jIgmxySfJHvQaoLAyuXs=
|
||||
github.com/bazelbuild/rules_go v0.0.0-20190719190356-6dae44dc5cab/go.mod h1:MC23Dc/wkXEyk3Wpq6lCqz0ZAYOZDw2DR5y3N1q2i7M=
|
||||
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
|
||||
github.com/beorn7/perks v1.0.0 h1:HWo1m869IqiPhD389kmkxeTalrjNbbJTC8LXupb+sl0=
|
||||
@ -552,6 +556,8 @@ github.com/google/go-cmp v0.5.2 h1:X2ev0eStA3AbceY54o37/0PQ/UWqKEiiO2dKL5OPaFM=
|
||||
github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.3 h1:x95R7cp+rSeeqAMI2knLtQ0DKlaBhv2NrtrOvafPHRo=
|
||||
github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.4 h1:L8R9j+yAqZuZjsqh/z+F1NCffTKKLShY6zXTItVIZ8M=
|
||||
github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-github v17.0.0+incompatible h1:N0LgJ1j65A7kfXrZnUDaYCs/Sf4rEjNlfyDHW9dolSY=
|
||||
github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ=
|
||||
github.com/google/go-github/v29 v29.0.3 h1:IktKCTwU//aFHnpA+2SLIi7Oo9uhAzgsdZNbcAqhgdc=
|
||||
@ -1391,6 +1397,8 @@ go.chromium.org/luci v0.0.0-20201030140206-3cb383bad2fa h1:3AtmNweHUJIaa8shx7Phd
|
||||
go.chromium.org/luci v0.0.0-20201030140206-3cb383bad2fa/go.mod h1:MIQewVTLvOvc0UioV0JNqTNO/RspKFS0XEeoKrOxsdM=
|
||||
go.chromium.org/luci v0.0.0-20201121231857-b9ab316d7198 h1:Qe0s5XpxD36QC+7OVnc1Ce8igF3sfTo3f3ad4WKEpNo=
|
||||
go.chromium.org/luci v0.0.0-20201121231857-b9ab316d7198/go.mod h1:MIQewVTLvOvc0UioV0JNqTNO/RspKFS0XEeoKrOxsdM=
|
||||
go.chromium.org/luci v0.0.0-20201202134105-6d694edf1d32 h1:vs2BTGQOF7+q0QwOj3RdG3PEXey0LK1+D7XltwRrfOw=
|
||||
go.chromium.org/luci v0.0.0-20201202134105-6d694edf1d32/go.mod h1:MIQewVTLvOvc0UioV0JNqTNO/RspKFS0XEeoKrOxsdM=
|
||||
go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
|
||||
go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
|
||||
go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg=
|
||||
@ -1540,6 +1548,10 @@ go.skia.org/infra v0.0.0-20201124180436-e5c4a9cfc497 h1:e+mgl62r///L7xONfLvHoICW
|
||||
go.skia.org/infra v0.0.0-20201124180436-e5c4a9cfc497/go.mod h1:oFkIcc1CyrdaKdUCEdzTaEYrZ5VQilTafssIyqmDX5c=
|
||||
go.skia.org/infra v0.0.0-20201207203943-872c83842f7f h1:YYw8uJAhrDhZEeADqP1VRIhGwbXLc85CAbRssIRn3po=
|
||||
go.skia.org/infra v0.0.0-20201207203943-872c83842f7f/go.mod h1:Y9eqtwoOyMrt8v6BhHkKeowb5NtwW0QS7acq62C5hYA=
|
||||
go.skia.org/infra v0.0.0-20201202154606-0465c3c93699 h1:1Y4qJn9QboZrrux7v+/q4OonFk0SOpPc+Hb4DwcPfOk=
|
||||
go.skia.org/infra v0.0.0-20201202154606-0465c3c93699/go.mod h1:oFkIcc1CyrdaKdUCEdzTaEYrZ5VQilTafssIyqmDX5c=
|
||||
go.skia.org/infra v0.0.0-20201204114949-38985f19dfd1 h1:x1rKLSwjyk52Ns/iLX/efd7aIWgsK8EFfeoe3FIP3y4=
|
||||
go.skia.org/infra v0.0.0-20201204114949-38985f19dfd1/go.mod h1:Y9eqtwoOyMrt8v6BhHkKeowb5NtwW0QS7acq62C5hYA=
|
||||
go.starlark.net v0.0.0-20201118183435-e55f603d8c79/go.mod h1:5YFcFnRptTN+41758c2bMPiqpGg4zBfYji1IQz8wNFk=
|
||||
go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
|
||||
go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
|
||||
@ -1602,6 +1614,8 @@ golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897 h1:pLI5jrR7OSLijeIDcmRxNm
|
||||
golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/crypto v0.0.0-20201117144127-c1f2f97bffc9 h1:phUcVbl53swtrUN8kQEXFhUxPlIlWyBfKmidCu7P95o=
|
||||
golang.org/x/crypto v0.0.0-20201117144127-c1f2f97bffc9/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I=
|
||||
golang.org/x/crypto v0.0.0-20201124201722-c8d3bf9c5392 h1:xYJJ3S178yv++9zXV/hnr29plCAGO9vAFG9dorqaFQc=
|
||||
golang.org/x/crypto v0.0.0-20201124201722-c8d3bf9c5392/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I=
|
||||
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
|
||||
@ -1649,6 +1663,8 @@ golang.org/x/mod v0.2.0 h1:KU7oHjnv3XNWfa5COkzUifxZmxp1TyI7ImMXqFxLwvQ=
|
||||
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/mod v0.3.0 h1:RM4zey1++hCTbCVQfnWeKs9/IEsaBLA8vTkd0WVtmH4=
|
||||
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/mod v0.4.0 h1:8pl+sMODzuvGJkmj2W4kZihvVb5mKm8pB/X44PIQHv8=
|
||||
golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20180218175443-cbe0f9307d01/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
@ -1731,6 +1747,8 @@ golang.org/x/net v0.0.0-20201029221708-28c70e62bb1d/go.mod h1:sp8m0HH+o8qH0wwXwY
|
||||
golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
||||
golang.org/x/net v0.0.0-20201110031124-69a78807bb2b h1:uwuIcX0g4Yl1NC5XAz37xsr2lTtcqevgzYNVt49waME=
|
||||
golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
||||
golang.org/x/net v0.0.0-20201201195509-5d6afe98e0b7 h1:3uJsdck53FDIpWwLeAXlia9p4C8j0BO2xZrqzKpL0D8=
|
||||
golang.org/x/net v0.0.0-20201201195509-5d6afe98e0b7/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
||||
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
||||
golang.org/x/oauth2 v0.0.0-20181106182150-f42d05182288/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
||||
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
@ -1874,8 +1892,12 @@ golang.org/x/sys v0.0.0-20201029080932-201ba4db2418 h1:HlFl4V6pEMziuLXyRkm5BIYq1
|
||||
golang.org/x/sys v0.0.0-20201029080932-201ba4db2418/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68 h1:nxC68pudNYkKU6jWhgrqdreuFiOQWj1Fs7T3VrH4Pjw=
|
||||
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3 h1:kzM6+9dur93BcC2kVlYl34cHU+TYZLanmpSJHVMmL64=
|
||||
golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221 h1:/ZHdbVpdR/jk3g30/d4yUL0JU9kksj8+F/bnQUVLGDM=
|
||||
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 h1:v+OssWQX+hTHEmOBgwxdZxK4zHq3yOs8F9J7mk0PY8E=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
@ -2098,6 +2120,8 @@ golang.org/x/tools v0.0.0-20201030160639-589136c8afd9/go.mod h1:emZCQorbCU4vsT4f
|
||||
golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
||||
golang.org/x/tools v0.0.0-20201121010211-780cb80bd7fb h1:z5+u0pkAUPUWd3taoTialQ2JAMo4Wo1Z3L25U4ZV9r0=
|
||||
golang.org/x/tools v0.0.0-20201121010211-780cb80bd7fb/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
||||
golang.org/x/tools v0.0.0-20201202100533-7534955ac86b h1:nOM4+lFhnC6uxSrRnxjZ4Azu1bF9DQz5rAsb3LUErhc=
|
||||
golang.org/x/tools v0.0.0-20201202100533-7534955ac86b/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
||||
golang.org/x/xerrors v0.0.0-20190410155217-1f06c39b4373/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20190513163551-3ee3066db522/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
@ -2309,6 +2333,8 @@ google.golang.org/genproto v0.0.0-20201030142918-24207fddd1c3/go.mod h1:FWY/as6D
|
||||
google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
|
||||
google.golang.org/genproto v0.0.0-20201119123407-9b1e624d6bc4 h1:Rt0FRalMgdSlXAVJvX4pr65KfqaxHXSLkSJRD9pw6g0=
|
||||
google.golang.org/genproto v0.0.0-20201119123407-9b1e624d6bc4/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
|
||||
google.golang.org/genproto v0.0.0-20201202151023-55d61f90c1ce h1:iS2R2xZpNiQFZrGqWisFYEYzOyKzvz07am2h/QXKqoY=
|
||||
google.golang.org/genproto v0.0.0-20201202151023-55d61f90c1ce/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
|
||||
google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs=
|
||||
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
|
||||
google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM=
|
||||
|
@ -1,7 +0,0 @@
|
||||
{
|
||||
'variables': {
|
||||
'files': [
|
||||
'assets/',
|
||||
],
|
||||
},
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
{
|
||||
'includes': [
|
||||
'swarm_recipe.isolate',
|
||||
],
|
||||
'variables': {
|
||||
'files': [
|
||||
'../../modules/canvaskit',
|
||||
'../../modules/pathkit/perf/perfReporter.js',
|
||||
'../../modules/pathkit/tests/testReporter.js',
|
||||
'../canvaskit',
|
||||
],
|
||||
},
|
||||
}
|
@ -1,49 +0,0 @@
|
||||
{
|
||||
'includes': [
|
||||
'run_recipe.isolate',
|
||||
],
|
||||
'variables': {
|
||||
'files': [
|
||||
'../../../.gclient',
|
||||
'../../.clang-format',
|
||||
'../../.clang-tidy',
|
||||
'../../.gn',
|
||||
'../../BUILD.gn',
|
||||
'../../bench',
|
||||
'../../bin/fetch-clang-format',
|
||||
'../../bin/fetch-gn',
|
||||
'../../build/fuchsia',
|
||||
'../../build_overrides',
|
||||
'../../buildtools',
|
||||
'../../client_utils/android',
|
||||
'../../dm',
|
||||
'../../docs/examples',
|
||||
'../../example',
|
||||
'../../experimental',
|
||||
'../../fuzz',
|
||||
'../../gm',
|
||||
'../../gn',
|
||||
'../../include',
|
||||
'../../modules',
|
||||
'../../platform_tools/android/apps/skottie/skottielib/src/main/cpp/native-lib.cpp',
|
||||
'../../platform_tools/android/launcher/skia_launcher.cpp',
|
||||
'../../platform_tools/android/vulkan/Skia_Vulkan_Android.h',
|
||||
'../../platform_tools/ios/app/LaunchScreen.storyboard',
|
||||
'../../platform_tools/libraries/include/arcore_c_api.h',
|
||||
'../../resources',
|
||||
'../../samplecode',
|
||||
'../../src',
|
||||
'../../tests',
|
||||
'../../third_party',
|
||||
'../../tools',
|
||||
'../canvaskit',
|
||||
'../pathkit',
|
||||
'assets/android_ndk_darwin/VERSION',
|
||||
'assets/android_ndk_linux/VERSION',
|
||||
'assets/android_ndk_windows/VERSION',
|
||||
'assets/cast_toolchain/VERSION',
|
||||
'assets/clang_linux/VERSION',
|
||||
'assets/clang_win/VERSION',
|
||||
],
|
||||
},
|
||||
}
|
@ -1,11 +0,0 @@
|
||||
{
|
||||
'includes': [
|
||||
'infrabots.isolate',
|
||||
'run_recipe.isolate',
|
||||
],
|
||||
'variables': {
|
||||
'files': [
|
||||
'../../../.gclient',
|
||||
],
|
||||
},
|
||||
}
|
@ -1 +0,0 @@
|
||||
{}
|
@ -1,234 +0,0 @@
|
||||
#!/usr/bin/env python
|
||||
#
|
||||
# Copyright 2019 Google LLC
|
||||
#
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
||||
|
||||
import difflib
|
||||
import os
|
||||
import re
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
|
||||
# Any files in Git which match these patterns will be included, either directly
|
||||
# or indirectly via a parent dir.
|
||||
PATH_PATTERNS = [
|
||||
r'.*\.c$',
|
||||
r'.*\.cc$',
|
||||
r'.*\.cpp$',
|
||||
r'.*\.gn$',
|
||||
r'.*\.gni$',
|
||||
r'.*\.h$',
|
||||
r'.*\.mm$',
|
||||
r'.*\.storyboard$',
|
||||
]
|
||||
|
||||
# These paths are always added to the inclusion list. Note that they may not
|
||||
# appear in the isolate if they are included indirectly via a parent dir.
|
||||
EXPLICIT_PATHS = [
|
||||
'../.gclient',
|
||||
'.clang-format',
|
||||
'.clang-tidy',
|
||||
'bin/fetch-clang-format',
|
||||
'bin/fetch-gn',
|
||||
'buildtools',
|
||||
'infra/bots/assets/android_ndk_darwin/VERSION',
|
||||
'infra/bots/assets/android_ndk_linux/VERSION',
|
||||
'infra/bots/assets/android_ndk_windows/VERSION',
|
||||
'infra/bots/assets/cast_toolchain/VERSION',
|
||||
'infra/bots/assets/clang_linux/VERSION',
|
||||
'infra/bots/assets/clang_win/VERSION',
|
||||
'infra/canvaskit',
|
||||
'infra/pathkit',
|
||||
'resources',
|
||||
'third_party/externals',
|
||||
]
|
||||
|
||||
# If a parent path contains more than this many immediate child paths (ie. files
|
||||
# and dirs which are directly inside it as opposed to indirect descendants), we
|
||||
# will include the parent in the isolate file instead of the children. This
|
||||
# results in a simpler isolate file which should need to be changed less often.
|
||||
COMBINE_PATHS_THRESHOLD = 3
|
||||
|
||||
# Template for the isolate file content.
|
||||
ISOLATE_TMPL = '''{
|
||||
'includes': [
|
||||
'run_recipe.isolate',
|
||||
],
|
||||
'variables': {
|
||||
'files': [
|
||||
%s
|
||||
],
|
||||
},
|
||||
}
|
||||
'''
|
||||
|
||||
# Absolute path to the infra/bots dir.
|
||||
INFRABOTS_DIR = os.path.realpath(os.path.dirname(os.path.abspath(__file__)))
|
||||
|
||||
# Absolute path to the compile.isolate file.
|
||||
ISOLATE_FILE = os.path.join(INFRABOTS_DIR, 'compile.isolate')
|
||||
|
||||
|
||||
def all_paths():
|
||||
"""Return all paths which are checked in to git."""
|
||||
repo_root = os.path.abspath(os.path.join(INFRABOTS_DIR, os.pardir, os.pardir))
|
||||
output = subprocess.check_output(['git', 'ls-files'], cwd=repo_root).rstrip()
|
||||
return output.splitlines()
|
||||
|
||||
|
||||
def get_relevant_paths():
|
||||
"""Return all checked-in paths in PATH_PATTERNS or EXPLICIT_PATHS."""
|
||||
paths = []
|
||||
for f in all_paths():
|
||||
for regexp in PATH_PATTERNS:
|
||||
if re.match(regexp, f):
|
||||
paths.append(f)
|
||||
break
|
||||
|
||||
paths.extend(EXPLICIT_PATHS)
|
||||
return paths
|
||||
|
||||
|
||||
class Tree(object):
|
||||
"""Tree helps with deduplicating and collapsing paths."""
|
||||
class Node(object):
|
||||
"""Node represents an individual node in a Tree."""
|
||||
def __init__(self, name):
|
||||
self._children = {}
|
||||
self._name = name
|
||||
self._is_leaf = False
|
||||
|
||||
@property
|
||||
def is_root(self):
|
||||
"""Return True iff this is the root node."""
|
||||
return self._name is None
|
||||
|
||||
def add(self, entry):
|
||||
"""Add the given entry (given as a list of strings) to the Node."""
|
||||
# Remove the first element if we're not the root node.
|
||||
if not self.is_root:
|
||||
if entry[0] != self._name:
|
||||
raise ValueError('Cannot add a non-matching entry to a Node!')
|
||||
entry = entry[1:]
|
||||
|
||||
# If the entry is now empty, this node is a leaf.
|
||||
if not entry:
|
||||
self._is_leaf = True
|
||||
return
|
||||
|
||||
# Add a child node.
|
||||
if not self._is_leaf:
|
||||
child = self._children.get(entry[0])
|
||||
if not child:
|
||||
child = Tree.Node(entry[0])
|
||||
self._children[entry[0]] = child
|
||||
child.add(entry)
|
||||
|
||||
# If we have more than COMBINE_PATHS_THRESHOLD immediate children,
|
||||
# combine them into this node.
|
||||
immediate_children = 0
|
||||
for child in self._children.itervalues():
|
||||
if child._is_leaf:
|
||||
immediate_children += 1
|
||||
if not self.is_root and immediate_children >= COMBINE_PATHS_THRESHOLD:
|
||||
self._is_leaf = True
|
||||
self._children = {}
|
||||
|
||||
def entries(self):
|
||||
"""Return the entries represented by this node and its children.
|
||||
|
||||
Will not return children in the following cases:
|
||||
- This Node is a leaf, ie. it represents an entry which was explicitly
|
||||
inserted into the Tree, as opposed to only part of a path to other
|
||||
entries.
|
||||
- This Node has immediate children exceeding COMBINE_PATHS_THRESHOLD and
|
||||
thus has been upgraded to a leaf node.
|
||||
"""
|
||||
if self._is_leaf:
|
||||
return [self._name]
|
||||
rv = []
|
||||
for child in self._children.itervalues():
|
||||
for entry in child.entries():
|
||||
if not self.is_root:
|
||||
entry = self._name + '/' + entry
|
||||
rv.append(entry)
|
||||
return rv
|
||||
|
||||
def __init__(self):
|
||||
self._root = Tree.Node(None)
|
||||
|
||||
def add(self, entry):
|
||||
"""Add the given entry to the tree."""
|
||||
split = entry.split('/')
|
||||
if split[-1] == '':
|
||||
split = split[:-1]
|
||||
self._root.add(split)
|
||||
|
||||
def entries(self):
|
||||
"""Return the list of entries in the tree.
|
||||
|
||||
Entries will be de-duplicated as follows:
|
||||
- Any entry which is a sub-path of another entry will not be returned.
|
||||
- Any entry which was not explicitly inserted but has children exceeding
|
||||
the COMBINE_PATHS_THRESHOLD will be returned while its children will not
|
||||
be returned.
|
||||
"""
|
||||
return self._root.entries()
|
||||
|
||||
|
||||
def relpath(repo_path):
|
||||
"""Return a relative path to the given path within the repo.
|
||||
|
||||
The path is relative to the infra/bots dir, where the compile.isolate file
|
||||
lives.
|
||||
"""
|
||||
repo_path = '../../' + repo_path
|
||||
repo_path = repo_path.replace('../../infra/', '../')
|
||||
repo_path = repo_path.replace('../bots/', '')
|
||||
return repo_path
|
||||
|
||||
|
||||
def get_isolate_content(paths):
|
||||
"""Construct the new content of the isolate file based on the given paths."""
|
||||
lines = [' \'%s\',' % relpath(p) for p in paths]
|
||||
lines.sort()
|
||||
return ISOLATE_TMPL % '\n'.join(lines)
|
||||
|
||||
|
||||
def main():
|
||||
"""Regenerate the compile.isolate file, or verify that it hasn't changed."""
|
||||
testing = False
|
||||
if len(sys.argv) == 2 and sys.argv[1] == 'test':
|
||||
testing = True
|
||||
elif len(sys.argv) != 1:
|
||||
print >> sys.stderr, 'Usage: %s [test]' % sys.argv[0]
|
||||
sys.exit(1)
|
||||
|
||||
tree = Tree()
|
||||
for p in get_relevant_paths():
|
||||
tree.add(p)
|
||||
content = get_isolate_content(tree.entries())
|
||||
|
||||
if testing:
|
||||
with open(ISOLATE_FILE, 'rb') as f:
|
||||
expect_content = f.read()
|
||||
if content != expect_content:
|
||||
print >> sys.stderr, 'Found diff in %s:' % ISOLATE_FILE
|
||||
a = expect_content.splitlines()
|
||||
b = content.splitlines()
|
||||
diff = difflib.context_diff(a, b, lineterm='')
|
||||
for line in diff:
|
||||
sys.stderr.write(line + '\n')
|
||||
print >> sys.stderr, 'You may need to run:\n\n\tpython %s' % sys.argv[0]
|
||||
sys.exit(1)
|
||||
else:
|
||||
with open(ISOLATE_FILE, 'wb') as f:
|
||||
f.write(content)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
224
infra/bots/gen_tasks_logic/compile_cas.go
Normal file
224
infra/bots/gen_tasks_logic/compile_cas.go
Normal file
@ -0,0 +1,224 @@
|
||||
// Copyright 2020 The Chromium Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
package gen_tasks_logic
|
||||
|
||||
import (
|
||||
"log"
|
||||
"os/exec"
|
||||
"regexp"
|
||||
"sort"
|
||||
"strings"
|
||||
|
||||
"go.skia.org/infra/go/cas/rbe"
|
||||
"go.skia.org/infra/task_scheduler/go/specs"
|
||||
)
|
||||
|
||||
const (
|
||||
// If a parent path contains more than this many immediate child paths (ie.
|
||||
// files and dirs which are directly inside it as opposed to indirect
|
||||
// descendants), we will include the parent in the isolate file instead of
|
||||
// the children. This results in a simpler CasSpec which should need to be
|
||||
// changed less often.
|
||||
combinePathsThreshold = 3
|
||||
)
|
||||
|
||||
var (
|
||||
// Any files in Git which match these patterns will be included, either
|
||||
// directly or indirectly via a parent dir.
|
||||
pathRegexes = []*regexp.Regexp{
|
||||
regexp.MustCompile(`.*\.c$`),
|
||||
regexp.MustCompile(`.*\.cc$`),
|
||||
regexp.MustCompile(`.*\.cpp$`),
|
||||
regexp.MustCompile(`.*\.gn$`),
|
||||
regexp.MustCompile(`.*\.gni$`),
|
||||
regexp.MustCompile(`.*\.h$`),
|
||||
regexp.MustCompile(`.*\.mm$`),
|
||||
regexp.MustCompile(`.*\.storyboard$`),
|
||||
}
|
||||
|
||||
// These paths are always added to the inclusion list. Note that they may
|
||||
// not appear in the CasSpec if they are included indirectly via a parent
|
||||
// dir.
|
||||
explicitPaths = []string{
|
||||
".clang-format",
|
||||
".clang-tidy",
|
||||
"bin/fetch-clang-format",
|
||||
"bin/fetch-gn",
|
||||
"buildtools",
|
||||
"infra/bots/assets/android_ndk_darwin/VERSION",
|
||||
"infra/bots/assets/android_ndk_linux/VERSION",
|
||||
"infra/bots/assets/android_ndk_windows/VERSION",
|
||||
"infra/bots/assets/cast_toolchain/VERSION",
|
||||
"infra/bots/assets/clang_linux/VERSION",
|
||||
"infra/bots/assets/clang_win/VERSION",
|
||||
"infra/bots/run_recipe.py",
|
||||
"infra/canvaskit",
|
||||
"infra/pathkit",
|
||||
"resources",
|
||||
"third_party/externals",
|
||||
}
|
||||
)
|
||||
|
||||
// getAllCheckedInPaths returns every path checked in to the repo.
|
||||
func getAllCheckedInPaths() []string {
|
||||
cmd := exec.Command("git", "ls-files")
|
||||
cmd.Dir = CheckoutRoot()
|
||||
output, err := cmd.CombinedOutput()
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
split := strings.Split(string(output), "\n")
|
||||
rv := make([]string, 0, len(split))
|
||||
for _, line := range split {
|
||||
if line != "" {
|
||||
rv = append(rv, line)
|
||||
}
|
||||
}
|
||||
return rv
|
||||
}
|
||||
|
||||
// getRelevantPaths returns all paths needed by compile tasks.
|
||||
func getRelevantPaths() []string {
|
||||
rv := []string{}
|
||||
for _, path := range getAllCheckedInPaths() {
|
||||
for _, regex := range pathRegexes {
|
||||
if regex.MatchString(path) {
|
||||
rv = append(rv, path)
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
return append(rv, explicitPaths...)
|
||||
}
|
||||
|
||||
// node is a single node in a directory tree of task inputs.
|
||||
type node struct {
|
||||
children map[string]*node
|
||||
name string
|
||||
isLeaf bool
|
||||
}
|
||||
|
||||
// newNode returns a node instance.
|
||||
func newNode(name string) *node {
|
||||
return &node{
|
||||
children: map[string]*node{},
|
||||
name: name,
|
||||
isLeaf: false,
|
||||
}
|
||||
}
|
||||
|
||||
// isRoot returns true iff this is the root node.
|
||||
func (n *node) isRoot() bool {
|
||||
return n.name == ""
|
||||
}
|
||||
|
||||
// add the given entry (given as a slice of path components) to the node.
|
||||
func (n *node) add(entry []string) {
|
||||
// Remove the first element if we're not the root node.
|
||||
if !n.isRoot() {
|
||||
if entry[0] != n.name {
|
||||
log.Fatalf("Failed to compute compile CAS inputs; attempting to add entry %v to node %q", entry, n.name)
|
||||
}
|
||||
entry = entry[1:]
|
||||
|
||||
// If the entry is now empty, this node is a leaf.
|
||||
if len(entry) == 0 {
|
||||
n.isLeaf = true
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
// Add a child node.
|
||||
if !n.isLeaf {
|
||||
name := entry[0]
|
||||
child, ok := n.children[name]
|
||||
if !ok {
|
||||
child = newNode(name)
|
||||
n.children[name] = child
|
||||
}
|
||||
child.add(entry)
|
||||
|
||||
// If we have more than combinePathsThreshold immediate children,
|
||||
// combine them into this node.
|
||||
immediateChilden := 0
|
||||
for _, child := range n.children {
|
||||
if child.isLeaf {
|
||||
immediateChilden++
|
||||
}
|
||||
if !n.isRoot() && immediateChilden >= combinePathsThreshold {
|
||||
n.isLeaf = true
|
||||
n.children = map[string]*node{}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// entries returns the entries represented by this node and its children.
|
||||
// Will not return children in the following cases:
|
||||
// - This Node is a leaf, ie. it represents an entry which was explicitly
|
||||
// inserted into the Tree, as opposed to only part of a path to other
|
||||
// entries.
|
||||
// - This Node has immediate children exceeding combinePathsThreshold and
|
||||
// thus has been upgraded to a leaf node.
|
||||
func (n *node) entries() [][]string {
|
||||
if n.isLeaf {
|
||||
return [][]string{{n.name}}
|
||||
}
|
||||
rv := [][]string{}
|
||||
for _, child := range n.children {
|
||||
for _, entry := range child.entries() {
|
||||
if !n.isRoot() {
|
||||
entry = append([]string{n.name}, entry...)
|
||||
}
|
||||
rv = append(rv, entry)
|
||||
}
|
||||
}
|
||||
return rv
|
||||
}
|
||||
|
||||
// tree represents a directory tree of task inputs.
|
||||
type tree struct {
|
||||
root *node
|
||||
}
|
||||
|
||||
// newTree returns a tree instance.
|
||||
func newTree() *tree {
|
||||
return &tree{
|
||||
root: newNode(""),
|
||||
}
|
||||
}
|
||||
|
||||
// add the given path to the tree. Entries may be combined as defined by
|
||||
// combinePathsThreshold.
|
||||
func (t *tree) add(p string) {
|
||||
split := strings.Split(p, "/")
|
||||
t.root.add(split)
|
||||
}
|
||||
|
||||
// entries returns all entries in the tree. Entries may be combined as defined
|
||||
// by combinePathsThreshold.
|
||||
func (t *tree) entries() []string {
|
||||
entries := t.root.entries()
|
||||
rv := make([]string, 0, len(entries))
|
||||
for _, entry := range entries {
|
||||
rv = append(rv, strings.Join(append([]string{"skia"}, entry...), "/"))
|
||||
}
|
||||
sort.Strings(rv)
|
||||
return rv
|
||||
}
|
||||
|
||||
// generateCompileCAS creates the CasSpec used for tasks which build Skia.
|
||||
func generateCompileCAS(b *specs.TasksCfgBuilder) {
|
||||
t := newTree()
|
||||
for _, path := range getRelevantPaths() {
|
||||
t.add(path)
|
||||
}
|
||||
spec := &specs.CasSpec{
|
||||
Root: "..",
|
||||
Paths: t.entries(),
|
||||
Excludes: []string{rbe.ExcludeGitDir},
|
||||
}
|
||||
b.MustAddCasSpec(CAS_COMPILE, spec)
|
||||
}
|
@ -22,11 +22,30 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"go.skia.org/infra/go/cas/rbe"
|
||||
"go.skia.org/infra/go/cipd"
|
||||
"go.skia.org/infra/task_scheduler/go/specs"
|
||||
)
|
||||
|
||||
const (
|
||||
CAS_CANVASKIT = "canvaskit"
|
||||
CAS_COMPILE = "compile"
|
||||
CAS_EMPTY = "empty" // TODO(borenet): It'd be nice if this wasn't necessary.
|
||||
CAS_LOTTIE_CI = "lottie-ci"
|
||||
CAS_LOTTIE_WEB = "lottie-web"
|
||||
CAS_PATHKIT = "pathkit"
|
||||
CAS_PERF = "perf"
|
||||
CAS_PUPPETEER = "puppeteer"
|
||||
CAS_RUN_RECIPE = "run-recipe"
|
||||
CAS_RECIPES = "recipes"
|
||||
CAS_SKOTTIE_WASM = "skottie-wasm"
|
||||
CAS_SKPBENCH = "skpbench"
|
||||
CAS_SKQP = "skqp"
|
||||
CAS_TASK_DRIVERS = "task-drivers"
|
||||
CAS_TEST = "test"
|
||||
CAS_WASM_GM = "wasm-gm"
|
||||
CAS_WHOLE_REPO = "whole-repo"
|
||||
|
||||
BUILD_TASK_DRIVERS_NAME = "Housekeeper-PerCommit-BuildTaskDrivers"
|
||||
BUNDLE_RECIPES_NAME = "Housekeeper-PerCommit-BundleRecipes"
|
||||
ISOLATE_GCLOUD_LINUX_NAME = "Housekeeper-PerCommit-IsolateGCloudLinux"
|
||||
@ -70,33 +89,33 @@ var (
|
||||
|
||||
// Named caches used by tasks.
|
||||
CACHES_GIT = []*specs.Cache{
|
||||
&specs.Cache{
|
||||
{
|
||||
Name: "git",
|
||||
Path: "cache/git",
|
||||
},
|
||||
&specs.Cache{
|
||||
{
|
||||
Name: "git_cache",
|
||||
Path: "cache/git_cache",
|
||||
},
|
||||
}
|
||||
CACHES_GO = []*specs.Cache{
|
||||
&specs.Cache{
|
||||
{
|
||||
Name: "go_cache",
|
||||
Path: "cache/go_cache",
|
||||
},
|
||||
&specs.Cache{
|
||||
{
|
||||
Name: "gopath",
|
||||
Path: "cache/gopath",
|
||||
},
|
||||
}
|
||||
CACHES_WORKDIR = []*specs.Cache{
|
||||
&specs.Cache{
|
||||
{
|
||||
Name: "work",
|
||||
Path: "cache/work",
|
||||
},
|
||||
}
|
||||
CACHES_CCACHE = []*specs.Cache{
|
||||
&specs.Cache{
|
||||
{
|
||||
Name: "ccache",
|
||||
Path: "cache/ccache",
|
||||
},
|
||||
@ -109,12 +128,21 @@ var (
|
||||
// not also use the normal "work" cache, to prevent issues like
|
||||
// https://bugs.chromium.org/p/skia/issues/detail?id=9749.
|
||||
CACHES_DOCKER = []*specs.Cache{
|
||||
&specs.Cache{
|
||||
{
|
||||
Name: "docker",
|
||||
Path: "cache/docker",
|
||||
},
|
||||
}
|
||||
|
||||
// CAS_SPEC_WHOLE_REPO is a CasSpec which includes the entire repo. This is
|
||||
// global so that it can be overridden by other repositories which import
|
||||
// this file.
|
||||
CAS_SPEC_WHOLE_REPO = &specs.CasSpec{
|
||||
Root: "..",
|
||||
Paths: []string{"skia"},
|
||||
Excludes: []string{rbe.ExcludeGitDir},
|
||||
}
|
||||
|
||||
// TODO(borenet): This hacky and bad.
|
||||
CIPD_PKG_LUCI_AUTH = specs.CIPD_PKGS_KITCHEN[1]
|
||||
CIPD_PKGS_KITCHEN = append(specs.CIPD_PKGS_KITCHEN[:2], specs.CIPD_PKGS_PYTHON[1])
|
||||
@ -125,7 +153,7 @@ var (
|
||||
CIPD_PKGS_XCODE = []*specs.CipdPackage{
|
||||
// https://chromium.googlesource.com/chromium/tools/build/+/e19b7d9390e2bb438b566515b141ed2b9ed2c7c2/scripts/slave/recipe_modules/ios/api.py#317
|
||||
// This package is really just an installer for XCode.
|
||||
&specs.CipdPackage{
|
||||
{
|
||||
Name: "infra/tools/mac_toolchain/${platform}",
|
||||
Path: "mac_toolchain",
|
||||
// When this is updated, also update
|
||||
@ -151,39 +179,39 @@ var (
|
||||
|
||||
// ISOLATE_ASSET_MAPPING maps the name of an asset to the configuration
|
||||
// for how the CIPD package should be installed for a given task.
|
||||
ISOLATE_ASSET_MAPPING = map[string]isolateAssetCfg{
|
||||
ISOLATE_ASSET_MAPPING = map[string]uploadAssetCASCfg{
|
||||
"gcloud_linux": {
|
||||
isolateTaskName: ISOLATE_GCLOUD_LINUX_NAME,
|
||||
path: "gcloud_linux",
|
||||
uploadTaskName: ISOLATE_GCLOUD_LINUX_NAME,
|
||||
path: "gcloud_linux",
|
||||
},
|
||||
"skimage": {
|
||||
isolateTaskName: ISOLATE_SKIMAGE_NAME,
|
||||
path: "skimage",
|
||||
uploadTaskName: ISOLATE_SKIMAGE_NAME,
|
||||
path: "skimage",
|
||||
},
|
||||
"skp": {
|
||||
isolateTaskName: ISOLATE_SKP_NAME,
|
||||
path: "skp",
|
||||
uploadTaskName: ISOLATE_SKP_NAME,
|
||||
path: "skp",
|
||||
},
|
||||
"svg": {
|
||||
isolateTaskName: ISOLATE_SVG_NAME,
|
||||
path: "svg",
|
||||
uploadTaskName: ISOLATE_SVG_NAME,
|
||||
path: "svg",
|
||||
},
|
||||
"mskp": {
|
||||
isolateTaskName: ISOLATE_MSKP_NAME,
|
||||
path: "mskp",
|
||||
uploadTaskName: ISOLATE_MSKP_NAME,
|
||||
path: "mskp",
|
||||
},
|
||||
"android_ndk_linux": {
|
||||
isolateTaskName: ISOLATE_NDK_LINUX_NAME,
|
||||
path: "android_ndk_linux",
|
||||
uploadTaskName: ISOLATE_NDK_LINUX_NAME,
|
||||
path: "android_ndk_linux",
|
||||
},
|
||||
"android_sdk_linux": {
|
||||
isolateTaskName: ISOLATE_SDK_LINUX_NAME,
|
||||
path: "android_sdk_linux",
|
||||
uploadTaskName: ISOLATE_SDK_LINUX_NAME,
|
||||
path: "android_sdk_linux",
|
||||
},
|
||||
"win_toolchain": {
|
||||
alwaysIsolate: true,
|
||||
isolateTaskName: ISOLATE_WIN_TOOLCHAIN_NAME,
|
||||
path: "win_toolchain",
|
||||
alwaysIsolate: true,
|
||||
uploadTaskName: ISOLATE_WIN_TOOLCHAIN_NAME,
|
||||
path: "win_toolchain",
|
||||
},
|
||||
}
|
||||
)
|
||||
@ -318,18 +346,153 @@ func GenTasks(cfg *Config) {
|
||||
|
||||
// Create Tasks and Jobs.
|
||||
builder := &builder{
|
||||
TasksCfgBuilder: b,
|
||||
cfg: cfg,
|
||||
jobNameSchema: schema,
|
||||
jobs: jobs,
|
||||
relpathBaseDir: relpathBaseDir,
|
||||
relpathTargetDir: relpathTargetDir,
|
||||
TasksCfgBuilder: b,
|
||||
cfg: cfg,
|
||||
jobNameSchema: schema,
|
||||
jobs: jobs,
|
||||
}
|
||||
for _, name := range jobs {
|
||||
jb := newJobBuilder(builder, name)
|
||||
jb.genTasksForJob()
|
||||
jb.finish()
|
||||
}
|
||||
|
||||
// Create CasSpecs.
|
||||
b.MustAddCasSpec(CAS_CANVASKIT, &specs.CasSpec{
|
||||
Root: "..",
|
||||
Paths: []string{
|
||||
"skia/infra/bots/run_recipe.py",
|
||||
"skia/infra/canvaskit",
|
||||
"skia/modules/canvaskit",
|
||||
"skia/modules/pathkit/perf/perfReporter.js",
|
||||
"skia/modules/pathkit/tests/testReporter.js",
|
||||
},
|
||||
Excludes: []string{rbe.ExcludeGitDir},
|
||||
})
|
||||
b.MustAddCasSpec(CAS_EMPTY, specs.EmptyCasSpec)
|
||||
b.MustAddCasSpec(CAS_LOTTIE_CI, &specs.CasSpec{
|
||||
Root: "..",
|
||||
Paths: []string{
|
||||
"skia/infra/bots/run_recipe.py",
|
||||
"skia/infra/lottiecap",
|
||||
"skia/tools/lottie-web-perf",
|
||||
"skia/tools/lottiecap",
|
||||
},
|
||||
Excludes: []string{rbe.ExcludeGitDir},
|
||||
})
|
||||
b.MustAddCasSpec(CAS_LOTTIE_WEB, &specs.CasSpec{
|
||||
Root: "..",
|
||||
Paths: []string{
|
||||
"skia/infra/bots/run_recipe.py",
|
||||
"skia/tools/lottie-web-perf",
|
||||
},
|
||||
Excludes: []string{rbe.ExcludeGitDir},
|
||||
})
|
||||
b.MustAddCasSpec(CAS_PATHKIT, &specs.CasSpec{
|
||||
Root: "..",
|
||||
Paths: []string{
|
||||
"skia/infra/bots/run_recipe.py",
|
||||
"skia/infra/pathkit",
|
||||
"skia/modules/pathkit",
|
||||
},
|
||||
Excludes: []string{rbe.ExcludeGitDir},
|
||||
})
|
||||
b.MustAddCasSpec(CAS_PERF, &specs.CasSpec{
|
||||
Root: "..",
|
||||
Paths: []string{
|
||||
"skia/infra/bots/assets",
|
||||
"skia/infra/bots/run_recipe.py",
|
||||
"skia/platform_tools/ios/bin",
|
||||
"skia/resources",
|
||||
"skia/tools/valgrind.supp",
|
||||
},
|
||||
Excludes: []string{rbe.ExcludeGitDir},
|
||||
})
|
||||
b.MustAddCasSpec(CAS_PUPPETEER, &specs.CasSpec{
|
||||
Root: "..",
|
||||
Paths: []string{
|
||||
"skia/tools/perf-canvaskit-puppeteer",
|
||||
},
|
||||
Excludes: []string{rbe.ExcludeGitDir},
|
||||
})
|
||||
b.MustAddCasSpec(CAS_RECIPES, &specs.CasSpec{
|
||||
Root: "..",
|
||||
Paths: []string{
|
||||
"skia/infra/config/recipes.cfg",
|
||||
"skia/infra/bots/bundle_recipes.sh",
|
||||
"skia/infra/bots/README.recipes.md",
|
||||
"skia/infra/bots/recipe_modules",
|
||||
"skia/infra/bots/recipes",
|
||||
"skia/infra/bots/recipes.py",
|
||||
},
|
||||
Excludes: []string{rbe.ExcludeGitDir},
|
||||
})
|
||||
b.MustAddCasSpec(CAS_RUN_RECIPE, &specs.CasSpec{
|
||||
Root: "..",
|
||||
Paths: []string{
|
||||
"skia/infra/bots/run_recipe.py",
|
||||
},
|
||||
Excludes: []string{rbe.ExcludeGitDir},
|
||||
})
|
||||
b.MustAddCasSpec(CAS_SKOTTIE_WASM, &specs.CasSpec{
|
||||
Root: "..",
|
||||
Paths: []string{
|
||||
"skia/infra/bots/run_recipe.py",
|
||||
"skia/tools/skottie-wasm-perf",
|
||||
},
|
||||
Excludes: []string{rbe.ExcludeGitDir},
|
||||
})
|
||||
b.MustAddCasSpec(CAS_SKPBENCH, &specs.CasSpec{
|
||||
Root: "..",
|
||||
Paths: []string{
|
||||
"skia/infra/bots/assets",
|
||||
"skia/infra/bots/run_recipe.py",
|
||||
"skia/tools/skpbench",
|
||||
"skia/tools/valgrind.supp",
|
||||
},
|
||||
Excludes: []string{rbe.ExcludeGitDir},
|
||||
})
|
||||
b.MustAddCasSpec(CAS_SKQP, &specs.CasSpec{
|
||||
Root: "..",
|
||||
Paths: []string{
|
||||
"skia/infra/bots/run_recipe.py",
|
||||
"skia/infra/skqp",
|
||||
},
|
||||
Excludes: []string{rbe.ExcludeGitDir},
|
||||
})
|
||||
b.MustAddCasSpec(CAS_TASK_DRIVERS, &specs.CasSpec{
|
||||
Root: "..",
|
||||
Paths: []string{
|
||||
"skia/go.mod",
|
||||
"skia/go.sum",
|
||||
"skia/infra/bots/build_task_drivers.sh",
|
||||
"skia/infra/bots/run_recipe.py",
|
||||
"skia/infra/bots/task_drivers",
|
||||
},
|
||||
Excludes: []string{rbe.ExcludeGitDir},
|
||||
})
|
||||
b.MustAddCasSpec(CAS_TEST, &specs.CasSpec{
|
||||
Root: "..",
|
||||
Paths: []string{
|
||||
"skia/infra/bots/assets",
|
||||
"skia/infra/bots/run_recipe.py",
|
||||
"skia/platform_tools/ios/bin",
|
||||
"skia/resources",
|
||||
"skia/tools/valgrind.supp",
|
||||
},
|
||||
Excludes: []string{rbe.ExcludeGitDir},
|
||||
})
|
||||
b.MustAddCasSpec(CAS_WASM_GM, &specs.CasSpec{
|
||||
Root: "..",
|
||||
Paths: []string{
|
||||
"skia/resources",
|
||||
"skia/tools/run-wasm-gm-tests",
|
||||
},
|
||||
Excludes: []string{rbe.ExcludeGitDir},
|
||||
})
|
||||
b.MustAddCasSpec(CAS_WHOLE_REPO, CAS_SPEC_WHOLE_REPO)
|
||||
generateCompileCAS(b)
|
||||
|
||||
builder.MustFinish()
|
||||
}
|
||||
|
||||
@ -358,11 +521,9 @@ func getCallingDirName() string {
|
||||
// builder is a wrapper for specs.TasksCfgBuilder.
|
||||
type builder struct {
|
||||
*specs.TasksCfgBuilder
|
||||
cfg *Config
|
||||
jobNameSchema *JobNameSchema
|
||||
jobs []string
|
||||
relpathBaseDir string
|
||||
relpathTargetDir string
|
||||
cfg *Config
|
||||
jobNameSchema *JobNameSchema
|
||||
jobs []string
|
||||
}
|
||||
|
||||
// marshalJson encodes the given data as JSON and fixes escaping of '<' which Go
|
||||
@ -387,7 +548,7 @@ func (b *taskBuilder) kitchenTaskNoBundle(recipe string, outputDir string) {
|
||||
python := "cipd_bin_packages/vpython${EXECUTABLE_SUFFIX}"
|
||||
b.cmd(python, "-u", "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", recipe, b.getRecipeProps(), b.cfg.Project)
|
||||
// Most recipes want this isolate; they can override if necessary.
|
||||
b.isolate("swarm_recipe.isolate")
|
||||
b.cas(CAS_RUN_RECIPE)
|
||||
b.timeout(time.Hour)
|
||||
b.addToPATH("cipd_bin_packages", "cipd_bin_packages/bin")
|
||||
b.Spec.ExtraTags = map[string]string{
|
||||
@ -778,16 +939,6 @@ func (b *taskBuilder) defaultSwarmDimensions() {
|
||||
b.dimension(dims...)
|
||||
}
|
||||
|
||||
// relpath returns the relative path to the given file from the config file.
|
||||
func (b *builder) relpath(f string) string {
|
||||
target := filepath.Join(b.relpathTargetDir, f)
|
||||
rv, err := filepath.Rel(b.relpathBaseDir, target)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
return rv
|
||||
}
|
||||
|
||||
// bundleRecipes generates the task to bundle and isolate the recipes. Returns
|
||||
// the name of the task, which may be added as a dependency.
|
||||
func (b *jobBuilder) bundleRecipes() string {
|
||||
@ -798,7 +949,7 @@ func (b *jobBuilder) bundleRecipes() string {
|
||||
b.linuxGceDimensions(MACHINE_TYPE_SMALL)
|
||||
b.addToPATH("cipd_bin_packages", "cipd_bin_packages/bin")
|
||||
b.idempotent()
|
||||
b.isolate("recipes.isolate")
|
||||
b.cas(CAS_RECIPES)
|
||||
})
|
||||
return BUNDLE_RECIPES_NAME
|
||||
}
|
||||
@ -813,7 +964,7 @@ func (b *jobBuilder) buildTaskDrivers() string {
|
||||
b.linuxGceDimensions(MACHINE_TYPE_SMALL)
|
||||
b.addToPATH("cipd_bin_packages", "cipd_bin_packages/bin", "go/go/bin")
|
||||
b.idempotent()
|
||||
b.isolate("task_drivers.isolate")
|
||||
b.cas(CAS_TASK_DRIVERS)
|
||||
})
|
||||
return BUILD_TASK_DRIVERS_NAME
|
||||
}
|
||||
@ -841,7 +992,7 @@ func (b *jobBuilder) updateGoDeps() {
|
||||
b.dep(b.buildTaskDrivers())
|
||||
b.linuxGceDimensions(MACHINE_TYPE_MEDIUM)
|
||||
b.addToPATH("cipd_bin_packages", "cipd_bin_packages/bin", "go/go/bin")
|
||||
b.isolate("empty.isolate")
|
||||
b.cas(CAS_EMPTY)
|
||||
b.serviceAccount(b.cfg.ServiceAccountRecreateSKPs)
|
||||
})
|
||||
}
|
||||
@ -882,7 +1033,7 @@ func (b *jobBuilder) createDockerImage(wasm bool) string {
|
||||
)
|
||||
b.dep(b.buildTaskDrivers())
|
||||
b.addToPATH("cipd_bin_packages", "cipd_bin_packages/bin", "go/go/bin")
|
||||
b.isolate("empty.isolate")
|
||||
b.cas(CAS_EMPTY)
|
||||
b.serviceAccount(b.cfg.ServiceAccountCompile)
|
||||
b.linuxGceDimensions(MACHINE_TYPE_MEDIUM)
|
||||
b.usesDocker()
|
||||
@ -915,7 +1066,7 @@ func (b *jobBuilder) createPushAppsFromSkiaDockerImage() {
|
||||
b.dep(b.buildTaskDrivers())
|
||||
b.dep(b.createDockerImage(false))
|
||||
b.addToPATH("cipd_bin_packages", "cipd_bin_packages/bin", "go/go/bin")
|
||||
b.isolate("empty.isolate")
|
||||
b.cas(CAS_EMPTY)
|
||||
b.serviceAccount(b.cfg.ServiceAccountCompile)
|
||||
b.linuxGceDimensions(MACHINE_TYPE_MEDIUM)
|
||||
b.usesDocker()
|
||||
@ -947,7 +1098,7 @@ func (b *jobBuilder) createPushAppsFromWASMDockerImage() {
|
||||
b.dep(b.buildTaskDrivers())
|
||||
b.dep(b.createDockerImage(true))
|
||||
b.addToPATH("cipd_bin_packages", "cipd_bin_packages/bin", "go/go/bin")
|
||||
b.isolate("empty.isolate")
|
||||
b.cas(CAS_EMPTY)
|
||||
b.serviceAccount(b.cfg.ServiceAccountCompile)
|
||||
b.linuxGceDimensions(MACHINE_TYPE_MEDIUM)
|
||||
b.usesDocker()
|
||||
@ -994,10 +1145,10 @@ func (b *jobBuilder) compile() string {
|
||||
} else {
|
||||
b.addTask(name, func(b *taskBuilder) {
|
||||
recipe := "compile"
|
||||
isolate := "compile.isolate"
|
||||
casSpec := CAS_COMPILE
|
||||
if b.extraConfig("NoDEPS", "CMake", "CommandBuffer", "Flutter", "SKQP") {
|
||||
recipe = "sync_and_compile"
|
||||
isolate = "swarm_recipe.isolate"
|
||||
casSpec = CAS_RUN_RECIPE
|
||||
b.recipeProps(EXTRA_PROPS)
|
||||
b.usesGit()
|
||||
if !b.extraConfig("NoDEPS") {
|
||||
@ -1007,7 +1158,7 @@ func (b *jobBuilder) compile() string {
|
||||
b.idempotent()
|
||||
}
|
||||
b.kitchenTask(recipe, OUTPUT_BUILD)
|
||||
b.isolate(isolate)
|
||||
b.cas(casSpec)
|
||||
b.serviceAccount(b.cfg.ServiceAccountCompile)
|
||||
b.swarmDimensions()
|
||||
if b.extraConfig("Docker", "LottieWeb", "SKQP", "CMake") || b.compiler("EMCC") {
|
||||
@ -1116,7 +1267,7 @@ func (b *jobBuilder) checkGeneratedFiles() {
|
||||
// checkGnToBp verifies that the gn_to_bp.py script continues to work.
|
||||
func (b *jobBuilder) checkGnToBp() {
|
||||
b.addTask(b.Name, func(b *taskBuilder) {
|
||||
b.isolate("compile.isolate")
|
||||
b.cas(CAS_COMPILE)
|
||||
b.dep(b.buildTaskDrivers())
|
||||
b.cmd("./run_gn_to_bp",
|
||||
"--local=false",
|
||||
@ -1147,7 +1298,7 @@ func (b *jobBuilder) housekeeper() {
|
||||
// should add as a dependency.
|
||||
func (b *jobBuilder) g3FrameworkCanary() {
|
||||
b.addTask(b.Name, func(b *taskBuilder) {
|
||||
b.isolate("empty.isolate")
|
||||
b.cas(CAS_EMPTY)
|
||||
b.dep(b.buildTaskDrivers())
|
||||
b.cmd("./g3_canary",
|
||||
"--local=false",
|
||||
@ -1185,13 +1336,10 @@ func (b *jobBuilder) infra() {
|
||||
}
|
||||
b.recipeProp("repository", specs.PLACEHOLDER_REPO)
|
||||
b.kitchenTask("infra", OUTPUT_NONE)
|
||||
b.isolate("infra_tests.isolate")
|
||||
b.cas(CAS_WHOLE_REPO)
|
||||
b.serviceAccount(b.cfg.ServiceAccountCompile)
|
||||
b.cipd(specs.CIPD_PKGS_GSUTIL...)
|
||||
b.idempotent()
|
||||
// Repos which call into Skia's gen_tasks.go should define their own
|
||||
// infra_tests.isolate and therefore should not use relpath().
|
||||
b.Spec.Isolate = "infra_tests.isolate"
|
||||
b.usesGo()
|
||||
})
|
||||
}
|
||||
@ -1290,30 +1438,33 @@ func (b *jobBuilder) dm() {
|
||||
compileTaskName = b.compile()
|
||||
}
|
||||
b.addTask(b.Name, func(b *taskBuilder) {
|
||||
isolate := "test_skia_bundled.isolate"
|
||||
cas := CAS_TEST
|
||||
recipe := "test"
|
||||
if b.extraConfig("SKQP") {
|
||||
isolate = "skqp.isolate"
|
||||
cas = CAS_SKQP
|
||||
recipe = "skqp_test"
|
||||
if b.cpu("Emulator") {
|
||||
recipe = "test_skqp_emulator"
|
||||
}
|
||||
} else if b.extraConfig("OpenCL") {
|
||||
// TODO(dogben): Longer term we may not want this to be called a "Test" task, but until we start
|
||||
// running hs_bench or kx, it will be easier to fit into the current job name schema.
|
||||
// TODO(dogben): Longer term we may not want this to be called a
|
||||
// "Test" task, but until we start running hs_bench or kx, it will
|
||||
// be easier to fit into the current job name schema.
|
||||
recipe = "compute_test"
|
||||
} else if b.extraConfig("PathKit") {
|
||||
isolate = "pathkit.isolate"
|
||||
cas = CAS_PATHKIT
|
||||
recipe = "test_pathkit"
|
||||
} else if b.extraConfig("CanvasKit") {
|
||||
isolate = "canvaskit.isolate"
|
||||
cas = CAS_CANVASKIT
|
||||
recipe = "test_canvaskit"
|
||||
} else if b.extraConfig("LottieWeb") {
|
||||
// lottie_ci.isolate differs from lottie_web.isolate in that it includes more of the files,
|
||||
// especially those brought in via DEPS in the lottie-ci repo. The main difference between
|
||||
// Perf.+LottieWeb and Test.+LottieWeb is that the former pulls in the lottie build via
|
||||
// npm and the latter always tests at lottie's ToT.
|
||||
isolate = "lottie_ci.isolate"
|
||||
// CAS_LOTTIE_CI differs from CAS_LOTTIE_WEB in that it includes
|
||||
// more of the files, especially those brought in via DEPS in the
|
||||
// lottie-ci repo. The main difference between Perf.+LottieWeb and
|
||||
// Test.+LottieWeb is that the former pulls in the lottie build via
|
||||
// npm and the latter always tests at lottie's
|
||||
// ToT.
|
||||
cas = CAS_LOTTIE_CI
|
||||
recipe = "test_lottie_web"
|
||||
}
|
||||
b.recipeProp("gold_hashes_url", b.cfg.GoldHashesURL)
|
||||
@ -1327,7 +1478,7 @@ func (b *jobBuilder) dm() {
|
||||
b.dmFlags(iidStr)
|
||||
}
|
||||
b.kitchenTask(recipe, OUTPUT_TEST)
|
||||
b.isolate(isolate)
|
||||
b.cas(cas)
|
||||
b.swarmDimensions()
|
||||
if b.extraConfig("CanvasKit", "Docker", "LottieWeb", "PathKit", "SKQP") {
|
||||
b.usesDocker()
|
||||
@ -1390,7 +1541,7 @@ func (b *jobBuilder) dm() {
|
||||
|
||||
func (b *jobBuilder) fm() {
|
||||
b.addTask(b.Name, func(b *taskBuilder) {
|
||||
b.isolate("test_skia_bundled.isolate")
|
||||
b.cas(CAS_TEST)
|
||||
b.dep(b.buildTaskDrivers(), b.compile())
|
||||
b.cmd("./fm_driver",
|
||||
"--local=false",
|
||||
@ -1410,7 +1561,7 @@ func (b *jobBuilder) fm() {
|
||||
// Canary-G3 does not use this path because it is very different from other autorollers.
|
||||
func (b *jobBuilder) canary(rollerName string) {
|
||||
b.addTask(b.Name, func(b *taskBuilder) {
|
||||
b.isolate("empty.isolate")
|
||||
b.cas(CAS_EMPTY)
|
||||
b.dep(b.buildTaskDrivers())
|
||||
b.cmd("./canary",
|
||||
"--local=false",
|
||||
@ -1443,7 +1594,7 @@ func (b *jobBuilder) puppeteer() {
|
||||
b.dep(b.buildTaskDrivers(), compileTaskName)
|
||||
b.output(OUTPUT_PERF)
|
||||
b.timeout(20 * time.Minute)
|
||||
b.isolate("perf_puppeteer.isolate")
|
||||
b.cas(CAS_PUPPETEER)
|
||||
b.serviceAccount(b.cfg.ServiceAccountCompile)
|
||||
|
||||
webglversion := "2"
|
||||
@ -1554,7 +1705,7 @@ func (b *jobBuilder) cifuzz() {
|
||||
b.dep(b.buildTaskDrivers())
|
||||
b.output("cifuzz_out")
|
||||
b.timeout(60 * time.Minute)
|
||||
b.isolate("whole_repo.isolate")
|
||||
b.cas(CAS_WHOLE_REPO)
|
||||
b.serviceAccount(b.cfg.ServiceAccountCompile)
|
||||
b.cmd(
|
||||
"./cifuzz",
|
||||
@ -1580,31 +1731,31 @@ func (b *jobBuilder) perf() {
|
||||
doUpload := b.release() && b.doUpload()
|
||||
b.addTask(b.Name, func(b *taskBuilder) {
|
||||
recipe := "perf"
|
||||
isolate := "perf_skia_bundled.isolate"
|
||||
cas := CAS_PERF
|
||||
if b.extraConfig("Skpbench") {
|
||||
recipe = "skpbench"
|
||||
isolate = "skpbench_skia_bundled.isolate"
|
||||
cas = CAS_SKPBENCH
|
||||
} else if b.extraConfig("PathKit") {
|
||||
isolate = "pathkit.isolate"
|
||||
cas = CAS_PATHKIT
|
||||
recipe = "perf_pathkit"
|
||||
} else if b.extraConfig("CanvasKit") {
|
||||
isolate = "canvaskit.isolate"
|
||||
cas = CAS_CANVASKIT
|
||||
recipe = "perf_canvaskit"
|
||||
} else if b.extraConfig("SkottieTracing") {
|
||||
recipe = "perf_skottietrace"
|
||||
} else if b.extraConfig("SkottieWASM") {
|
||||
recipe = "perf_skottiewasm_lottieweb"
|
||||
isolate = "skottie_wasm.isolate"
|
||||
cas = CAS_SKOTTIE_WASM
|
||||
} else if b.extraConfig("LottieWeb") {
|
||||
recipe = "perf_skottiewasm_lottieweb"
|
||||
isolate = "lottie_web.isolate"
|
||||
cas = CAS_LOTTIE_WEB
|
||||
}
|
||||
b.recipeProps(EXTRA_PROPS)
|
||||
if recipe == "perf" {
|
||||
b.nanobenchFlags(doUpload)
|
||||
}
|
||||
b.kitchenTask(recipe, OUTPUT_PERF)
|
||||
b.isolate(isolate)
|
||||
b.cas(cas)
|
||||
b.swarmDimensions()
|
||||
if b.extraConfig("CanvasKit", "Docker", "PathKit") {
|
||||
b.usesDocker()
|
||||
@ -1679,7 +1830,7 @@ func (b *jobBuilder) presubmit() {
|
||||
})
|
||||
b.recipeProps(EXTRA_PROPS)
|
||||
b.kitchenTaskNoBundle("run_presubmit", OUTPUT_NONE)
|
||||
b.isolate("run_recipe.isolate")
|
||||
b.cas(CAS_RUN_RECIPE)
|
||||
b.serviceAccount(b.cfg.ServiceAccountCompile)
|
||||
// Use MACHINE_TYPE_LARGE because it seems to save time versus
|
||||
// MEDIUM and we want presubmit to be fast.
|
||||
@ -1705,7 +1856,7 @@ func (b *jobBuilder) compileWasmGMTests(compileName string) {
|
||||
b.dep(b.buildTaskDrivers())
|
||||
b.output("wasm_out")
|
||||
b.timeout(60 * time.Minute)
|
||||
b.isolate("compile.isolate")
|
||||
b.cas(CAS_COMPILE)
|
||||
b.serviceAccount(b.cfg.ServiceAccountCompile)
|
||||
b.cache(CACHES_DOCKER...)
|
||||
// For now, we only have one compile mode - a GPU release mode. This should be sufficient to
|
||||
@ -1740,7 +1891,7 @@ func (b *jobBuilder) runWasmGMTests() {
|
||||
b.dep(b.buildTaskDrivers())
|
||||
b.dep(compileTaskName)
|
||||
b.timeout(60 * time.Minute)
|
||||
b.isolate("wasm_gm_tests.isolate")
|
||||
b.cas(CAS_WASM_GM)
|
||||
b.serviceAccount(b.cfg.ServiceAccountUploadGM)
|
||||
b.cmd(
|
||||
"./run_wasm_gm_tests",
|
||||
|
@ -58,21 +58,21 @@ func (b *jobBuilder) addTask(name string, fn func(*taskBuilder)) {
|
||||
b.Spec.TaskSpecs = newSpecs
|
||||
}
|
||||
|
||||
// isolateCIPDAsset generates a task to isolate the given CIPD asset. Returns
|
||||
// uploadCIPDAssetToCAS generates a task to isolate the given CIPD asset. Returns
|
||||
// the name of the task.
|
||||
func (b *jobBuilder) isolateCIPDAsset(asset string) string {
|
||||
func (b *jobBuilder) uploadCIPDAssetToCAS(asset string) string {
|
||||
cfg, ok := ISOLATE_ASSET_MAPPING[asset]
|
||||
if !ok {
|
||||
log.Fatalf("No isolate task for asset %q", asset)
|
||||
}
|
||||
b.addTask(cfg.isolateTaskName, func(b *taskBuilder) {
|
||||
b.addTask(cfg.uploadTaskName, func(b *taskBuilder) {
|
||||
b.cipd(b.MustGetCipdPackageFromAsset(asset))
|
||||
b.cmd("/bin/cp", "-rL", cfg.path, "${ISOLATED_OUTDIR}")
|
||||
b.linuxGceDimensions(MACHINE_TYPE_SMALL)
|
||||
b.idempotent()
|
||||
b.isolate("empty.isolate")
|
||||
b.cas(CAS_EMPTY)
|
||||
})
|
||||
return cfg.isolateTaskName
|
||||
return cfg.uploadTaskName
|
||||
}
|
||||
|
||||
// genTasksForJob generates the tasks needed by this job.
|
||||
@ -90,8 +90,8 @@ func (b *jobBuilder) genTasksForJob() {
|
||||
// Isolate CIPD assets.
|
||||
if b.matchExtraConfig("Isolate") {
|
||||
for asset, cfg := range ISOLATE_ASSET_MAPPING {
|
||||
if cfg.isolateTaskName == b.Name {
|
||||
b.isolateCIPDAsset(asset)
|
||||
if cfg.uploadTaskName == b.Name {
|
||||
b.uploadCIPDAssetToCAS(asset)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
@ -83,9 +83,9 @@ func (b *taskBuilder) idempotent() {
|
||||
b.Spec.Idempotent = true
|
||||
}
|
||||
|
||||
// isolate sets the isolate file used by the task.
|
||||
func (b *taskBuilder) isolate(i string) {
|
||||
b.Spec.Isolate = b.relpath(i)
|
||||
// cas sets the CasSpec used by the task.
|
||||
func (b *taskBuilder) cas(casSpec string) {
|
||||
b.Spec.CasSpec = casSpec
|
||||
}
|
||||
|
||||
// env appends the given values to the given environment variable for the task.
|
||||
@ -165,12 +165,12 @@ func (b *taskBuilder) useIsolatedAssets() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// isolateAssetConfig represents a task which copies a CIPD package into
|
||||
// uploadAssetCASCfg represents a task which copies a CIPD package into
|
||||
// isolate.
|
||||
type isolateAssetCfg struct {
|
||||
alwaysIsolate bool
|
||||
isolateTaskName string
|
||||
path string
|
||||
type uploadAssetCASCfg struct {
|
||||
alwaysIsolate bool
|
||||
uploadTaskName string
|
||||
path string
|
||||
}
|
||||
|
||||
// asset adds the given assets to the task as CIPD packages.
|
||||
@ -179,7 +179,7 @@ func (b *taskBuilder) asset(assets ...string) {
|
||||
pkgs := make([]*specs.CipdPackage, 0, len(assets))
|
||||
for _, asset := range assets {
|
||||
if cfg, ok := ISOLATE_ASSET_MAPPING[asset]; ok && (cfg.alwaysIsolate || shouldIsolate) {
|
||||
b.dep(b.isolateCIPDAsset(asset))
|
||||
b.dep(b.uploadCIPDAssetToCAS(asset))
|
||||
} else {
|
||||
pkgs = append(pkgs, b.MustGetCipdPackageFromAsset(asset))
|
||||
}
|
||||
|
@ -1,13 +0,0 @@
|
||||
{
|
||||
'includes': [
|
||||
'infrabots.isolate',
|
||||
'recipes.isolate',
|
||||
'swarm_recipe.isolate',
|
||||
],
|
||||
'variables': {
|
||||
'files': [
|
||||
'../../go.mod',
|
||||
'../../go.sum',
|
||||
],
|
||||
},
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
{
|
||||
'variables': {
|
||||
'files': [
|
||||
'./',
|
||||
],
|
||||
},
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
{
|
||||
'variables': {
|
||||
'files': [
|
||||
'../../platform_tools/ios/bin/',
|
||||
],
|
||||
},
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
{
|
||||
'includes': [
|
||||
'swarm_recipe.isolate',
|
||||
],
|
||||
'variables': {
|
||||
'files': [
|
||||
'../../../lottie',
|
||||
'../../tools/lottie-web-perf',
|
||||
'../../tools/lottiecap',
|
||||
'../lottiecap',
|
||||
],
|
||||
},
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
{
|
||||
'includes': [
|
||||
'swarm_recipe.isolate',
|
||||
],
|
||||
'variables': {
|
||||
'files': [
|
||||
'../../tools/lottie-web-perf',
|
||||
],
|
||||
},
|
||||
}
|
@ -1,11 +0,0 @@
|
||||
{
|
||||
'includes': [
|
||||
'swarm_recipe.isolate',
|
||||
],
|
||||
'variables': {
|
||||
'files': [
|
||||
'../../modules/pathkit',
|
||||
'../pathkit',
|
||||
],
|
||||
},
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
{
|
||||
'variables': {
|
||||
'files': [
|
||||
'../../tools/perf-canvaskit-puppeteer/',
|
||||
],
|
||||
},
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
{
|
||||
'includes': [
|
||||
'assets.isolate',
|
||||
'ios_bin.isolate',
|
||||
'resources.isolate',
|
||||
'swarm_recipe.isolate',
|
||||
],
|
||||
'variables': {
|
||||
'files': [
|
||||
'../../tools/valgrind.supp',
|
||||
],
|
||||
},
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
{
|
||||
'variables': {
|
||||
'files': [
|
||||
'../../../.gclient',
|
||||
'../config/recipes.cfg',
|
||||
'bundle_recipes.sh',
|
||||
'README.recipes.md',
|
||||
'recipe_modules/',
|
||||
'recipes/',
|
||||
'recipes.py',
|
||||
],
|
||||
},
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
{
|
||||
'variables': {
|
||||
'files': [
|
||||
'../../resources/',
|
||||
],
|
||||
},
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
{
|
||||
'variables': {
|
||||
'files': [
|
||||
'../../../.gclient',
|
||||
'run_recipe.py',
|
||||
],
|
||||
},
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
{
|
||||
'includes': [
|
||||
'swarm_recipe.isolate',
|
||||
],
|
||||
'variables': {
|
||||
'files': [
|
||||
'../../tools/skottie-wasm-perf',
|
||||
],
|
||||
},
|
||||
}
|
@ -1,12 +0,0 @@
|
||||
{
|
||||
'includes': [
|
||||
'assets.isolate',
|
||||
'swarm_recipe.isolate',
|
||||
],
|
||||
'variables': {
|
||||
'files': [
|
||||
'../../tools/valgrind.supp',
|
||||
'../../tools/skpbench/',
|
||||
],
|
||||
},
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
{
|
||||
'includes': [
|
||||
'swarm_recipe.isolate',
|
||||
],
|
||||
'variables': {
|
||||
'files': [
|
||||
'../skqp',
|
||||
],
|
||||
},
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
{
|
||||
'variables': {
|
||||
'files': [
|
||||
'../../../.gclient',
|
||||
'run_recipe.py',
|
||||
],
|
||||
},
|
||||
}
|
@ -1,11 +0,0 @@
|
||||
{
|
||||
'variables': {
|
||||
'files': [
|
||||
'../../../.gclient',
|
||||
'../../go.mod',
|
||||
'../../go.sum',
|
||||
'./build_task_drivers.sh',
|
||||
'./task_drivers/',
|
||||
],
|
||||
},
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -1,13 +0,0 @@
|
||||
{
|
||||
'includes': [
|
||||
'assets.isolate',
|
||||
'ios_bin.isolate',
|
||||
'resources.isolate',
|
||||
'swarm_recipe.isolate',
|
||||
],
|
||||
'variables': {
|
||||
'files': [
|
||||
'../../tools/valgrind.supp',
|
||||
],
|
||||
},
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
{
|
||||
'variables': {
|
||||
'files': [
|
||||
'../../resources',
|
||||
'../../tools/run-wasm-gm-tests',
|
||||
],
|
||||
},
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
{
|
||||
'variables': {
|
||||
'files': [
|
||||
'../..',
|
||||
'../../../.gclient',
|
||||
],
|
||||
},
|
||||
}
|
Loading…
Reference in New Issue
Block a user