3413ca474b
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>
64 lines
3.4 KiB
Makefile
64 lines
3.4 KiB
Makefile
# This target should be run when new files are added or includes changed.
|
|
generate:
|
|
bazelisk build @org_skia_go_infra//bazel/gazelle:gazelle_cpp
|
|
cd .. && bazel-bin/external/org_skia_go_infra/bazel/gazelle/gazelle_cpp_/gazelle_cpp update \
|
|
--third_party_file_map="third_party/file_map_for_bazel.json" \
|
|
include src tools gm tests \
|
|
modules/skshaper modules/svg modules/skresources modules/skparagraph modules/skunicode \
|
|
modules/skottie modules/skresources modules/sksg experimental/ffmpeg \
|
|
modules/particles \
|
|
experimental/bazel_test example \
|
|
modules/canvaskit/go \
|
|
infra/bots/task_drivers
|
|
|
|
# This target should be run after the go.mod file is updated (e.g. version rolls or new updates)
|
|
gazelle_update_repo:
|
|
cd .. && bazelisk run //:gazelle -- update-repos -from_file=go.mod -to_macro=go_repositories.bzl%go_repositories
|
|
|
|
# Run this target to test all known working Bazel builds
|
|
known_good_builds:
|
|
bazelisk build //experimental/bazel_test/... --config=clang
|
|
bazelisk run //experimental/bazel_test:bazel_test_exe --config=clang
|
|
bazelisk build //:skia_core --config=clang
|
|
bazelisk build //src/sksl/lex:sksllex --config=clang
|
|
bazelisk build //tools/skdiff --config=clang
|
|
bazelisk build //tools/skslc --config=clang
|
|
bazelisk build //modules/canvaskit:canvaskit_wasm --compilation_mode opt --sandbox_base=/dev/shm
|
|
|
|
# Test the enforcement of include what you use
|
|
bazelisk build //example:hello_world_gl --config=clang --features skia_enforce_iwyu
|
|
# Both with and without a GPU backend should be error free (i.e. IWYU should let us
|
|
# conditionally import things.
|
|
bazelisk build //src/svg/... --config=clang --features skia_enforce_iwyu \
|
|
--gpu_backend=gl_backend --include_decoder=jpeg_decode_codec
|
|
bazelisk build //src/svg/... --config=clang --features skia_enforce_iwyu
|
|
bazelisk build //tools/debugger --config=clang --gpu_backend=gl_backend \
|
|
--features skia_enforce_iwyu
|
|
bazelisk build //:skia_core --config=clang --features skia_enforce_iwyu
|
|
bazelisk build //src/utils/... --config=clang --features skia_enforce_iwyu
|
|
bazelisk build //src/utils/... --config=clang --gpu_backend=gl_backend \
|
|
--features skia_enforce_iwyu
|
|
|
|
rbe_known_good_builds:
|
|
bazelisk build //experimental/bazel_test/... --config=linux_rbe
|
|
bazelisk run //experimental/bazel_test:bazel_test_exe --config=linux_rbe
|
|
bazelisk build //:skia_core --config=linux_rbe
|
|
bazelisk build //src/sksl/lex:sksllex --config=linux_rbe
|
|
bazelisk build //tools/skdiff --config=linux_rbe
|
|
bazelisk build //tools/skslc --config=linux_rbe
|
|
# TODO(kjlubick) CanvasKit in release mode (i.e. with Closure) requires
|
|
# https://github.com/emscripten-core/emscripten/pull/16640 to land
|
|
bazelisk build //modules/canvaskit:canvaskit_wasm --compilation_mode dbg --config=linux_rbe \
|
|
--jobs 100
|
|
|
|
# Test the enforcement of include what you use
|
|
bazelisk build //example:hello_world_gl --config=linux_rbe --features skia_enforce_iwyu
|
|
# Both with and without a GPU backend should be error free (i.e. IWYU should let us
|
|
# conditionally import things.
|
|
bazelisk build //src/svg/... --config=linux_rbe --features skia_enforce_iwyu \
|
|
--gpu_backend=gl_backend --include_decoder=jpeg_decode_codec
|
|
bazelisk build //src/svg/... --config=linux_rbe --features skia_enforce_iwyu
|
|
bazelisk build //tools/debugger --config=linux_rbe --gpu_backend=gl_backend \
|
|
--features skia_enforce_iwyu
|
|
bazelisk build //:skia_core --config=linux_rbe --features skia_enforce_iwyu
|