ci: setup windows from scratch (#39139)
Rather than setting up windows by relying on attaching the saved workspace failes from the previous step, instead checkout and install the yarn items within the windows steps. Additionally, since the bazel remote cache is used and relied on, saving the cached results of the bazel runs to be resumed on subsequent runs does not provide enough value to make it worth the time consumed. PR Close #39139
This commit is contained in:
parent
90e9574ac7
commit
0e5a945ed4
|
@ -27,8 +27,6 @@ var_3: &cache_key v7-angular-node-12-{{ checksum ".bazelversion" }}-{{ checksum
|
||||||
# folder will contain all previously used versions and ultimately cause the cache restoring to
|
# folder will contain all previously used versions and ultimately cause the cache restoring to
|
||||||
# be slower due to its growing size.
|
# be slower due to its growing size.
|
||||||
var_4: &cache_key_fallback v7-angular-node-12-{{ checksum ".bazelversion" }}
|
var_4: &cache_key_fallback v7-angular-node-12-{{ checksum ".bazelversion" }}
|
||||||
var_3_win: &cache_key_win v7-angular-win-node-12-{{ checksum ".bazelversion" }}-{{ checksum "yarn.lock" }}-{{ checksum "WORKSPACE" }}-{{ checksum "packages/bazel/package.bzl" }}-{{ checksum "aio/yarn.lock" }}
|
|
||||||
var_4_win: &cache_key_win_fallback v7-angular-win-node-12-{{ checksum ".bazelversion" }}
|
|
||||||
|
|
||||||
# Cache key for the `components-repo-unit-tests` job. **Note** when updating the SHA in the
|
# Cache key for the `components-repo-unit-tests` job. **Note** when updating the SHA in the
|
||||||
# cache keys also update the SHA for the "COMPONENTS_REPO_COMMIT" environment variable.
|
# cache keys also update the SHA for the "COMPONENTS_REPO_COMMIT" environment variable.
|
||||||
|
@ -183,23 +181,12 @@ commands:
|
||||||
setup_win:
|
setup_win:
|
||||||
description: Setup windows node environment
|
description: Setup windows node environment
|
||||||
steps:
|
steps:
|
||||||
# Use the Linux workspace directly, as it already has checkout, rebased and node modules.
|
- checkout
|
||||||
- custom_attach_workspace
|
|
||||||
# Install Bazel pre-requisites that aren't in the preconfigured CircleCI Windows VM.
|
# Install Bazel pre-requisites that aren't in the preconfigured CircleCI Windows VM.
|
||||||
- run: ./.circleci/windows-env.ps1
|
- run: ./.circleci/windows-env.ps1
|
||||||
- run: node --version
|
- run: node --version
|
||||||
- run: yarn --version
|
- run: yarn --version
|
||||||
- restore_cache:
|
|
||||||
keys:
|
|
||||||
- *cache_key_win
|
|
||||||
- *cache_key_win_fallback
|
|
||||||
# Reinstall to get windows binaries.
|
|
||||||
- run: yarn install --frozen-lockfile --non-interactive
|
- run: yarn install --frozen-lockfile --non-interactive
|
||||||
# Install @bazel/bazelisk globally and use that for the first run.
|
|
||||||
# Workaround for https://github.com/bazelbuild/rules_nodejs/issues/894
|
|
||||||
# NB: the issue was for @bazel/bazel but the same problem applies to @bazel/bazelisk
|
|
||||||
- run: yarn global add @bazel/bazelisk@$env:BAZELISK_VERSION
|
|
||||||
- run: bazelisk info
|
|
||||||
|
|
||||||
notify_webhook_on_fail:
|
notify_webhook_on_fail:
|
||||||
description: Notify a webhook about failure
|
description: Notify a webhook about failure
|
||||||
|
@ -766,12 +753,6 @@ jobs:
|
||||||
# Probably a powershell command parsing thing. There's no problem using a yarn script though.
|
# Probably a powershell command parsing thing. There's no problem using a yarn script though.
|
||||||
command: yarn circleci-win-ve
|
command: yarn circleci-win-ve
|
||||||
no_output_timeout: 45m
|
no_output_timeout: 45m
|
||||||
# Save bazel repository cache to use on subsequent runs.
|
|
||||||
# We don't save node_modules because it's faster to use the linux workspace and reinstall.
|
|
||||||
- save_cache:
|
|
||||||
key: *cache_key_win
|
|
||||||
paths:
|
|
||||||
- "C:/Users/circleci/bazel_repository_cache"
|
|
||||||
|
|
||||||
test_ivy_aot_win:
|
test_ivy_aot_win:
|
||||||
executor: windows-executor
|
executor: windows-executor
|
||||||
|
|
Loading…
Reference in New Issue