mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
build: do not run bazel through yarn and nodejs
We don't want to run Bazel through Yarn or NodeJS as that could mean that Bazel runs with limited memory.
This commit is contained in:
committed by
Jeremy Elbourn
parent
a2e04317b1
commit
39818135d3
+23
-9
@@ -116,6 +116,13 @@ var_16: &setup_bazel_remote_execution
|
||||
name: "Setup bazel RBE remote execution"
|
||||
command: ./scripts/circleci/bazel/setup-remote-execution.sh
|
||||
|
||||
# Sets up the bazel binary globally. We don't want to access bazel through Yarn and NodeJS
|
||||
# because it could mean that the Bazel child process only has access to limited memory.
|
||||
var_17: &setup_bazel_binary
|
||||
run:
|
||||
name: "Setting up global Bazel binary"
|
||||
command: ./scripts/circleci/setup_bazel_binary.sh
|
||||
|
||||
# -----------------------------
|
||||
# Container version of CircleCI
|
||||
# -----------------------------
|
||||
@@ -138,12 +145,13 @@ jobs:
|
||||
steps:
|
||||
- *checkout_code
|
||||
- *restore_cache
|
||||
- *setup_bazel_binary
|
||||
- *setup_bazel_ci_config
|
||||
- *setup_bazel_remote_execution
|
||||
- *yarn_download
|
||||
- *yarn_install
|
||||
|
||||
- run: yarn bazel build src/... --build_tag_filters=-docs-package
|
||||
- run: bazel build src/... --build_tag_filters=-docs-package
|
||||
|
||||
# --------------------------------------------------------------------------------------------
|
||||
# Job that runs ts-api-guardian against our API goldens in "tools/public_api_guard".
|
||||
@@ -157,12 +165,13 @@ jobs:
|
||||
steps:
|
||||
- *checkout_code
|
||||
- *restore_cache
|
||||
- *setup_bazel_binary
|
||||
- *setup_bazel_ci_config
|
||||
- *setup_bazel_remote_execution
|
||||
- *yarn_download
|
||||
- *yarn_install
|
||||
|
||||
- run: yarn bazel test tools/public_api_guard/...
|
||||
- run: bazel test tools/public_api_guard/...
|
||||
|
||||
# -----------------------------------------------------------------
|
||||
# Job that runs the e2e tests with Protractor and Chromium headless
|
||||
@@ -175,12 +184,13 @@ jobs:
|
||||
steps:
|
||||
- *checkout_code
|
||||
- *restore_cache
|
||||
- *setup_bazel_binary
|
||||
- *setup_bazel_ci_config
|
||||
- *setup_bazel_remote_execution
|
||||
- *yarn_download
|
||||
- *yarn_install
|
||||
|
||||
- run: yarn bazel test src/... --test_tag_filters=e2e
|
||||
- run: bazel test src/... --test_tag_filters=e2e
|
||||
|
||||
# ------------------------------------------------------------------------------------------
|
||||
# Job that runs the unit tests on locally installed browsers (Chrome and Firefox headless).
|
||||
@@ -194,12 +204,13 @@ jobs:
|
||||
steps:
|
||||
- *checkout_code
|
||||
- *restore_cache
|
||||
- *setup_bazel_binary
|
||||
- *setup_bazel_ci_config
|
||||
- *setup_bazel_remote_execution
|
||||
- *yarn_download
|
||||
- *yarn_install
|
||||
|
||||
- run: yarn bazel test src/... --build_tag_filters=-e2e --test_tag_filters=-e2e
|
||||
- run: bazel test src/... --build_tag_filters=-e2e --test_tag_filters=-e2e
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Job that runs the unit tests on Browserstack. The browsers that will be used
|
||||
@@ -343,6 +354,7 @@ jobs:
|
||||
- *checkout_code
|
||||
- *restore_cache
|
||||
- *attach_release_output
|
||||
- *setup_bazel_binary
|
||||
- *setup_bazel_ci_config
|
||||
- *setup_bazel_remote_execution
|
||||
- *yarn_download
|
||||
@@ -355,7 +367,7 @@ jobs:
|
||||
|
||||
# TODO(devversion): Ideally the "build_release_packages" job should build all packages with
|
||||
# Bazel, but for now we mix up the Gulp and bazel setup, so we need to build the package here.
|
||||
- run: yarn bazel build src/material-examples:npm_package --config=release
|
||||
- run: bazel build src/material-examples:npm_package --config=release
|
||||
|
||||
- run: ./scripts/circleci/publish-snapshots.sh
|
||||
|
||||
@@ -392,6 +404,7 @@ jobs:
|
||||
steps:
|
||||
- *checkout_code
|
||||
- *restore_cache
|
||||
- *setup_bazel_binary
|
||||
- *setup_bazel_ci_config
|
||||
- *setup_bazel_remote_execution
|
||||
- *yarn_download
|
||||
@@ -409,8 +422,8 @@ jobs:
|
||||
# Issue is tracked with FW-1004.
|
||||
- run: sed -i "s/\(_ENABLE_NG_TYPE_CHECKING = \)True/\1False/g" tools/defaults.bzl
|
||||
# Run project tests with ngtsc and the Ivy Angular packages.
|
||||
- run: yarn bazel build src/... --build_tag_filters=-docs-package --define=compile=aot
|
||||
- run: yarn bazel test src/... --build_tag_filters=-docs-package --define=compile=aot --test_tag_filters=-e2e
|
||||
- run: bazel build src/... --build_tag_filters=-docs-package --define=compile=aot
|
||||
- run: bazel test src/... --build_tag_filters=-docs-package --define=compile=aot --test_tag_filters=-e2e
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Job that runs all Bazel tests against Ivy from angular/angular#master.
|
||||
@@ -423,6 +436,7 @@ jobs:
|
||||
steps:
|
||||
- *checkout_code
|
||||
- *restore_cache
|
||||
- *setup_bazel_binary
|
||||
- *setup_bazel_ci_config
|
||||
- *setup_bazel_remote_execution
|
||||
- *yarn_download
|
||||
@@ -435,8 +449,8 @@ jobs:
|
||||
# Issue is tracked with FW-1004.
|
||||
- run: sed -i "s/\(_ENABLE_NG_TYPE_CHECKING = \)True/\1False/g" tools/defaults.bzl
|
||||
# Run project tests with ngtsc and the Ivy Angular packages.
|
||||
- run: yarn bazel build src/... --build_tag_filters=-docs-package --define=compile=aot
|
||||
- run: yarn bazel test src/... --build_tag_filters=-docs-package --define=compile=aot --test_tag_filters=-e2e
|
||||
- run: bazel build src/... --build_tag_filters=-docs-package --define=compile=aot
|
||||
- run: bazel test src/... --build_tag_filters=-docs-package --define=compile=aot --test_tag_filters=-e2e
|
||||
|
||||
# ----------------------------------------------------------------------------------------
|
||||
# Workflow definitions. A workflow usually groups multiple jobs together. This is useful if
|
||||
|
||||
Executable
+10
@@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
bazelBin=$(node -p "require('@bazel/bazel').getNativeBinary()")
|
||||
|
||||
# Provide the bazel binary globally. We don't want to access the binary
|
||||
# through Node as it could result in limited memory.
|
||||
sudo chmod a+x ${bazelBin}
|
||||
sudo ln -fs ${bazelBin} /usr/local/bin/bazel
|
||||
@@ -24,7 +24,7 @@ docsDistPath="${projectPath}/dist/docs"
|
||||
docsContentPath="${projectPath}/tmp/material2-docs-content"
|
||||
|
||||
# Path to the release output of the Bazel "@angular/material-examples" NPM package.
|
||||
examplesPackagePath="$(yarn -s bazel info bazel-bin)/src/material-examples/npm_package"
|
||||
examplesPackagePath="$(bazel info bazel-bin)/src/material-examples/npm_package"
|
||||
|
||||
# Git clone URL for the material2-docs-content repository.
|
||||
docsContentRepoUrl="https://github.com/angular/material2-docs-content"
|
||||
|
||||
Reference in New Issue
Block a user