Commit Graph

36 Commits

Author SHA1 Message Date
Joey Perrott 19a28e599b build: Add incompatible_list_based_execution_strategy_selection flags back in (#31471)
PR Close #31471
2019-07-12 11:38:16 -04:00
Alex Eagle 14ad7562c6 build: use remote actions for TS/NG compilations on CircleCI (#31471)
PR Close #31471
2019-07-12 11:38:16 -04:00
Joey Perrott e92fb68f3c build: remove usage of deprecated experimental_ui bazel flag (#31457)
PR Close #31457
2019-07-09 13:50:01 -07:00
Greg Magolan 64e7af4e43 build(bazel): add build --incompatible_list_based_execution_strategy_selection=false flag (#31325)
This option is changed to true in Bazel 0.27 and exposes a possible
regression in Bazel 0.27.0.
Error observed is in npm_package target `//packages/common/locales:package`:
```
ERROR: /home/circleci/ng/packages/common/locales/BUILD.bazel:13:1: Assembling
npm package packages/common/locales/package failed: No usable spawn strategy found
for spawn with mnemonic SkylarkAction.  Your --spawn_strategyor --strategy flags
are probably too strict. Visit https://github.com/bazelbuild/bazel/issues/7480 for
migration advises
```
Suspect is https://github.com/bazelbuild/rules_nodejs/blob/master/internal/npm_package/npm_package.bzl#L75-L82:
```
 execution_requirements = {
    # Never schedule this action remotely because it's not computationally expensive.
    # It just copies files into a directory; it's not worth copying inputs and outputs to a remote worker.
    # Also don't run it in a sandbox, because it resolves an absolute path to the bazel-out directory
    # allowing the .pack and .publish runnables to work with no symlink_prefix
    # See https://github.com/bazelbuild/rules_nodejs/issues/187
    "local": "1",
},
```

PR Close #31325
2019-07-01 14:16:42 -07:00
Greg Magolan 361109d80f build: update to rules_nodejs 0.32.2 (#31325)
Brings in ts_library fixes required to get angular/angular building after 0.32.0:
typescript: exclude typescript lib declarations in node_module_library transitive_declarations
typescript: remove override of @bazel/tsetse (+1 squashed commit)

@npm//node_modules/foobar:foobar.js labels changed to @npm//:node_modules/foobar/foobar.js with fix for bazelbuild/rules_nodejs#802

also updates to rules_rass commit compatible with rules_nodejs 0.32.0

PR Close #31325
2019-07-01 14:16:42 -07:00
Greg Magolan b7a099d27e build(bazel): update to bazel 0.27.0 and fix compat in @angular/bazel package (#31325)
ctx.actions.declare_file now used in @angular/bazel ng_module rule as ctx.new_file is now deprecated. Fixes error:

```
        File "ng_module.bzl", line 272, in _expected_outs
                ctx.new_file(ctx.genfiles_dir, (ctx.label.name ..."))
Use ctx.actions.declare_file instead of ctx.new_file.
Use --incompatible_new_actions_api=false to temporarily disable this check.
```

This can be worked around with incompatible_new_actions_api flag but may as well fix it proper so downstream doesn't require this flag due to this code.

Also, depset() is no longer iterable by default without a flag. This required fixing in a few spots in @angular/bazel.

fix: foo

PR Close #31325
2019-07-01 14:16:42 -07:00
Alex Rickabaugh 280e8563f0 Revert "build(bazel): update to bazel 0.27.0 and fix compat in @angular/bazel package (#31019)" (#31267)
This reverts commit 28d3bfc416.

Reason: this causes failures in g3 with i18n extraction. See #31267.

PR Close #31267
2019-06-25 14:36:01 -07:00
Alex Rickabaugh 660800ca4e Revert "build: update to rules_nodejs 0.32.2 (#31019)" (#31267)
This reverts commit a38433f36b.

Reason: this causes failures in g3 with i18n extraction. See #31267.

PR Close #31267
2019-06-25 14:36:00 -07:00
Alex Rickabaugh 35acd44a07 Revert "build(bazel): add build --incompatible_list_based_execution_strategy_selection=false flag (#31019)" (#31267)
This reverts commit ab27337612.

Reason: this causes failures in g3 with i18n extraction. See #31267.

PR Close #31267
2019-06-25 14:36:00 -07:00
Joey Perrott e8d0265c1e ci: enable remote build caching for CI jobs (#31204)
Enables remote caching for CI jobs.

This configuration:

always reads from build cache on CI
only write to build cache for local builds for non-PR CI run

PR Close #31204
2019-06-25 10:26:43 -07:00
Greg Magolan ab27337612 build(bazel): add build --incompatible_list_based_execution_strategy_selection=false flag (#31019)
This option is changed to true in Bazel 0.27 and exposes a possible
regression in Bazel 0.27.0.
Error observed is in npm_package target `//packages/common/locales:package`:
```
ERROR: /home/circleci/ng/packages/common/locales/BUILD.bazel:13:1: Assembling
npm package packages/common/locales/package failed: No usable spawn strategy found
for spawn with mnemonic SkylarkAction.  Your --spawn_strategyor --strategy flags
are probably too strict. Visit https://github.com/bazelbuild/bazel/issues/7480 for
migration advises
```
Suspect is https://github.com/bazelbuild/rules_nodejs/blob/master/internal/npm_package/npm_package.bzl#L75-L82:
```
 execution_requirements = {
    # Never schedule this action remotely because it's not computationally expensive.
    # It just copies files into a directory; it's not worth copying inputs and outputs to a remote worker.
    # Also don't run it in a sandbox, because it resolves an absolute path to the bazel-out directory
    # allowing the .pack and .publish runnables to work with no symlink_prefix
    # See https://github.com/bazelbuild/rules_nodejs/issues/187
    "local": "1",
},
```

PR Close #31019
2019-06-25 10:21:07 -07:00
Greg Magolan a38433f36b build: update to rules_nodejs 0.32.2 (#31019)
Brings in ts_library fixes required to get angular/angular building after 0.32.0:
typescript: exclude typescript lib declarations in node_module_library transitive_declarations
typescript: remove override of @bazel/tsetse (+1 squashed commit)

@npm//node_modules/foobar:foobar.js labels changed to @npm//:node_modules/foobar/foobar.js with fix for bazelbuild/rules_nodejs#802

also updates to rules_rass commit compatible with rules_nodejs 0.32.0

PR Close #31019
2019-06-25 10:21:07 -07:00
Greg Magolan 28d3bfc416 build(bazel): update to bazel 0.27.0 and fix compat in @angular/bazel package (#31019)
ctx.actions.declare_file now used in @angular/bazel ng_module rule as ctx.new_file is now deprecated. Fixes error:

```
        File "ng_module.bzl", line 272, in _expected_outs
                ctx.new_file(ctx.genfiles_dir, (ctx.label.name ..."))
Use ctx.actions.declare_file instead of ctx.new_file.
Use --incompatible_new_actions_api=false to temporarily disable this check.
```

This can be worked around with incompatible_new_actions_api flag but may as well fix it proper so downstream doesn't require this flag due to this code.

Also, depset() is no longer iterable by default without a flag. This required fixing in a few spots in @angular/bazel.

fix: foo

PR Close #31019
2019-06-25 10:21:06 -07:00
Joey Perrott 131e2440f2 build: Set up Build Event Service Configuration for RBE executed bazel (#31197)
The Build Event Service (https://docs.bazel.build/versions/master/build-event-protocol.html#the-build-event-service),
allows for build events from bazel builds to be transmitted as opaque bytes to be processed.

Our usage is to send our build events to a Build Event Service an Angular team owned Google Cloud Project which collects
build results and makes each invocation available via a provided URL to view.  The information uploaded includes information
about the build environment, configuration, build status/events, build options, results and actions.

Build Event Protocol Proto: https://github.com/bazelbuild/bazel/blob/0.27.0/src/main/java/com/google/devtools/build/lib/buildeventstream/proto/build_event_stream.proto

PR Close #31197
2019-06-21 15:28:50 -07:00
Paul Gschwendtner 7b3bcc23af build: user bazelrc should be able to overwrite all flags (#31164)
After eb00a37eb8 we accidentally regressed due to some
recent changes where more flags were added at the end of the bazelrc. This means that all
flags which were added after the `try-import` can no longer be overwritten easily in the
user project bazelrc file. Technically developers can always overwrite flags though the
command line, but it's a productivity blocker if developers can't permanently overwrite these
flags  through the user config

PR Close #31164
2019-06-20 11:18:12 -07:00
Greg Magolan a794143820 build(bazel): update to nodejs rules 0.31.1 (#30627)
* entry_point attribute of nodejs_binary & rollup_bundle is now a label
* symlinking of node_modules for yarn_install temporarily disabled (except for integration/bazel) until the fix for https://github.com/bazelbuild/bazel/issues/8487 makes it into a future bazel release

PR Close #30627
2019-06-11 00:03:11 +00:00
Greg Magolan ba83d33dd0 build(bazel): update to nodejs rules 0.30.1 & bazel 0.26.0 (#30627)
nodejs rules 0.30.1 has new feature to symlink node_modules with yarn_install and bazel 0.26.0 includes new managed_directories feature which enables this

PR Close #30627
2019-06-11 00:03:11 +00:00
Xin Gao 9abf114fbb feat(bazel): use rbe_autoconfig() and new container. (#29336)
After this PR is merged, maintainers no longer need to update .bazelrc
file, toolchain and platform related flags for RBE builds and tests
(unless there is a breaking change in Bazel related to those flags).

Maintainers just need to update the pin of @bazel-toolchains repo
regularly in the packages/bazel/package.bzl file according to
https://releases.bazel.build/bazel-toolchains.html to include the
latest checked-in toolchain configs. If rbe_autoconfig() cannot find
appropriate toolchain configs for the version of Bazel in the version of
@bazel_toolchains repo that is currently used by this project, it will pull
down the container and generate the configs on the fly as the beginning
of the build/test.

PR Close #29336
2019-05-09 14:58:34 -07:00
Yun Peng 701da0099b build: Remove --watchfs from bazelrc file (#29635)
--watchfs is causing the build to be flaky on Windows because Bazel
doesn't have proper support for watchfs on Windows, but it doesn't seem
to bring much performance on Linux, either.

Fixes: https://github.com/angular/angular/issues/29541

PR Close #29635
2019-04-01 14:57:30 -07:00
Alex Eagle aaa8a3a957 build: update bazel to 0.24 (#29530)
PR Close #29530
2019-03-27 13:45:29 -07:00
Alex Eagle 410ccacf38 build: disable tsc_wrapped workers (#29197)
Angular devs are hitting a bug with typings forcing them to run "bazel shutdown"

PR Close #29197
2019-03-14 13:11:36 -04:00
Paul Gschwendtner eb00a37eb8 build: user bazelrc should be able to overwrite existing flags (#29279)
Currently the project `bazelrc` file imports a user bazelrc if present. This
has been added in order to allow user-specific Bazel configuration settings
when working within the Angular project. Since we currently import that
user configuration before setting the project-specific settings, it's not
possible for developers to overwrite given options (e.g. the `symlink_prefix`).

Moving the import to the end of the file solves that problem.

PR Close #29279
2019-03-13 10:38:58 -07:00
Greg Magolan 75357ecb32 build(bazel): run a number of web tests with karma_web_test in saucelabs in CircleCI (#27721)
PR Close #27721
2019-02-22 13:07:08 -08:00
Greg Magolan e4f67dfe66 build(bazel): update to bazel 0.22.0 and turn on --incompatible_strict_action_env flag (#28404)
PR Close #28404
2019-01-28 11:48:41 -08:00
Alex Eagle 9a965c9145 build: create dist/bin symlink with Bazel outputs (#27781)
Note that we had nasty problems in the past when this was enabled, but those have supposedly been fixed.

PR Close #27781
2019-01-22 09:52:46 -08:00
Filipe Silva d6cfe2ed7e build: use cross platform workspace_status_command (#27431)
PR Close #27431
2019-01-09 10:47:13 -08:00
Greg Magolan e7f43386a6 build: update to Bazel 0.21.0 (#27935)
PR Close #27935
2019-01-04 18:38:44 -08:00
Alex Eagle 44dd764d6d build: update to Bazel 0.20 (#27394)
refactor Bazel RBE configs

PR Close #27394
2018-12-07 14:29:03 -08:00
Minko Gechev 7f221d8d2a build: introduce remote bazel caching (#27358)
This PR introduces:

1. Google Cloud Store bucket which contains build artifacts
2. Documentation on how to enable remote caching in development

Each team member should download a service key. More convenient ways of authentication would be more obscure and prevent us from doing identity tracking of the produced artifacts.

PR Close #27358
2018-12-06 11:25:03 -08:00
Alex Eagle f5f323dae0 build: only stamp version info when releasing (#27362)
Also build releases into a dedicated output_base so you can't
accidentally publish with outdated version stamp.

Bump the version of rules_nodejs so we don't need to create the
symlink_prefixes for the .publish command to work.

PR Close #27362
2018-11-30 16:08:23 -08:00
Igor Minar 572fd7a79a build(ivy): remove the remains of ivy-jit mode (#27278)
This stuff is obsolete and shouldn't be here because we removed the JIT mode on CI.

PR Close #27278
2018-11-27 10:30:58 -08:00
Greg Magolan 3da82338d1 build(bazel): turn on --nolegacy-external-runfiles (#26770)
PR Close #26770
2018-11-14 12:23:38 -08:00
Alex Eagle 30d6233e83 build: update ngcontainer to bazel 0.18.0 (#26465) (#26488)
* build: update ngcontainer to bazel 0.18.0

* build: update skylint to bazel 0.18

use .bazelignore file to ignore node_modules directory

PR Close #26488
2018-10-19 20:59:29 -07:00
Alex Eagle a9f3e2bd95 build: Upgrade to TypeScript 2.5 (#20175)
- update to TypeScript 2.5
- point the 2.4 typings test at the previous typescript version, so we
  don't break it accidentally
- widen the peerDeps from Angular packages that depend on TypeScript
- update to latest TypeScript 2.5 compatible Bazel rules
- move .bazelrc to tools/bazel.rc per https://docs.bazel.build/versions/master/best-practices.html#bazelrc

PR Close #20175
2017-11-15 18:12:16 -06:00
Alex Eagle fef3d2ad53 build: ngc-wrapped as a bazel worker (#18960)
PR Close #18960
2017-09-01 12:23:11 -05:00
Alex Eagle 5faf520067 build: Introduce Bazel build rules
So far this just compiles the core and common packages.
2017-06-05 11:18:20 -07:00