mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
build: cache bazel managed node modules (#13352)
* build: cache bazel managed node modules * Since we recently switched to Bazel managed dependencies, we need to cache the repository cache of our workspace because otherwise CircleCI will analyze the Bazel managed dependencies for each run (which takes multiple minutes) * Improve comment
This commit is contained in:
committed by
vivian-hu
parent
4345245cf3
commit
913d08e0f2
@@ -0,0 +1,7 @@
|
||||
# Bazel configuration that will be copied to /etc/bazel.bazelrc in CircleCI containers.
|
||||
# This allows us adding specific configuration flags for builds within CircleCI.
|
||||
# See more: https://docs.bazel.build/versions/master/user-manual.html#where-are-the-bazelrc-files
|
||||
|
||||
# Save downloaded repositories in a location that can be cached by CircleCI. This helps us
|
||||
# speeding up the analysis time significantly with Bazel managed node dependencies on the CI.
|
||||
build --experimental_repository_cache=/home/circleci/bazel_repository_cache
|
||||
@@ -44,6 +44,8 @@ jobs:
|
||||
<<: *post_checkout
|
||||
- restore_cache:
|
||||
key: *cache_key
|
||||
# Set up the CircleCI specific bazel configuration.
|
||||
- run: sudo cp ./.circleci/bazel.rc /etc/bazel.bazelrc
|
||||
|
||||
# TODO(jelbourn): Update this command to run all tests if the Bazel issues have been fixed.
|
||||
- run: bazel test src/{cdk,lib}/schematics:unit_tests
|
||||
@@ -52,6 +54,7 @@ jobs:
|
||||
key: *cache_key
|
||||
paths:
|
||||
- "node_modules"
|
||||
- "~/bazel_repository_cache"
|
||||
|
||||
workflows:
|
||||
version: 2
|
||||
|
||||
Reference in New Issue
Block a user