diff --git a/.circleci/config.yml b/.circleci/config.yml index b8fef07ec9d..85ce662dd3c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -595,22 +595,15 @@ jobs: executor: windows-executor steps: - checkout - - save_month_to_file - - capture_patches_for_cache_key - - init_environment # Setup the proper NodeJS version. The image comes pre-installed with `nvm-windows`. + # Note: This happens immediately after checkout because environment initialization logic + # might rely on Node and shouldn't use the older image-provided NodeJS version. - run: name: Install NodeJS version from `.nvmrc`. command: | nvm install $(cat .nvmrc) nvm use $(cat .nvmrc) - - - restore_cache: - keys: - - *cache_key_win - - *cache_key_win_fallback - - run: name: Debug information for flakiness of Windows job command: | @@ -621,6 +614,14 @@ jobs: echo "Path: $PATH" yarn node -v + - save_month_to_file + - capture_patches_for_cache_key + - init_environment + - restore_cache: + keys: + - *cache_key_win + - *cache_key_win_fallback + # Install project dependencies, and install Bazelisk globally. This is necessary as # Windows might error when `bazel` is invoked from the project node modules. The Bazel # invocation might modify the symlinked project `node_modules` again, causing failures.