ci: always set up RBE for bazel executions on CI (#34834)
Since we always execute our bazel commands using RBE on CI we should not have separete tasks of configuring bazel and setting up RBE for bazel. Enabling RBE for bazel should be part of our bazel configuration process on CI. PR Close #34834
This commit is contained in:
parent
f723a27a71
commit
ef665889a1
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
# Import config items common to both Linux and Windows setups.
|
# Import config items common to both Linux and Windows setups.
|
||||||
# https://docs.bazel.build/versions/master/guide.html#bazelrc-syntax-and-semantics
|
# https://docs.bazel.build/versions/master/guide.html#bazelrc-syntax-and-semantics
|
||||||
import %workspace%/.circleci/bazel.common.rc
|
try-import %workspace%/.circleci/bazel.common.rc
|
||||||
|
|
||||||
# Save downloaded repositories in a location that can be cached by CircleCI. This helps us
|
# 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.
|
# speeding up the analysis time significantly with Bazel managed node dependencies on the CI.
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
# Import config items common to both Linux and Windows setups.
|
# Import config items common to both Linux and Windows setups.
|
||||||
# https://docs.bazel.build/versions/master/guide.html#bazelrc-syntax-and-semantics
|
# https://docs.bazel.build/versions/master/guide.html#bazelrc-syntax-and-semantics
|
||||||
import %workspace%/.circleci/bazel.common.rc
|
try-import %workspace%/.circleci/bazel.common.rc
|
||||||
|
|
||||||
# Save downloaded repositories in a location that can be cached by CircleCI. This helps us
|
# 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.
|
# speeding up the analysis time significantly with Bazel managed node dependencies on the CI.
|
||||||
|
@ -182,6 +182,12 @@ commands:
|
|||||||
description: Set up CircleCI bazel configuration on Linux
|
description: Set up CircleCI bazel configuration on Linux
|
||||||
steps:
|
steps:
|
||||||
- run: sudo cp .circleci/bazel.linux.rc $HOME/.bazelrc
|
- run: sudo cp .circleci/bazel.linux.rc $HOME/.bazelrc
|
||||||
|
# We need ensure that the same default digest is used for encoding and decoding
|
||||||
|
# with openssl. Openssl versions might have different default digests which can
|
||||||
|
# cause decryption failures based on the openssl version. https://stackoverflow.com/a/39641378/4317734
|
||||||
|
- run: openssl aes-256-cbc -d -in .circleci/gcp_token -md md5 -k "$CI_REPO_NAME" -out /home/circleci/.gcp_credentials
|
||||||
|
- run: echo "export GOOGLE_APPLICATION_CREDENTIALS=/home/circleci/.gcp_credentials" >> $BASH_ENV
|
||||||
|
- run: ./.circleci/setup-rbe.sh .bazelrc.user
|
||||||
|
|
||||||
setup_circleci_bazel_config_win:
|
setup_circleci_bazel_config_win:
|
||||||
description: Set up CircleCI bazel configuration on Windows
|
description: Set up CircleCI bazel configuration on Windows
|
||||||
@ -193,16 +199,6 @@ commands:
|
|||||||
# cause decryption failures based on the openssl version. https://stackoverflow.com/a/39641378/4317734
|
# cause decryption failures based on the openssl version. https://stackoverflow.com/a/39641378/4317734
|
||||||
- run: openssl aes-256-cbc -d -in .circleci\gcp_token -md md5 -out "$env:APPDATA\gcloud\application_default_credentials.json" -k "$env:CIRCLE_PROJECT_REPONAME"
|
- run: openssl aes-256-cbc -d -in .circleci\gcp_token -md md5 -out "$env:APPDATA\gcloud\application_default_credentials.json" -k "$env:CIRCLE_PROJECT_REPONAME"
|
||||||
|
|
||||||
setup_bazel_rbe:
|
|
||||||
description: Setup bazel RBE remote execution
|
|
||||||
steps:
|
|
||||||
# We need ensure that the same default digest is used for encoding and decoding
|
|
||||||
# with openssl. Openssl versions might have different default digests which can
|
|
||||||
# cause decryption failures based on the openssl version. https://stackoverflow.com/a/39641378/4317734
|
|
||||||
- run: openssl aes-256-cbc -d -in .circleci/gcp_token -md md5 -k "$CI_REPO_NAME" -out /home/circleci/.gcp_credentials
|
|
||||||
- run: echo "export GOOGLE_APPLICATION_CREDENTIALS=/home/circleci/.gcp_credentials" >> $BASH_ENV
|
|
||||||
- run: ./.circleci/setup-rbe.sh .bazelrc.user
|
|
||||||
|
|
||||||
notify_webhook_on_fail:
|
notify_webhook_on_fail:
|
||||||
description: Notify a webhook about failure
|
description: Notify a webhook about failure
|
||||||
parameters:
|
parameters:
|
||||||
@ -288,8 +284,6 @@ jobs:
|
|||||||
- custom_attach_workspace
|
- custom_attach_workspace
|
||||||
- init_environment
|
- init_environment
|
||||||
- setup_circleci_bazel_config
|
- setup_circleci_bazel_config
|
||||||
# Setup remote execution and run RBE-compatible tests.
|
|
||||||
- setup_bazel_rbe
|
|
||||||
- run:
|
- run:
|
||||||
command: yarn bazel test //... --build_tag_filters=-ivy-only --test_tag_filters=-ivy-only
|
command: yarn bazel test //... --build_tag_filters=-ivy-only --test_tag_filters=-ivy-only
|
||||||
no_output_timeout: 20m
|
no_output_timeout: 20m
|
||||||
@ -303,11 +297,9 @@ jobs:
|
|||||||
- custom_attach_workspace
|
- custom_attach_workspace
|
||||||
- init_environment
|
- init_environment
|
||||||
- setup_circleci_bazel_config
|
- setup_circleci_bazel_config
|
||||||
- setup_bazel_rbe
|
# We need to explicitly specify the --symlink_prefix option because otherwise we would
|
||||||
|
# not be able to easily find the output bin directory when uploading artifacts for size
|
||||||
# We need to explicitly specify the --symlink_prefix option because otherwise we would
|
# measurements.
|
||||||
# not be able to easily find the output bin directory when uploading artifacts for size
|
|
||||||
# measurements.
|
|
||||||
- run:
|
- run:
|
||||||
command: yarn test-ivy-aot //... --symlink_prefix=dist/
|
command: yarn test-ivy-aot //... --symlink_prefix=dist/
|
||||||
no_output_timeout: 20m
|
no_output_timeout: 20m
|
||||||
@ -347,7 +339,6 @@ jobs:
|
|||||||
- custom_attach_workspace
|
- custom_attach_workspace
|
||||||
- init_environment
|
- init_environment
|
||||||
- setup_circleci_bazel_config
|
- setup_circleci_bazel_config
|
||||||
- setup_bazel_rbe
|
|
||||||
- run:
|
- run:
|
||||||
name: Run Bazel tests in saucelabs
|
name: Run Bazel tests in saucelabs
|
||||||
# All web tests are contained within a single //:saucelabs_unit_tests_poc target
|
# All web tests are contained within a single //:saucelabs_unit_tests_poc target
|
||||||
@ -377,7 +368,6 @@ jobs:
|
|||||||
- custom_attach_workspace
|
- custom_attach_workspace
|
||||||
- init_environment
|
- init_environment
|
||||||
- setup_circleci_bazel_config
|
- setup_circleci_bazel_config
|
||||||
- setup_bazel_rbe
|
|
||||||
- run:
|
- run:
|
||||||
name: Run Bazel tests on Saucelabs
|
name: Run Bazel tests on Saucelabs
|
||||||
# Runs the //:saucelabs_tests target with Saucelabs and Ivy.
|
# Runs the //:saucelabs_tests target with Saucelabs and Ivy.
|
||||||
@ -533,8 +523,6 @@ jobs:
|
|||||||
- custom_attach_workspace
|
- custom_attach_workspace
|
||||||
- init_environment
|
- init_environment
|
||||||
- setup_circleci_bazel_config
|
- setup_circleci_bazel_config
|
||||||
- setup_bazel_rbe
|
|
||||||
|
|
||||||
- run: node scripts/build-packages-dist.js
|
- run: node scripts/build-packages-dist.js
|
||||||
|
|
||||||
# Save the npm packages from //packages/... for other workflow jobs to read
|
# Save the npm packages from //packages/... for other workflow jobs to read
|
||||||
@ -561,8 +549,6 @@ jobs:
|
|||||||
- custom_attach_workspace
|
- custom_attach_workspace
|
||||||
- init_environment
|
- init_environment
|
||||||
- setup_circleci_bazel_config
|
- setup_circleci_bazel_config
|
||||||
- setup_bazel_rbe
|
|
||||||
|
|
||||||
- run: node scripts/build-ivy-npm-packages.js
|
- run: node scripts/build-ivy-npm-packages.js
|
||||||
|
|
||||||
# Save the npm packages from //packages/... for other workflow jobs to read
|
# Save the npm packages from //packages/... for other workflow jobs to read
|
||||||
@ -743,9 +729,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- custom_attach_workspace
|
- custom_attach_workspace
|
||||||
- init_environment
|
- init_environment
|
||||||
# Although RBE is configured below for the Material repo, also setup RBE in the Angular repo
|
- setup_circleci_bazel_config
|
||||||
# to provision Angular's GCP token into the environment variables.
|
|
||||||
- setup_bazel_rbe
|
|
||||||
# Restore the cache before cloning the repository because the clone script re-uses
|
# Restore the cache before cloning the repository because the clone script re-uses
|
||||||
# the restored repository if present. This reduces the amount of times the components
|
# the restored repository if present. This reduces the amount of times the components
|
||||||
# repository needs to be cloned (this is slow and increases based on commits in the repo).
|
# repository needs to be cloned (this is slow and increases based on commits in the repo).
|
||||||
@ -791,7 +775,6 @@ jobs:
|
|||||||
- custom_attach_workspace
|
- custom_attach_workspace
|
||||||
- init_environment
|
- init_environment
|
||||||
- setup_circleci_bazel_config
|
- setup_circleci_bazel_config
|
||||||
- setup_bazel_rbe
|
|
||||||
# Install
|
# Install
|
||||||
- run: yarn --cwd packages/zone.js install --frozen-lockfile --non-interactive
|
- run: yarn --cwd packages/zone.js install --frozen-lockfile --non-interactive
|
||||||
# Run zone.js tools tests
|
# Run zone.js tools tests
|
||||||
|
Loading…
x
Reference in New Issue
Block a user