File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1616
1717jobs :
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
You can’t perform that action at this time.
0 commit comments