Skip to content

Commit 0ef3850

Browse files
authored
change to USE_BAZEL_VERSION
1 parent 68d395c commit 0ef3850

File tree

1 file changed

+9
-23
lines changed

1 file changed

+9
-23
lines changed

.github/workflows/ci.yaml

Lines changed: 9 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ jobs:
6060
defaults:
6161
run:
6262
working-directory: ${{ matrix.folder }}
63+
env:
64+
- USE_BAZEL_VERSION: ${{matrix.bazel-version.version}}
65+
6366
strategy:
6467
fail-fast: false
6568
matrix:
@@ -149,25 +152,11 @@ jobs:
149152
~/.cache/bazelisk
150153
key: >-
151154
bazel-cache-${{ matrix.bazel-version.version }}-${{ matrix.bzlmod }}-${{ matrix.os }}-${{ matrix.folder }}-
152-
${{ hashFiles('.bazelrc', '.bazelversion', '.bazeliskrc', '**/BUILD', '**/BUILD.bazel', '**/*.bzl', 'WORKSPACE', 'WORKSPACE.bazel', 'WORKSPACE.bzlmod', 'MODULE.bazel', '**/*.js', '!e2e') }}-
153-
${{ hashFiles(format('{0}/.bazelrc', matrix.folder), format('{0}/.bazelversion', matrix.folder), format('{0}/.bazeliskrc', matrix.folder), format('{0}/**/BUILD', matrix.folder), format('{0}/**/BUILD.bazel', matrix.folder), format('{0}/**/*.bzl', matrix.folder), format('{0}/WORKSPACE', matrix.folder), format('{0}/WORKSPACE.bazel', matrix.folder), format('{0}/WORKSPACE.bzlmod', matrix.folder), format('{0}/MODULE.bazel', matrix.folder), format('{0}/MODULE.bazel.lock', matrix.folder), format('{0}/**/*.js', matrix.folder)) }}
155+
${{ hashFiles('.bazelrc', '.bazelversion', '**/BUILD', '**/BUILD.bazel', '**/*.bzl', 'WORKSPACE', 'WORKSPACE.bazel', 'WORKSPACE.bzlmod', 'MODULE.bazel', '**/*.js', '!e2e') }}-
156+
${{ hashFiles(format('{0}/.bazelrc', matrix.folder), format('{0}/.bazelversion', matrix.folder), format('{0}/**/BUILD', matrix.folder), format('{0}/**/BUILD.bazel', matrix.folder), format('{0}/**/*.bzl', matrix.folder), format('{0}/WORKSPACE', matrix.folder), format('{0}/WORKSPACE.bazel', matrix.folder), format('{0}/WORKSPACE.bzlmod', matrix.folder), format('{0}/MODULE.bazel', matrix.folder), format('{0}/MODULE.bazel.lock', matrix.folder), format('{0}/**/*.js', matrix.folder)) }}
154157
restore-keys: |
155158
bazel-cache-${{ matrix.bazel-version.version }}-${{ matrix.bzlmod }}-${{ matrix.os }}-${{ matrix.folder }}-
156159
157-
- name: Configure Bazel version
158-
shell: bash
159-
run: |
160-
# Overwrite the .bazelversion instead of using USE_BAZEL_VERSION so that Bazelisk
161-
# still bootstraps Aspect CLI from configuration in .bazeliskrc. Aspect CLI will
162-
# then use .bazelversion to determine which Bazel version to use.
163-
echo "${{ matrix.bazel-version.version }}" > .bazelversion
164-
165-
# TODO: remove this block once we have Aspect CLI Windows releases
166-
- name: Don't use Aspect CLI on Windows
167-
if: matrix.os == 'windows'
168-
shell: bash
169-
run: rm -f .bazeliskrc
170-
171160
- name: bazel test //...
172161
shell: bash
173162
run: |
@@ -185,6 +174,10 @@ jobs:
185174
runs-on: ubuntu-latest
186175
needs:
187176
- matrix-prep
177+
defaults:
178+
env:
179+
- USE_BAZEL_VERSION: ${{matrix.bazel-version.version}}
180+
188181
strategy:
189182
fail-fast: false
190183
matrix:
@@ -197,13 +190,6 @@ jobs:
197190
steps:
198191
- uses: actions/checkout@v4
199192

200-
- name: Configure Bazel version
201-
working-directory: e2e/test
202-
# Overwrite the .bazelversion instead of using USE_BAZEL_VERSION so that Bazelisk
203-
# still bootstraps Aspect CLI from configuration in .bazeliskrc. Aspect CLI will
204-
# then use .bazelversion to determine which Bazel version to use
205-
run: echo "${{ matrix.bazel-version.version }}" > .bazelversion
206-
207193
- name: Install Node.js
208194
uses: actions/setup-node@v3
209195
with:

0 commit comments

Comments
 (0)