ci: improve stability of windows bazel CI job (#45431)

Improves stability of the Windows Bazel CI job by
installing Bazelisk globally.

Also makes the environment helpers more convenient by
evaluating the variable assignments directly, simplifying
some Bash logic.

PR Close #45431
This commit is contained in:
Paul Gschwendtner
2022-03-24 20:23:53 +01:00
committed by Dylan Hunn
parent a7c81da6b8
commit fed76306d9
4 changed files with 18 additions and 11 deletions
+8 -2
View File
@@ -715,15 +715,21 @@ jobs:
- *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.
- yarn_install
- run: yarn global add @bazel/bazelisk@${BAZELISK_VERSION}
- run:
name: Build all windows CI targets
command: yarn bazel build //packages/compiler-cli/...
command: |
$(yarn global bin)/bazelisk build //packages/compiler-cli/...
no_output_timeout: 15m
- run:
name: Test all windows CI targets
command: yarn bazel test --test_tag_filters="-browser:chromium-local" //packages/compiler-cli/...
command: |
$(yarn global bin)/bazelisk test --test_tag_filters="-browser:chromium-local" //packages/compiler-cli/...
no_output_timeout: 15m
- save_cache: