From 98efb8213c344f8bfeaba9b11bdac5b10c587e22 Mon Sep 17 00:00:00 2001 From: Piotr Sikora Date: Mon, 2 Mar 2026 12:36:44 -0500 Subject: [PATCH] Use Bazelisk instead of Bazel in GitHub Actions. bazel-contrib/setup-bazel installs only "bazelisk" binary, not "bazel". The existing jobs worked on hosted GitHub runners, since both binaries are preinstalled, but "bazel" is not available when testing locally. Signed-off-by: Piotr Sikora --- .github/workflows/format.yml | 8 ++++---- .github/workflows/test.yml | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index fe539826e..00e6ac393 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -97,12 +97,12 @@ jobs: - name: Format (bazel query) run: | - bazel query 'deps(//bazel/cargo/...)' + bazelisk query 'deps(//bazel/cargo/...)' - name: Format (rules_rust) run: | - bazel run //bazel/cargo/wasmsign:crates_vendor - bazel run //bazel/cargo/wasmtime:crates_vendor + bazelisk run //bazel/cargo/wasmsign:crates_vendor + bazelisk run //bazel/cargo/wasmtime:crates_vendor git diff --exit-code clang_format: @@ -138,7 +138,7 @@ jobs: - name: Bazel build run: > - bazel build + bazelisk build --config=hermetic-llvm --config clang-tidy --define engine=multi diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index bf1233b94..33ca697b2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -57,14 +57,14 @@ jobs: - name: Bazel build run: > - bazel build + bazelisk build --verbose_failures --test_output=errors --config=clang --config=hermetic-llvm -c opt - $(bazel query 'kind(was.*_rust_binary, //test/test_data/...)') - $(bazel query 'kind(_optimized_wasm_cc_binary, //test/test_data/...)') + $(bazelisk query 'kind(was.*_rust_binary, //test/test_data/...)') + $(bazelisk query 'kind(_optimized_wasm_cc_binary, //test/test_data/...)') # Currently, in Github Action, "Bazel build step" creates `wasm_canary_check.wasm` directory as a temporal directory. # Since the name of this directory has "*.wasm" pattern, the step "Mangle build rules to use existing test data" fails. @@ -321,7 +321,7 @@ jobs: shell: bash run: > ${{ matrix.run_under }} - bazel ${{ matrix.action }} + bazelisk ${{ matrix.action }} --verbose_failures --test_output=errors --define engine=${{ matrix.engine }} @@ -332,7 +332,7 @@ jobs: if: ${{ matrix.engine != 'null' && !startsWith(matrix.os, 'windows') }} run: > ${{ matrix.run_under }} - bazel ${{ matrix.action }} + bazelisk ${{ matrix.action }} --verbose_failures --test_output=errors --define engine=${{ matrix.engine }}