Skip to content

Commit 3e5ae62

Browse files
committed
fix: bazel setup
1 parent 8e441ec commit 3e5ae62

1 file changed

Lines changed: 12 additions & 12 deletions

File tree

.github/workflows/bazel.yaml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ env:
1616

1717
jobs:
1818
test:
19-
# runs-on: runs-on=${{ github.run_id }}/cpu=4/ram=16/family=m6idn/spot=false/image=ubuntu24-full-x64/extras=s3-cache
20-
runs-on: ubuntu-latest
19+
runs-on: runs-on=${{ github.run_id }}/cpu=4/ram=16/family=m6idn/spot=false/image=ubuntu24-full-x64/extras=s3-cache
20+
# runs-on: ubuntu-latest
2121
steps:
2222
- name: Enable S3 Cache for Self-Hosted Runners
2323
# these env vars are set (and exposed) when it is a self-hosted runner with extras=s3-cache
@@ -30,18 +30,18 @@ jobs:
3030
fetch-depth: 0
3131
persist-credentials: false
3232

33-
- name: Check bazel
33+
- name: Try to install bazel
34+
# install for self-hosted runners only, as github-hosted already have bazel installed
35+
if: ${{ env.RUNS_ON_INSTANCE_ID != '' }}
3436
run: |
35-
ls -la /usr/local/bin/
36-
echo "path: $PATH"
37-
which bazel || echo "which bazel failed"
38-
whereis bazel || echo "whereis bazel failed"
39-
bazel version || echo "bazel version failed"
37+
npm install -g @bazel/bazelisk
38+
whereis bazelisk || echo "bazelisk not found in PATH"
39+
which bazelisk || echo "bazelisk not found in PATH"
4040
41-
# - uses: bazel-contrib/setup-bazel@4fd964a13a440a8aeb0be47350db2fc640f19ca8 # 0.15.0
42-
# with:
43-
# # Avoid downloading Bazel every time.
44-
# bazelisk-cache: true
41+
sudo ln -s /usr/local/lib/node_modules/@bazel/bazelisk/bazelisk.js /usr/local/bin/bazelisk
42+
sudo ln -s /usr/local/lib/node_modules/@bazel/bazelisk/bazelisk.js /usr/local/bin/bazel
43+
44+
bazel version
4545
4646
- name: Cache Bazel
4747
uses: actions/cache@v4

0 commit comments

Comments
 (0)