From 0e5a945ed4c8017e754d519374d7e13bc1d5aee7 Mon Sep 17 00:00:00 2001 From: Joey Perrott Date: Wed, 7 Oct 2020 13:25:08 -0700 Subject: [PATCH] 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 --- .circleci/config.yml | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 9d8d159a0f..6189b6436b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -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 # be slower due to its growing size. 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 keys also update the SHA for the "COMPONENTS_REPO_COMMIT" environment variable. @@ -183,23 +181,12 @@ commands: setup_win: description: Setup windows node environment steps: - # Use the Linux workspace directly, as it already has checkout, rebased and node modules. - - custom_attach_workspace + - checkout # Install Bazel pre-requisites that aren't in the preconfigured CircleCI Windows VM. - run: ./.circleci/windows-env.ps1 - run: node --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 - # 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: 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. command: yarn circleci-win-ve 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: executor: windows-executor