Commit Graph

145 Commits

Author SHA1 Message Date
Kevin Lubick
24f0b884c0 [bazel] Move Dawn BUILD.bazel to third_party/bazel
Rather than having a monolithic third_party/BUILD.bazel, this moves
our Dawn rules to their own subdirectory and makes it callable via
@dawn instead of //third_party/dawn.

This will help with the G3 roll and make our rules more organized in
general.

This also rolls Dawn
Roll Dawn from ab9757036bd6 to e831fb61046b (22 revisions)

https://dawn.googlesource.com/dawn.git/+log/ab9757036bd6..e831fb61046b

Suggested Review Order:
 - WORKSPACE.bazel, where we define @dawn and its deps
   (@vulkan_headers and @vulkan_tools). I initially thought
   I needed to define all of Dawn's deps in the workspace_file_content
   for new_local_repository, but that WORKSPACE file is
   ignored when building Skia rules.
 - third_party/dawn/BUILD.bazel, the contents of which were copied
   from //third_party/BUILD.bazel and modified largely via
   find-and-replace to point to files relative to
   //third_party/externals/dawn. One exception is the cpu_wasm
   config_setting because @dawn isn't able to see Skia's
   //bazel/macros.bzl.
 - All other files

Change-Id: Ib2d7bc972ef00b6b68370ce5c2839ffb70ed9a2f
Bug: skia:12541, skia:13211
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/538638
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2022-05-16 14:06:59 +00:00
James Godfrey-Kittle
5d553ed398 Fix presubmits for Python 3
Calls to "python" won't work on vanilla MacOS installs (nor many
distributions of Linux), and AFAICT we're assuming it refers to python3
anyways.

xreadlines was removed in Python 3, and the suggested equivalent is to
use the file directly as an iterator:
https://docs.python.org/2.7/library/stdtypes.html#file.xreadlines

Change-Id: Iae51e3923e38ea63f857a17b9ff80e79871efee5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/537982
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: James Godfrey-Kittle <jamesgk@google.com>
2022-05-06 18:48:47 +00:00
Kevin Lubick
3413ca474b [infra] Add BazelBuild task to build CanvasKit on the CI with Bazel
For additional context, see "Codifying Certain Build Options"
and "Building on the CI" in the design doc go/skia-bazel

Suggested review order:
 - builder_name_schema.json to see the three required and
   one optional part of BazelBuild jobs.
 - jobs.json to see one new BazelBuild job added. In an
   ideal world, this job would have been named
   BazelBuild-//modules/canvaskit:canvaskit_wasm-debug-linux_x64
   but Buildbucket (?) requires jobs match the regex
   ^[a-zA-Z0-9\\-_.\\(\\) ]{1,128}$
   so we use spaces instead of slashes or colons.
 - gen_tasks_logic.go; noting the makeBazelLabel function
   expands most of the spaces to / and the last one to a
   colon to make a single-target label. If there are three
   dots, then it is a multi-target label, and we do not
   need to add a colon.
 - bazel_build.go; This is a very simple task driver, and
   I do not anticipate getting too much more complex.
   The place where we decide which args to augment
   a build with depend on the host platform and thus
   should be set in gen_tasks_logic.go.
 - bazel/buildrc to see some initial configurations set,
   one of which, "debug", is used by the new job.
   The "release" version of CanvasKit probably works on
   3.1.10 which had a bugfix, but we are still on
   3.1.9
 - .bazelrc to see a rename of the linux-rbe config to
   linux_rbe (our configs should have no dashes if
   we want to specify them verbatim in our Job names).
   It also imports the Skia-specified build configs
   from //bazel/buildrc and supports the user-specified
   //bazel/user/buildrc file if it exists.
 - All other files in any order.

Change-Id: Ib954dd6045100eadcbbf4ffee0888f6fbce65fa7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/537797
Reviewed-by: Eric Boren <borenet@google.com>
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
2022-05-06 17:54:08 +00:00
Kevin Lubick
2f576263e4 Reland "[infra] Use Python3 for our Presubmits"
This is a reland of commit 094bcdb9e5

Original change's description:
> [infra] Use Python3 for our Presubmits
>
> https://source.chromium.org/chromium/chromium/tools/depot_tools/+/main:presubmit_support.py;l=319;drc=443d9135cc33f3156d5fe25ebec33f9adffbab65
>
> This also makes any errors from `make train -C infra/bots`
> look well formatted because check_output returns a bytestring
> in Python3 and when that is printed, the newlines et al are not
> rendered correctly. Thus we want the output of check_output
> to be encoded to UTF-8.
>
> Without setting the USE_PYTHON3 = True in PRESUBMIT.py,
> it appears that `git cl upload` would try to run our
> infra_tests.py in Python2 mode, which does not have
> the encoding argument for check_output.
>
> Apparently cipd_bin_packages/vpython3 does not have the
> "six" package installed (but cipd_bin_packages/vpython does)
> so I replaced the six.StringIO with io.StringIO, which
> is where that is located in Python3.
>
> Change-Id: Ic8f61bf943531583ba3d110a85260d69bdbf5eb2
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/537677
> Reviewed-by: Ravi Mistry <rmistry@google.com>
> Reviewed-by: Eric Boren <borenet@google.com>

Change-Id: Ia7fb2f3b6d8b70ca95cf10763782d4a0122053e0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/537978
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2022-05-06 14:01:35 +00:00
Ravi Mistry
18ac3ef222 Revert "[infra] Use Python3 for our Presubmits"
This reverts commit 094bcdb9e5.

Reason for revert: Breaking Housekeeper-PerCommit-InfraTests_Linux. The bot will have to be updated as part of this change.

Original change's description:
> [infra] Use Python3 for our Presubmits
>
> https://source.chromium.org/chromium/chromium/tools/depot_tools/+/main:presubmit_support.py;l=319;drc=443d9135cc33f3156d5fe25ebec33f9adffbab65
>
> This also makes any errors from `make train -C infra/bots`
> look well formatted because check_output returns a bytestring
> in Python3 and when that is printed, the newlines et al are not
> rendered correctly. Thus we want the output of check_output
> to be encoded to UTF-8.
>
> Without setting the USE_PYTHON3 = True in PRESUBMIT.py,
> it appears that `git cl upload` would try to run our
> infra_tests.py in Python2 mode, which does not have
> the encoding argument for check_output.
>
> Apparently cipd_bin_packages/vpython3 does not have the
> "six" package installed (but cipd_bin_packages/vpython does)
> so I replaced the six.StringIO with io.StringIO, which
> is where that is located in Python3.
>
> Change-Id: Ic8f61bf943531583ba3d110a85260d69bdbf5eb2
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/537677
> Reviewed-by: Ravi Mistry <rmistry@google.com>
> Reviewed-by: Eric Boren <borenet@google.com>

Change-Id: I0becb25d155ce0b0281c25d83662f1b01aee8033
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/537777
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Ravi Mistry <rmistry@google.com>
2022-05-05 20:54:07 +00:00
Kevin Lubick
094bcdb9e5 [infra] Use Python3 for our Presubmits
https://source.chromium.org/chromium/chromium/tools/depot_tools/+/main:presubmit_support.py;l=319;drc=443d9135cc33f3156d5fe25ebec33f9adffbab65

This also makes any errors from `make train -C infra/bots`
look well formatted because check_output returns a bytestring
in Python3 and when that is printed, the newlines et al are not
rendered correctly. Thus we want the output of check_output
to be encoded to UTF-8.

Without setting the USE_PYTHON3 = True in PRESUBMIT.py,
it appears that `git cl upload` would try to run our
infra_tests.py in Python2 mode, which does not have
the encoding argument for check_output.

Apparently cipd_bin_packages/vpython3 does not have the
"six" package installed (but cipd_bin_packages/vpython does)
so I replaced the six.StringIO with io.StringIO, which
is where that is located in Python3.

Change-Id: Ic8f61bf943531583ba3d110a85260d69bdbf5eb2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/537677
Reviewed-by: Ravi Mistry <rmistry@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
2022-05-05 20:01:29 +00:00
Kevin Lubick
269e687f4f [bazel] Make PRESUBMIT ignore deleted BUILD.bazel files
Change-Id: Ia1d43e4814eb23fc111df0c1800425272337936c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/536639
Reviewed-by: Ravi Mistry <rmistry@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2022-05-04 15:12:21 +00:00
Kevin Lubick
ad09d4b41d [bazel] Make presubmit for new Bazel files
Change-Id: Ie36fc895736999375d9a4b19fabeea7b64c81631
Bug: skia:13211
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/537116
Reviewed-by: Ravi Mistry <rmistry@google.com>
2022-05-04 14:03:55 +00:00
Kevin Lubick
fed97e8f40 [bazel] Add RBE support using hermetic Linux Clang toolchain
A new RBE worker-pool called gce_linux was created in
conjunction with this CL. See
https://docs.google.com/document/d/14xMZCKews69SSTfULhE8HDUzT5XvPwZ4CvRufEvcZ74/edit#
for some details on that.

Note: everything under bazel/rbe/gce_linux was autogenerated
and can be ignored from manual review. It basically specifies
what files are on the RBE image that are necessary for running
Bazel.

Testing it out can be done by authenticating for RBE
gcloud auth application-default login --no-browser

Then, run make -C bazel rbe_known_good_builds
to test it out.

On my 4 core laptop with an empty local cache, but a
warm remote cache, the build took <2 min instead of the
10+ minutes it would have [1].

The folder structure in //bazel/rbe is meant to let us
have multiple remote configurations there, e.g.
//bazel/rbe/gce_windows.

Suggested Review Order:
 - bazel/rbe/README.md
 - bazel/rbe/gce_linux_container/Dockerfile to see the
   bare-bones RBE image.
 - bazel/rbe/BUILD.bazel to see a custom platform defined.
   It is nearly identical to the autogenerated one
   in bazel/rbe/gce_linux/config/BUILD, with one extra
   field to force the gce_linux pool to be used.
 - .bazelrc to see the settings needed to make
   --config=linux-rbe work. The naming convention was
   inspired by SkCMS's setup [2], and allows us to have
   some common RBE settings (i.e. config:remote) and
   some specialized ones for the given host machine
   (e.g. config:linux-rbe) A very important, but subtle
   configuration, is on line 86 of .bazelrc where we say
   to use our hermetic toolchain and not whatever C++
   compiler and headers are on the host machine (aka
   the RBE container).
 - toolchain/build_toolchain.bzl to see some additional
   dependencies needed in the toolchain (to run IWYU) which
   I had installed locally but didn't realize were important.
 - third_party/BUILD.bazel to see an example of how failing
   to specify all files can result in something that works
   locally, but fails remotely.
   --execution_log_json_file=/tmp/execlog.json helped debug
   these issues.
 - All other files.

[1] http://go/scrcast/NjM1ODE4MDI0NzM3MTc3Nnw3ODViZmFkMi1iOA
[2] https://skia.googlesource.com/skcms/+/30c8e303800c256febb03a09fdcda7f75d119b1b/.bazelrc#20


Change-Id: Ia0a9e6a06c1a13071949ab402dc5d897df6b12e1
Bug: skia:12541
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/524359
Reviewed-by: Leandro Lovisolo <lovisolo@google.com>
2022-03-28 13:56:16 +00:00
Ravi Mistry
4ae3fd33cf Remove AUTHORS check from PRESUBMIT.py
This is now done in SkCQ

Bug: skia:12487
Change-Id: I5a1414b7594ef371727c3391b18dbe6948b6c25a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/454457
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Ravi Mistry <rmistry@google.com>
2021-09-30 14:12:18 +00:00
Brian Osman
0f124cd7cd Remove API owners check from presubmit script
This is now enforced using OWNERS

Change-Id: Iee0c639731376d7bc4c3deaa65ccadef3fae53f4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/445642
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-09-28 16:01:56 +00:00
Ravi Mistry
c32bd0d84e Remove Docs-Preview links from PRESUBMIT.py
This work is being done by the skiastatus Gerrit plugin.

Bug: skia:12403
Change-Id: I42b81dcc9e2b4d5c99f9756eabed186f489a9adb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/445105
Commit-Queue: Ravi Mistry <rmistry@google.com>
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
2021-09-02 17:53:05 +00:00
Kevin Lubick
7f7b6ab276 [infra] Update PRESUBMIT.py to run under Python3
No real changes, unlike https://skia-review.googlesource.com/c/buildbot/+/439856/

Change-Id: I9b83cc0d1ee207fad0747c663469b4bae61b2049
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/439780
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2021-08-16 20:00:46 +00:00
Kevin Lubick
2cd8067113 [fiddle] Add PRESUBMIT rule to run tools/fiddle/make_all_examples_cpp.py
It will run this only if it detected a change to docs/examples
and runs fairly quickly.

Hopefully it avoids future bitrot like:
https://skia-review.googlesource.com/c/skia/+/423956

Change-Id: I8c6a54faa3a14dfb53260e03d4e6cc61e84b76cc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/423976
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
2021-07-01 15:20:57 +00:00
Adlai Holler
3f0e25ca47 Remove mtklein from housekeeper message
Respect.

Change-Id: I69fd0d7e3259082658e1eacbd05259bd4cf34cb9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/419837
Auto-Submit: Adlai Holler <adlai@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2021-06-18 17:36:22 +00:00
Ravi Mistry
27095f28d0 Revert "Display a Docs-Preview link for each modified MD file"
This reverts commit 42d753031d.

Reason for revert: Replaced by the work in skbug.com/11824

Original change's description:
> Display a Docs-Preview link for each modified MD file
>
> Bug: skia:11824
> Change-Id: I6bd557affca5ccf9f2936d86e2b0da168ceb2670
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/390577
> Commit-Queue: Ravi Mistry <rmistry@google.com>
> Reviewed-by: Joe Gregorio <jcgregorio@google.com>

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: skia:11824
Change-Id: Ia874ed6474fcae4698cd676dbdf208dbdefdedc4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/399716
Reviewed-by: Ravi Mistry <rmistry@google.com>
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Commit-Queue: Ravi Mistry <rmistry@google.com>
2021-04-22 13:39:28 +00:00
Ravi Mistry
42d753031d Display a Docs-Preview link for each modified MD file
Bug: skia:11824
Change-Id: I6bd557affca5ccf9f2936d86e2b0da168ceb2670
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/390577
Commit-Queue: Ravi Mistry <rmistry@google.com>
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
2021-04-02 01:08:04 +00:00
Eric Boren
1f95e6c6b4 Reland "[infra] Switch from isolate to RBE-CAS"
Bug: skia:10883
Change-Id: Ie702a4699cda48603ceff690d2ba946bf7a0d0b2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/344898
Commit-Queue: Eric Boren <borenet@google.com>
Reviewed-by: Weston Tracey <westont@google.com>
2021-02-22 14:41:06 +00:00
Mike Klein
3f041f8f15 reland: make brianosman a public API owner
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/365519
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Change-Id: If40716b1282443d0336488f14e8463b298a1f46d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/365508
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2021-02-03 20:27:17 +00:00
Mike Klein
4228186301 Revert "make brianosman a public API owner"
This reverts commit 4ac25118b5.

Reason for revert: missing comma :|

Original change's description:
> make brianosman a public API owner
>
> ... and sort, and remove dead emails
>
> Change-Id: I0ef35918a5b4539559319c32b95109ca7c66f87c
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/365519
> Reviewed-by: Brian Osman <brianosman@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

TBR=djsollen@google.com,mtklein@google.com,bsalomon@google.com,hcm@google.com,brianosman@google.com,reed@google.com

Change-Id: Ie3ac51c82c83e8b76fc3933f4f68938f608e32d5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/365507
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2021-02-03 17:56:51 +00:00
Mike Klein
4ac25118b5 make brianosman a public API owner
... and sort, and remove dead emails

Change-Id: I0ef35918a5b4539559319c32b95109ca7c66f87c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/365519
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2021-02-03 17:56:11 +00:00
Ravi Mistry
6eca5793b4 Add presubmit check for git conflict markers
Errors will be reported like this:
"""""""""
Running presubmit upload checks ...

** Presubmit ERRORS **
Git conflict markers found in whitespace.txt:14 <<<<<<< HEAD

Git conflict markers found in whitespace.txt:16 =======

Git conflict markers found in whitespace.txt:18 >>>>>>> 75a85179504e59df7b3abbc09113f24f2233001b
"""""""""

Bug: skia:11098
Change-Id: I24f90ec545b797f1d782a1733b8273ce176b1012
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/345037
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Commit-Queue: Ravi Mistry <rmistry@google.com>
2020-12-16 17:51:16 +00:00
Eric Boren
32c6099d92 Revert "Reland "[infra] Switch from isolate to RBE-CAS""
This reverts commit 540b51ce8f.

Reason for revert: RPI disk space

Original change's description:
> Reland "[infra] Switch from isolate to RBE-CAS"
>
> Bug: skia:10883
> Change-Id: Iec82a07fdf3c0807a9bb1870309eded85d4f0b1e
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/341679
> Commit-Queue: Eric Boren <borenet@google.com>
> Reviewed-by: Weston Tracey <westont@google.com>

TBR=borenet@google.com,westont@google.com

Change-Id: I0156842b995d275d8deb5bd73c6877de7f8af72e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:10883
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/342596
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Eric Boren <borenet@google.com>
2020-12-09 18:09:39 +00:00
Eric Boren
540b51ce8f Reland "[infra] Switch from isolate to RBE-CAS"
Bug: skia:10883
Change-Id: Iec82a07fdf3c0807a9bb1870309eded85d4f0b1e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/341679
Commit-Queue: Eric Boren <borenet@google.com>
Reviewed-by: Weston Tracey <westont@google.com>
2020-12-09 17:14:39 +00:00
Eric Boren
4159ecbca9 Revert "[infra] Switch from isolate to RBE-CAS"
This reverts commit 03d69876ff.

Reason for revert: failing

Original change's description:
> [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>

TBR=borenet@google.com,westont@google.com

Change-Id: Idf99f74579e44bb6b88dcb2c727d8215a3c70c71
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:10883
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/341678
Reviewed-by: Eric Boren <borenet@google.com>
2020-12-08 14:29:10 +00:00
Eric Boren
03d69876ff [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>
2020-12-08 14:04:24 +00:00
John Stiles
d836f84ab8 Generate SkSL golden output files from test inputs during the build.
Golden SkSL outputs are intended to eventually replace the majority of
our unit tests, since they can automatically update themselves when we
change implementation details of the compiler.

If you change the compiler output without updating the Golden files, the
CheckGeneratedFiles housekeeper will be triggered. Set
`skia_compile_processors` or `skia_compile_sksl_tests` to true in your
GN args to regenerate them.

Almost all of the tests from SkSLFPTests.cpp and SkSLGLSLTests.cpp can
be migrated into separate unit-test .fp/.sksl files in a followup CL.

hcm@ has signed off on removing the copyright boilerplate preamble from
our unit test files.

Change-Id: I9e24a944bbac8f8efd62c92481b022a0b1ecdd0b
Bug: skia:10694
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/316336
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-09-14 14:54:12 +00:00
Corentin Wallez
6a5187a889 PRESUBMIT: Don't check formatting of deleted files
Change-Id: I78eff440486eb2e76acdbd8a43c6c99cf6ed9bbb
Bug: chromium:1064305
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/282276
Commit-Queue: Eric Boren <borenet@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
2020-04-08 10:36:09 +00:00
Mike Klein
96f6401789 harmonize rewrite-includes and gn-format checks
The CheckGeneratedFiles bot only required rewriting
.gn files, while the presubmit wants both .gn and .gni files.

It also appears that the #includes rewrite script runs on
both the presubmit and CheckGeneratedFiles bots.

These presubmits run on the CQ before landing right?
If so, no need for them in the CheckGeneratedFIles bot at all.

And of course, format .gni files.

Change-Id: Icd4526d62f85088862ad93566cc9ace11dc3e33f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281505
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-04-03 17:00:54 +00:00
Ravi Mistry
4c0ffe7820 [Tree Status] Update all references in Skia repo to tree-status
* Mainly updates to documentation.
* Fix some comments in PRESUBMIT.py.
* Delete tools/lua/trigger_ct_lua. It has not worked in many years.

Bug: skia:9962
Change-Id: If6f58f173f2c8bd3fc9bdfc4db440f42489fee08
Docs-Preview: https://skia.org/?cl=274597
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274597
Commit-Queue: Ravi Mistry <rmistry@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
2020-03-02 18:43:49 +00:00
Brian Osman
70f24af3ef Fix path to GN on Windows when running presubmit hooks
I think this fixes issues with `git cl upload` on Windows machines.
Note that fetch-gn grabs gn.exe (not gn.bat).

Change-Id: Iba64ec62cce00e8ba0076ce83d47e4e6e6ef6197
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/271604
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-02-18 20:41:16 +00:00
Ben Wagner
3c4a9d347d Run fetch-gn in PRESUBMIT if needed
Change-Id: I3f2f3713fc27207c26d02c29358cd582440e8e65
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/271037
Commit-Queue: Eric Boren <borenet@google.com>
Auto-Submit: Ben Wagner aka dogben <benjaminwagner@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
2020-02-18 15:45:05 +00:00
Ben Wagner
06265e017f [presubmit] Use bin/gn rather than depot_tools gn
Change-Id: I649f07e036f184e6dbb3a335bdd979dedea27ec8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/270876
Commit-Queue: Eric Boren <borenet@google.com>
Auto-Submit: Ben Wagner aka dogben <benjaminwagner@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
2020-02-14 15:51:38 +00:00
Edward Lemur
c631b7cc5f Fix error on PRESUBMIT PostUploadHook
change.AddDescriptionFooters() doesn't exist, the right function is
change.AddDescriptionFooter()

Bug: 1042324
Change-Id: Icb417eab494dc217bc8bb9a51810f9cf65cce828
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/268667
Auto-Submit: Edward Lemur <ehmaldonado@google.com>
Commit-Queue: Eric Boren <borenet@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
2020-02-05 11:11:07 +00:00
Edward Lemur
2b7876cd04 Modify PostUploadHooks to remove dependency on cl objects.
In order to enable Python 3 migration, presubmit needs
to stop depending on git-cl internal objects.

Depends on [1] and [2].

[1] https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2007670
[2] https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2007262

Bug: 1042324
Change-Id: I84f48cf7915dc1d95979bd99e839c0bec4348d6d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/265209
Auto-Submit: Edward Lemur <ehmaldonado@google.com>
Commit-Queue: Eric Boren <borenet@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
2020-02-04 11:18:20 +00:00
Mike Klein
2fa68dbcc7 rm mtklein@chromium
Change-Id: I10f9083ebda6038026cbc322b07528a4da820634
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/266858
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-01-27 18:20:06 +00:00
Mike Klein
3d8172509e remove obsolete presubmit checks
The CQ handles tree closure,
and these {dm,nanobench}_flags.py files don't exist.

Change-Id: I19b5842763efd121a2bf7c3ff9075bf46089d74a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/264342
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-01-14 15:47:13 +00:00
Mike Klein
34386800a2 try running public API checks early
This might be nice as an early reminder that you'll need special review,
and ought to let us not have to re-run this (~1m) PRESUBMIT bot on CQ+2.

Change-Id: I94c370d3cfcf7b593961fcaf3907e0a045ff1c89
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/264336
Reviewed-by: Eric Boren <borenet@google.com>
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-01-14 15:15:17 +00:00
Eric Boren
a715ff5043 Use urllib_request instead of urllib2 in PRESUBMIT.
urllib_request was introduced in crrev.com/c/1866170 to add
python 3 compatibility.

Bug: 1009814
Change-Id: Iecc246d4f251983051bd0cf812903831ea7e0c2d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/249588
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Eric Boren <borenet@google.com>
2019-10-22 20:30:56 +00:00
Hal Canary
4df3d5340e rewrite_includes.py: make it work on windows
Also:
    Revert "don't try to format includes on windows"
    This reverts commit e68b5bd4e6.

Change-Id: I93dc4dba4808c07882e977ac0693c93e282bbad5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/230878
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2019-08-05 16:14:35 +00:00
Chris Dalton
e68b5bd4e6 don't try to format includes on windows
It's not going to work:
   - windows\style\paths don't work well in Python
   - something seems to be slipping in extra \r, probably print?

Change-Id: I6d9a0cc0bff403b9b45412b0e92290a9346bcf14
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/230641
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-07-29 22:23:49 +00:00
Mike Klein
f9ad5ba8f5 don't try to format removed files
Let's spin this off in case (dare I say it) the other CL is reverted.

Change-Id: I8ae978cd82772b418f7aae5a64cc8c0fd066ddb9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/230443
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-07-29 18:01:05 +00:00
Mike Klein
bb413430e4 add a fast subset option and --dry-run
You can now pass files to rewrite, still defaulting
to all sources.  This speeds things up and is nice
for a Git or PRESUBMIT hook, added here too.

Passing --dry-run or -n will just check that the
files we would have written is the same, printing
the names of any mismatches and failing if any.

Cq-Include-Trybots: skia.primary:Housekeeper-PerCommit-CheckGeneratedFiles
Tricium: no
Change-Id: I94218f49071b8634841b04e4b536ad1ae5d9d5fd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/230143
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
2019-07-26 18:32:43 +00:00
Ravi Mistry
5773516f66 Add presubmit prompt during upload if public API change does not include release file change
NoTry: true
Change-Id: I8f7ab9e4d32e9a9c86207468811b803a90683bc4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/229817
Commit-Queue: Ravi Mistry <rmistry@google.com>
Reviewed-by: Heather Miller <hcm@google.com>
2019-07-25 18:00:34 +00:00
Eric Boren
6dc002169e [infra] Fix DEPS to use full commit hashes
Branches and tags may change out from under us or disappear entirely.
Also add a presubmit check to prevent regressing.

Change-Id: I73878907d9a72f7de7b50989919c3a7bc385abf9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/229490
Reviewed-by: Ben Wagner aka dogben <benjaminwagner@google.com>
Commit-Queue: Eric Boren <borenet@google.com>
2019-07-25 11:45:39 +00:00
Eric Boren
58d1f76fc0 Reland "[infra] Make most builds idempotent"
This reverts commit de71a74fc4.

Reason for revert: Reland with fixes

Original change's description:
> Revert "[infra] Make most builds idempotent"
> 
> This reverts commit 57aa178dea.
> 
> Reason for revert: Causes Build-Debian9-Clang-x86-devrel-Android_SKQP to fail
> 
> Original change's description:
> > [infra] Make most builds idempotent
> > 
> > Change-Id: I084645a46feda183747e9d7fc3b40b1aa56c5f78
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/211103
> > Commit-Queue: Eric Boren <borenet@google.com>
> > Reviewed-by: Ben Wagner aka dogben <benjaminwagner@google.com>
> 
> TBR=borenet@google.com,benjaminwagner@google.com
> 
> Change-Id: I886483a01c53da2cb7816651a02b35b780ffcf67
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/228441
> Reviewed-by: Ben Wagner aka dogben <benjaminwagner@google.com>
> Commit-Queue: Ben Wagner aka dogben <benjaminwagner@google.com>

TBR=borenet@google.com,benjaminwagner@google.com

Change-Id: Ie5462e06da06ec835eaa49778111afa063f9404a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/228556
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Eric Boren <borenet@google.com>
2019-07-19 12:11:27 +00:00
Ben Wagner aka dogben
de71a74fc4 Revert "[infra] Make most builds idempotent"
This reverts commit 57aa178dea.

Reason for revert: Causes Build-Debian9-Clang-x86-devrel-Android_SKQP to fail

Original change's description:
> [infra] Make most builds idempotent
> 
> Change-Id: I084645a46feda183747e9d7fc3b40b1aa56c5f78
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/211103
> Commit-Queue: Eric Boren <borenet@google.com>
> Reviewed-by: Ben Wagner aka dogben <benjaminwagner@google.com>

TBR=borenet@google.com,benjaminwagner@google.com

Change-Id: I886483a01c53da2cb7816651a02b35b780ffcf67
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/228441
Reviewed-by: Ben Wagner aka dogben <benjaminwagner@google.com>
Commit-Queue: Ben Wagner aka dogben <benjaminwagner@google.com>
2019-07-18 21:30:22 +00:00
Eric Boren
57aa178dea [infra] Make most builds idempotent
Change-Id: I084645a46feda183747e9d7fc3b40b1aa56c5f78
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/211103
Commit-Queue: Eric Boren <borenet@google.com>
Reviewed-by: Ben Wagner aka dogben <benjaminwagner@google.com>
2019-07-18 19:32:34 +00:00
Mike Reed
7dafb09df6 add mtklein to api approvals
Change-Id: Ic6f86f615d046b7afdc8bd2fe21d76024d800613
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/205348
Commit-Queue: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2019-04-02 15:16:56 +00:00
Ravi Mistry
6bb809a605 Remove auto adding CQ keywords for non-master branches
Bug: skia:
Change-Id: I03e5ceff326d38f96ce6fea699248b0232e39a63
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/202701
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Ravi Mistry <rmistry@google.com>
2019-03-21 15:01:00 +00:00