From cfd495e746ff1d9d2cbdfa5fb78b89c52d8c7a87 Mon Sep 17 00:00:00 2001 From: Peter Donald Date: Thu, 8 Oct 2026 11:55:03 +1100 Subject: [PATCH 1/2] build: Pin Bazel 9.3.0 and verify fork pull requests Select the exact release for local and release builds while preserving the library compatibility matrices. Run the existing build, test, and Bzlmod integration targets on Linux, macOS, and Windows because this fork has no external presubmit checks. --- .bazelversion | 1 + .github/workflows/ci.yaml | 59 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 .bazelversion create mode 100644 .github/workflows/ci.yaml diff --git a/.bazelversion b/.bazelversion new file mode 100644 index 00000000..b13d146a --- /dev/null +++ b/.bazelversion @@ -0,0 +1 @@ +9.3.0 diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 00000000..d2fca714 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,59 @@ +name: CI + +on: + pull_request: + push: + branches: [master] + +permissions: + contents: read + +jobs: + build_and_test: + name: Build and test (${{ matrix.os }}) + strategy: + fail-fast: false + matrix: + os: [ubuntu-24.04, ubuntu-24.04-arm, macos-15, macos-15-intel, windows-2025] + runs-on: ${{ matrix.os }} + defaults: + run: + shell: bash + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.sha || github.sha }} + - uses: bazel-contrib/setup-bazel@0.14.0 + - name: Verify Bazel version + run: test "$(bazel --version)" = "bazel 9.3.0" + - name: Build + run: >- + bazel build -- + //... + -//test/java/... + @remote_java_tools//:ijar_cc_binary + @remote_java_tools//:one_version_cc_bin + @remote_java_tools//:proguard + @remote_java_tools//:singlejar_cc_bin + - name: Test + run: bazel test --test_output=errors //test/... + - name: Prepare integration tests + if: runner.os != 'Windows' + working-directory: test/repo + run: bash -e setup.sh + - name: Prepare integration tests (Windows) + if: runner.os == 'Windows' + working-directory: test/repo + shell: cmd + run: | + if not exist C:\b mkdir C:\b + call setup.bat + - name: Verify integration Bazel version + working-directory: test/repo + run: test "$(bazel --version)" = "bazel 9.3.0" + - name: Build integration tests + working-directory: test/repo + run: bazel build //... //:bin_deploy.jar + - name: Run integration tests + working-directory: test/repo + run: bazel test --test_output=errors //:MyTest From bb01e6e1972c69903ec3fe70fc30c2404d84dd7a Mon Sep 17 00:00:00 2001 From: Peter Donald Date: Thu, 8 Oct 2026 12:01:32 +1100 Subject: [PATCH 2/2] build: Return from the Windows Bazel launcher during setup The GitHub runner installs Bazelisk through npm, whose command is a batch launcher. Invoke it with call so integration setup resumes and copies the generated archive and jar. --- test/repo/setup.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/repo/setup.bat b/test/repo/setup.bat index 634892fa..b653f254 100755 --- a/test/repo/setup.bat +++ b/test/repo/setup.bat @@ -1,4 +1,4 @@ cd ../../ -bazel build //distro:all //test/testdata:my_jar +call bazel build //distro:all //test/testdata:my_jar cp -f ./bazel-bin/distro/*.tar.gz C:/b/rules_java-HEAD.tar.gz cp -f bazel-bin/test/testdata/libmy_jar.jar C:/b/my_jar.jar