From ef956a20c3ad43c79d5dda0cd855d5bb20709af8 Mon Sep 17 00:00:00 2001 From: Misko Hevery Date: Wed, 10 Jan 2018 00:07:55 -0800 Subject: [PATCH] build: add bazel rulse for benchmarks (#21436) PR Close #21436 --- .circleci/config.yml | 2 +- modules/benchmarks/src/BUILD.bazel | 15 +++++++++++++ modules/benchmarks/src/largetable/BUILD.bazel | 16 ++++++++++++++ .../src/largetable/render3/BUILD.bazel | 20 ++++++++++++++++++ modules/benchmarks/src/tree/BUILD.bazel | 16 ++++++++++++++ .../benchmarks/src/tree/render3/BUILD.bazel | 20 ++++++++++++++++++ .../src/tree/render3_function/BUILD.bazel | 21 +++++++++++++++++++ 7 files changed, 109 insertions(+), 1 deletion(-) create mode 100644 modules/benchmarks/src/BUILD.bazel create mode 100644 modules/benchmarks/src/largetable/BUILD.bazel create mode 100644 modules/benchmarks/src/largetable/render3/BUILD.bazel create mode 100644 modules/benchmarks/src/tree/BUILD.bazel create mode 100644 modules/benchmarks/src/tree/render3/BUILD.bazel create mode 100644 modules/benchmarks/src/tree/render3_function/BUILD.bazel diff --git a/.circleci/config.yml b/.circleci/config.yml index 04da8cc0d8..6f2ab7e4c4 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -62,7 +62,7 @@ jobs: # Use bazel query so that we explicitly ask for all buildable targets to be built as well # This avoids waiting for a build command to finish before running the first test # See https://github.com/bazelbuild/bazel/issues/4257 - - run: bazel query --output=label '//packages/... union @angular//...' | xargs bazel test --config=ci + - run: bazel query --output=label '//modules/... union //packages/... union @angular//...' | xargs bazel test --config=ci - save_cache: key: *cache_key diff --git a/modules/benchmarks/src/BUILD.bazel b/modules/benchmarks/src/BUILD.bazel new file mode 100644 index 0000000000..6aa8288cab --- /dev/null +++ b/modules/benchmarks/src/BUILD.bazel @@ -0,0 +1,15 @@ +package(default_visibility = ["//visibility:public"]) + +load("@build_bazel_rules_typescript//:defs.bzl", "ts_library") + +ts_library( + name = "util_lib", + srcs = [ + "util.ts", + ], + tsconfig = "//packages:tsconfig", + deps = [ + "//packages:types", + "//packages/core", + ], +) diff --git a/modules/benchmarks/src/largetable/BUILD.bazel b/modules/benchmarks/src/largetable/BUILD.bazel new file mode 100644 index 0000000000..8d8ba0afff --- /dev/null +++ b/modules/benchmarks/src/largetable/BUILD.bazel @@ -0,0 +1,16 @@ +package(default_visibility = ["//visibility:public"]) + +load("@build_bazel_rules_typescript//:defs.bzl", "ts_library") + +ts_library( + name = "util_lib", + srcs = [ + "util.ts", + ], + tsconfig = "//packages:tsconfig", + deps = [ + "//modules/benchmarks/src:util_lib", + "//packages:types", + "//packages/core", + ], +) diff --git a/modules/benchmarks/src/largetable/render3/BUILD.bazel b/modules/benchmarks/src/largetable/render3/BUILD.bazel new file mode 100644 index 0000000000..5e80379875 --- /dev/null +++ b/modules/benchmarks/src/largetable/render3/BUILD.bazel @@ -0,0 +1,20 @@ +package(default_visibility = ["//visibility:public"]) + +load("@angular//:index.bzl", "ng_module") +load("@build_bazel_rules_typescript//:defs.bzl", "ts_library") + +ng_module( + name = "largetable_lib", + srcs = glob( + [ + "**/*.ts", + ], + ), + tsconfig = "//packages:tsconfig", + deps = [ + "//modules/benchmarks/src/largetable:util_lib", + "//packages:types", + "//packages/core", + "@rxjs", + ], +) diff --git a/modules/benchmarks/src/tree/BUILD.bazel b/modules/benchmarks/src/tree/BUILD.bazel new file mode 100644 index 0000000000..8d8ba0afff --- /dev/null +++ b/modules/benchmarks/src/tree/BUILD.bazel @@ -0,0 +1,16 @@ +package(default_visibility = ["//visibility:public"]) + +load("@build_bazel_rules_typescript//:defs.bzl", "ts_library") + +ts_library( + name = "util_lib", + srcs = [ + "util.ts", + ], + tsconfig = "//packages:tsconfig", + deps = [ + "//modules/benchmarks/src:util_lib", + "//packages:types", + "//packages/core", + ], +) diff --git a/modules/benchmarks/src/tree/render3/BUILD.bazel b/modules/benchmarks/src/tree/render3/BUILD.bazel new file mode 100644 index 0000000000..84f49e3867 --- /dev/null +++ b/modules/benchmarks/src/tree/render3/BUILD.bazel @@ -0,0 +1,20 @@ +package(default_visibility = ["//visibility:public"]) + +load("@angular//:index.bzl", "ng_module") +load("@build_bazel_rules_typescript//:defs.bzl", "ts_library") + +ng_module( + name = "render3_lib", + srcs = glob( + [ + "**/*.ts", + ], + ), + tsconfig = "//packages:tsconfig", + deps = [ + "//modules/benchmarks/src/tree:util_lib", + "//packages:types", + "//packages/core", + "@rxjs", + ], +) diff --git a/modules/benchmarks/src/tree/render3_function/BUILD.bazel b/modules/benchmarks/src/tree/render3_function/BUILD.bazel new file mode 100644 index 0000000000..ce8a2e6bcb --- /dev/null +++ b/modules/benchmarks/src/tree/render3_function/BUILD.bazel @@ -0,0 +1,21 @@ +package(default_visibility = ["//visibility:public"]) + +load("@angular//:index.bzl", "ng_module") +load("@build_bazel_rules_typescript//:defs.bzl", "ts_library") + +ng_module( + name = "render3_function_lib", + srcs = glob( + [ + "**/*.ts", + ], + ), + tsconfig = "//packages:tsconfig", + deps = [ + "//modules/benchmarks/src/tree:util_lib", + "//modules/benchmarks/src/tree/render3:render3_lib", + "//packages:types", + "//packages/core", + "@rxjs", + ], +)