Skip to content
This repository was archived by the owner on Mar 20, 2024. It is now read-only.

Commit f06cf04

Browse files
CaerusKaruAdam Plumer
authored and
Adam Plumer
committed
build: upgrade to Angular v9 and switch to Bazel
1 parent f11c8ff commit f06cf04

File tree

101 files changed

+8517
-16175
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

101 files changed

+8517
-16175
lines changed

.bazelignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules

.bazelrc

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
###############################
2+
# Filesystem interactions #
3+
###############################
4+
5+
# Don't create bazel-* symlinks in the WORKSPACE directory.
6+
# These require .gitignore and may scare users. Also, it's a workaround for
7+
# https://github.com/bazelbuild/rules_typescript/issues/12 which affects the common case of
8+
# having `tsconfig.json` in the WORKSPACE directory. Instead, you should run
9+
# `bazel info output_base` to find out where the outputs went.
10+
build --symlink_prefix=/
11+
12+
# Performance: avoid stat'ing input files
13+
build --watchfs
14+
15+
# Turn off legacy external runfiles
16+
build --nolegacy_external_runfiles
17+
run --nolegacy_external_runfiles
18+
test --nolegacy_external_runfiles
19+
20+
# This flag is needed to so that the bazel cache is not invalidated
21+
# when running bazel via `yarn bazel`.
22+
build --incompatible_strict_action_env
23+
24+
# Do not build runfile forests by default. If an execution strategy relies on runfile
25+
# forests, the forest is created on-demand. See: https://github.com/bazelbuild/bazel/issues/6627
26+
# and https://github.com/bazelbuild/bazel/commit/03246077f948f2790a83520e7dccc2625650e6df
27+
build --nobuild_runfile_links
28+
29+
###############################
30+
# Output control #
31+
###############################
32+
33+
# A more useful default output mode for bazel query
34+
# Prints eg. "ng_module rule //foo:bar" rather than just "//foo:bar"
35+
query --output=label_kind
36+
37+
# By default, failing tests don't print any output, it goes to the log file
38+
test --test_output=errors
39+
40+
#################################
41+
# Release configuration. #
42+
# Run with "--config=release" #
43+
#################################
44+
45+
# Configures script to do version stamping.
46+
# See https://docs.bazel.build/versions/master/user-manual.html#flag--workspace_status_command
47+
build:release --workspace_status_command="node ./tools/bazel-stamp-vars.js"
48+
build:release --stamp
49+
50+
################################
51+
# View Engine / Ivy toggle #
52+
################################
53+
build:view-engine --define=angular_ivy_enabled=False
54+
build:ivy --define=angular_ivy_enabled=True
55+
56+
# Set Ivy as the default
57+
build --config=ivy
58+
59+
################################
60+
# --config=debug #
61+
################################
62+
63+
# Enable debugging tests with --config=debug
64+
test:debug --test_arg=--node_options=--inspect-brk --test_output=streamed --test_strategy=exclusive --test_timeout=9999 --nocache_test_results
65+
66+
################################
67+
# Local Environment Setup #
68+
# Needs to be last statement #
69+
################################
70+
# Load any settings which are specific to the current user. Needs to be *last* statement
71+
# in this config, as the user configuration should be able to overwrite flags from this file.
72+
try-import .bazelrc.user

.bazelversion

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.0.0

.circleci/.bazelrc

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Bazel configuration that will be copied to /etc/bazel.bazelrc in CircleCI containers.
2+
# This allows us adding specific configuration flags for builds within CircleCI.
3+
# See more: https://docs.bazel.build/versions/master/user-manual.html#where-are-the-bazelrc-files
4+
5+
# Print all enabled Bazel flags in CI mode. This makes it easier to debug and reproduce
6+
# Bazel issues that show up on CircleCI.
7+
common --announce_rc
8+
9+
# Save downloaded repositories in a location that can be cached by CircleCI. This helps us
10+
# speeding up the analysis time significantly with Bazel managed node dependencies on the CI.
11+
build --repository_cache=/home/circleci/bazel_repository_cache
12+
13+
# Workaround https://github.com/bazelbuild/bazel/issues/3645. Bazel doesn't calculate the
14+
# memory ceiling correctly when running under Docker. Limit Bazel to consuming resources that
15+
# fit in CircleCI "xlarge" class. https://circleci.com/docs/2.0/configuration-reference/#resource_class
16+
# Note that we use less than the available RAM as bazel only estimates memory for actions
17+
# and we don't want to accidentally run out of memory.
18+
build --local_ram_resources=14336
19+
build --local_cpu_resources=8

0 commit comments

Comments
 (0)