mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-18 20:02:40 +08:00
ci: enable HTTP caching for Bazel on Windows
This commit enables Bazel HTTP caching for Windows runs. Before: ``` bazel-e2e-cli-win: 22m 39s ``` After: ``` bazel-e2e-cli-win: 8m 32s ```
This commit is contained in:
parent
56423f0a37
commit
c07fbf672d
5
.circleci/bazel.linux.rc
Normal file
5
.circleci/bazel.linux.rc
Normal file
@ -0,0 +1,5 @@
|
||||
# Import config items common to both Linux and Windows setups.
|
||||
# https://docs.bazel.build/versions/master/guide.html#bazelrc-syntax-and-semantics
|
||||
import %workspace%/.circleci/bazel.common.rc
|
||||
|
||||
build --config=remote
|
8
.circleci/bazel.windows.rc
Normal file
8
.circleci/bazel.windows.rc
Normal file
@ -0,0 +1,8 @@
|
||||
# Import config items common to both Linux and Windows setups.
|
||||
# https://docs.bazel.build/versions/master/guide.html#bazelrc-syntax-and-semantics
|
||||
import %workspace%/.circleci/bazel.common.rc
|
||||
|
||||
build --remote_cache=https://storage.googleapis.com/angular-cli-windows-bazel-cache
|
||||
build --remote_accept_cached=true
|
||||
build --remote_upload_local_results=true
|
||||
build --google_default_credentials
|
@ -144,9 +144,19 @@ commands:
|
||||
type: env_var_name
|
||||
default: CIRCLE_PROJECT_REPONAME
|
||||
steps:
|
||||
- run: sudo cp .circleci/bazel.rc /etc/bazel.bazelrc
|
||||
- run:
|
||||
name: 'Copy Bazel RC'
|
||||
shell: bash
|
||||
command: |
|
||||
# Conditionally, copy bazel configuration based on the current VM
|
||||
# operating system running. We detect Windows by checking for `%AppData%`.
|
||||
if [[ -n "${APPDATA}" ]]; then
|
||||
cp "./.circleci/bazel.windows.rc" ".bazelrc.user";
|
||||
else
|
||||
cp "./.circleci/bazel.linux.rc" ".bazelrc.user";
|
||||
fi
|
||||
- devinfra/setup-bazel-remote-exec:
|
||||
bazelrc: ./.bazelrc.user
|
||||
shell: bash
|
||||
|
||||
install_python:
|
||||
steps:
|
||||
@ -307,7 +317,6 @@ jobs:
|
||||
steps:
|
||||
- custom_attach_workspace
|
||||
- setup_bazel_rbe
|
||||
- run: sudo cp .circleci/bazel.rc /etc/bazel.bazelrc
|
||||
- when:
|
||||
# The default nodeversion runs all *excluding* other versions
|
||||
condition:
|
||||
@ -454,6 +463,7 @@ jobs:
|
||||
- checkout
|
||||
- rebase_pr_win
|
||||
- setup_windows
|
||||
- setup_bazel_rbe
|
||||
- restore_cache:
|
||||
keys:
|
||||
- *cache_key_win
|
||||
|
Loading…
x
Reference in New Issue
Block a user