mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-21 05:52:41 +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
|
type: env_var_name
|
||||||
default: CIRCLE_PROJECT_REPONAME
|
default: CIRCLE_PROJECT_REPONAME
|
||||||
steps:
|
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:
|
- devinfra/setup-bazel-remote-exec:
|
||||||
bazelrc: ./.bazelrc.user
|
shell: bash
|
||||||
|
|
||||||
install_python:
|
install_python:
|
||||||
steps:
|
steps:
|
||||||
@ -307,7 +317,6 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- custom_attach_workspace
|
- custom_attach_workspace
|
||||||
- setup_bazel_rbe
|
- setup_bazel_rbe
|
||||||
- run: sudo cp .circleci/bazel.rc /etc/bazel.bazelrc
|
|
||||||
- when:
|
- when:
|
||||||
# The default nodeversion runs all *excluding* other versions
|
# The default nodeversion runs all *excluding* other versions
|
||||||
condition:
|
condition:
|
||||||
@ -454,6 +463,7 @@ jobs:
|
|||||||
- checkout
|
- checkout
|
||||||
- rebase_pr_win
|
- rebase_pr_win
|
||||||
- setup_windows
|
- setup_windows
|
||||||
|
- setup_bazel_rbe
|
||||||
- restore_cache:
|
- restore_cache:
|
||||||
keys:
|
keys:
|
||||||
- *cache_key_win
|
- *cache_key_win
|
||||||
|
Loading…
x
Reference in New Issue
Block a user