From 777343d6e28e7170d7090eb6d4aac6f40914e163 Mon Sep 17 00:00:00 2001 From: Maxwell Elliott Date: Fri, 14 Aug 2026 21:10:14 -0400 Subject: [PATCH 1/5] ci: build multi-platform Rust binaries in the deploy job. Upload linux/macOS/Windows host-native CLI artifacts alongside the existing JAR and source archive. Co-authored-by: Cursor --- .github/workflows/ci.yaml | 57 +++++++++++++++++++++++++++++++++++---- 1 file changed, 52 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 39985fc..91dc12d 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -261,14 +261,30 @@ jobs: .\bazel-diff-example.ps1 -WorkspacePath "$env:GITHUB_WORKSPACE" -BazelPath "$env:USERPROFILE\go\bin\bazelisk.exe" -PreviousRevision $prevRev -FinalRevision $currRev deploy: needs: [test-jre21] - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} permissions: contents: read id-token: write attestations: write strategy: + fail-fast: false matrix: - java: [ '11' ] + include: + - os: ubuntu-latest + java: '11' + rust_asset: bazel-diff-rust-linux-amd64 + bazel_extra_flags: '' + upload_jar_and_archive: true + - os: macos-latest + java: '11' + rust_asset: bazel-diff-rust-macos-arm64 + bazel_extra_flags: '' + upload_jar_and_archive: false + - os: windows-latest + java: '11' + rust_asset: bazel-diff-rust-windows-amd64.exe + bazel_extra_flags: '--legacy_external_runfiles' + upload_jar_and_archive: false steps: - name: Setup Java JDK uses: actions/setup-java@v4 @@ -281,20 +297,51 @@ jobs: with: go-version: ^1.17 id: go - - name: Setup Bazelisk - run: go install github.com/bazelbuild/bazelisk@latest && export PATH=$PATH:$(go env GOPATH)/bin + - name: Setup Bazelisk (Linux/macOS) + if: runner.os != 'Windows' + run: | + go install github.com/bazelbuild/bazelisk@latest + echo "$(go env GOPATH)/bin" >> "$GITHUB_PATH" + - name: Setup Bazelisk (Windows) + if: runner.os == 'Windows' + shell: pwsh + run: | + go install github.com/bazelbuild/bazelisk@latest + echo "$(go env GOPATH)\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append - uses: actions/checkout@v4 - name: Build deployable JAR - run: ~/go/bin/bazelisk build //cli:bazel-diff_deploy.jar + if: matrix.upload_jar_and_archive + run: bazelisk build //cli:bazel-diff_deploy.jar - uses: actions/upload-artifact@v4 + if: matrix.upload_jar_and_archive with: name: bazel-diff_deploy.jar path: bazel-bin/cli/bazel-diff_deploy.jar if-no-files-found: error - name: Build release source archive + if: matrix.upload_jar_and_archive run: make release_source_archive - uses: actions/upload-artifact@v4 + if: matrix.upload_jar_and_archive with: name: release.tar.gz path: archives/release.tar.gz if-no-files-found: error + - name: Build Rust binary + shell: bash + run: | + bazelisk build //:bazel-diff-rust -c opt \ + --cxxopt=-std=c++17 \ + --host_cxxopt=-std=c++17 \ + ${{ matrix.bazel_extra_flags }} + if [[ "${{ runner.os }}" == "Windows" ]]; then + src="bazel-bin/src/bazel-diff.exe" + else + src="bazel-bin/src/bazel-diff" + fi + cp "$src" "${{ matrix.rust_asset }}" + - uses: actions/upload-artifact@v4 + with: + name: ${{ matrix.rust_asset }} + path: ${{ matrix.rust_asset }} + if-no-files-found: error From 06978a99deac823ce3ae19df886f0c052105937b Mon Sep 17 00:00:00 2001 From: Maxwell Elliott Date: Sat, 15 Aug 2026 09:02:01 -0400 Subject: [PATCH 2/5] ci: build the release Rust binaries with Bazel alone The deploy and release jobs built //:bazel-diff-rust and then reproduced Bazel's own knowledge in shell: which path rules_rust writes the binary to (bazel-bin/src/bazel-diff vs .exe), what to rename it to per runner, and which C++ flags a release build needs. The rename in particular was unchecked -- a macOS runner would happily publish a binary named "linux-amd64". Move all of that into Bazel. //release:bazel-diff-rust selects on @platforms//os and @platforms//cpu to name its output for the platform it is built for, so the workflows now run one `bazelisk build ... --config=release` and upload what lands in bazel-bin/release/ -- no cp, no path branching, and `if-no-files-found: error` turns a name mismatch into a failed job. The build flags move to a `release` config in .bazelrc, which also drops the `--cxxopt=-std=c++17` the Windows leg was passing to MSVC (the platform configs in .bazelrc already send /std:c++17 there). Co-Authored-By: Claude Opus 5 (1M context) --- .bazelrc | 6 ++++ .github/workflows/ci.yaml | 24 ++++++------- .github/workflows/release.yaml | 18 ++++------ MODULE.bazel | 4 +++ Makefile | 6 ++-- README.md | 8 +++++ release/BUILD | 11 ++++++ release/defs.bzl | 64 ++++++++++++++++++++++++++++++++++ tools/readme_template.md | 8 +++++ 9 files changed, 123 insertions(+), 26 deletions(-) create mode 100644 release/BUILD create mode 100644 release/defs.bzl diff --git a/.bazelrc b/.bazelrc index 22f3315..4633d19 100644 --- a/.bazelrc +++ b/.bazelrc @@ -19,6 +19,12 @@ build:macos --host_cxxopt=-std=c++17 build:windows --cxxopt=/std:c++17 build:windows --host_cxxopt=/std:c++17 +# Release artifacts: `bazel build //release:bazel-diff-rust --config=release`. +# CI uses nothing but this config, so the flags a published binary is built with +# live here rather than in the workflow files. The C++ standard flags come from +# the platform-specific configs above. +build:release -c opt + # Avoid cache thrashing, but allow integration tests to find "bazel" on the PATH. common --incompatible_strict_action_env common --test_env=PATH diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 7c83bfd..309b568 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -269,6 +269,11 @@ jobs: strategy: fail-fast: false matrix: + # rust_asset is the name //release:bazel-diff-rust gives the binary on + # that platform -- it is asserted, not applied (see the upload step). + # bazel_extra_flags is Windows-only: --config=release can't carry it, + # since .bazelrc expands platform-specific config for the bare `build` + # config name only. include: - os: ubuntu-latest java: '11' @@ -327,21 +332,16 @@ jobs: name: release.tar.gz path: archives/release.tar.gz if-no-files-found: error + # //release:bazel-diff-rust names the binary for the platform Bazel built + # it for, so this step neither renames nor relocates anything: whatever + # lands in bazel-bin/release/ is the published asset. --config=release + # carries the flags (see .bazelrc). `if-no-files-found: error` below is + # the assertion that Bazel's name still matches matrix.rust_asset. - name: Build Rust binary shell: bash - run: | - bazelisk build //:bazel-diff-rust -c opt \ - --cxxopt=-std=c++17 \ - --host_cxxopt=-std=c++17 \ - ${{ matrix.bazel_extra_flags }} - if [[ "${{ runner.os }}" == "Windows" ]]; then - src="bazel-bin/src/bazel-diff.exe" - else - src="bazel-bin/src/bazel-diff" - fi - cp "$src" "${{ matrix.rust_asset }}" + run: bazelisk build //release:bazel-diff-rust --config=release ${{ matrix.bazel_extra_flags }} - uses: actions/upload-artifact@v4 with: name: ${{ matrix.rust_asset }} - path: ${{ matrix.rust_asset }} + path: bazel-bin/release/${{ matrix.rust_asset }} if-no-files-found: error diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 7ecd86d..93bca10 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -79,26 +79,20 @@ jobs: run: | go install github.com/bazelbuild/bazelisk@latest echo "$(go env GOPATH)\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append + # //release:bazel-diff-rust names the binary for the platform Bazel built + # it for, so nothing here renames or relocates it: bazel-bin/release/ holds + # the published asset, and `gh release upload` keeps that file name. The + # build flags live in .bazelrc under --config=release. - name: Build Rust binary shell: bash - run: | - bazelisk build //:bazel-diff-rust -c opt \ - --cxxopt=-std=c++17 \ - --host_cxxopt=-std=c++17 \ - ${{ matrix.bazel_extra_flags }} - if [[ "${{ runner.os }}" == "Windows" ]]; then - src="bazel-bin/src/bazel-diff.exe" - else - src="bazel-bin/src/bazel-diff" - fi - cp "$src" "${{ matrix.asset }}" + run: bazelisk build //release:bazel-diff-rust --config=release ${{ matrix.bazel_extra_flags }} - name: Upload release asset shell: bash env: TAG: ${{ inputs.tag_name || github.ref_name }} GH_TOKEN: ${{ github.token }} run: | - gh release upload "$TAG" "${{ matrix.asset }}" \ + gh release upload "$TAG" "bazel-bin/release/${{ matrix.asset }}" \ --clobber \ --repo "$GITHUB_REPOSITORY" finalize: diff --git a/MODULE.bazel b/MODULE.bazel index 6f61161..3d956fd 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -9,6 +9,10 @@ bazel_dep(name = "buildifier_prebuilt", version = "8.5.1.2", dev_dependency = Tr bazel_dep(name = "aspect_bazel_lib", version = "2.22.5", dev_dependency = True) bazel_dep(name = "bazel_skylib", version = "1.9.0") + +# Direct dep because //release selects on @platforms//os and @platforms//cpu to +# name the release binaries. +bazel_dep(name = "platforms", version = "1.1.0") bazel_dep(name = "rules_proto", version = "7.1.0") bazel_dep(name = "rules_java", version = "9.7.0") bazel_dep(name = "rules_kotlin", version = "2.4.0") diff --git a/Makefile b/Makefile index 2f99acc..236d106 100644 --- a/Makefile +++ b/Makefile @@ -15,12 +15,14 @@ release_deploy_jar: //cli:bazel-diff_deploy.jar \ -c opt +# Builds the same artifact CI publishes, named the same way: +# bazel-bin/release/bazel-diff-rust--[.exe]. .PHONY: release_rust_binary release_rust_binary: bazel \ build \ - //:bazel-diff-rust \ - -c opt + //release:bazel-diff-rust \ + --config=release .PHONY: build_rust build_rust: diff --git a/README.md b/README.md index 31c4361..804392d 100644 --- a/README.md +++ b/README.md @@ -929,6 +929,14 @@ Windows amd64: download `bazel-diff-rust-windows-amd64.exe` from the [latest release](https://github.com/Tinder/bazel-diff/releases/latest). +Those assets are produced by Bazel alone -- CI runs nothing but the command below and uploads +whatever lands in `bazel-bin/release/`, so `//release:bazel-diff-rust` names the binary for the +platform it was built on (`bazel-diff-rust--`, plus `.exe` on Windows): + +```terminal +make release_rust_binary # bazel build //release:bazel-diff-rust --config=release +``` + ### Performance gate The Rust candidate is expected to be faster than Kotlin, and CI enforces it. `make perf-gate` diff --git a/release/BUILD b/release/BUILD new file mode 100644 index 0000000..2924732 --- /dev/null +++ b/release/BUILD @@ -0,0 +1,11 @@ +load("//release:defs.bzl", "RELEASE_ASSET_NAME", "release_binary") + +package(default_visibility = ["//visibility:public"]) + +# Built by the `deploy` job in ci.yaml and the `rust-binaries` job in +# release.yaml, which upload the file it writes to bazel-bin/release/ as-is. +release_binary( + name = "bazel-diff-rust", + asset_name = RELEASE_ASSET_NAME, + binary = "//:bazel-diff-rust", +) diff --git a/release/defs.bzl b/release/defs.bzl new file mode 100644 index 0000000..a390391 --- /dev/null +++ b/release/defs.bzl @@ -0,0 +1,64 @@ +"""Bazel-side naming for the Rust CLI binaries published to GitHub Releases. + +`bazel build //release:bazel-diff-rust --config=release` writes +`bazel-bin/release/bazel-diff-rust--[.exe]` for whatever platform Bazel +is building for. Release automation therefore only has to run Bazel and upload +what lands in `bazel-bin/release/`: no per-runner `cp`, no shell-side knowledge +of where rules_rust drops the binary, and no way for the published asset name to +disagree with the platform it was actually built on. +""" + +_OS_NAME = select( + { + "@platforms//os:linux": "linux", + "@platforms//os:macos": "macos", + "@platforms//os:windows": "windows", + }, + no_match_error = "bazel-diff does not publish release binaries for this OS", +) + +_ARCH_NAME = select( + { + "@platforms//cpu:aarch64": "arm64", + "@platforms//cpu:x86_64": "amd64", + }, + no_match_error = "bazel-diff does not publish release binaries for this CPU", +) + +_EXTENSION = select({ + "@platforms//os:windows": ".exe", + "//conditions:default": "", +}) + +# The asset name GitHub Releases publishes, e.g. "bazel-diff-rust-linux-amd64". +RELEASE_ASSET_NAME = "bazel-diff-rust-" + _OS_NAME + "-" + _ARCH_NAME + _EXTENSION + +def _release_binary_impl(ctx): + asset = ctx.actions.declare_file(ctx.attr.asset_name) + + # Bazel copies instead of symlinking on platforms without symlink support + # (Windows, unless --windows_enable_symlinks), so the output is always a + # file CI can upload directly. + ctx.actions.symlink( + output = asset, + target_file = ctx.executable.binary, + progress_message = "Naming release asset %{output}", + ) + return [DefaultInfo(files = depset([asset]))] + +release_binary = rule( + implementation = _release_binary_impl, + doc = "Republishes `binary` under the file name used for release assets.", + attrs = { + "asset_name": attr.string( + mandatory = True, + doc = "File name to give the binary. Use `RELEASE_ASSET_NAME`.", + ), + "binary": attr.label( + mandatory = True, + executable = True, + cfg = "target", + doc = "The binary to publish.", + ), + }, +) diff --git a/tools/readme_template.md b/tools/readme_template.md index 3962b47..124f27e 100644 --- a/tools/readme_template.md +++ b/tools/readme_template.md @@ -469,6 +469,14 @@ Windows amd64: download `bazel-diff-rust-windows-amd64.exe` from the [latest release](https://github.com/Tinder/bazel-diff/releases/latest). +Those assets are produced by Bazel alone -- CI runs nothing but the command below and uploads +whatever lands in `bazel-bin/release/`, so `//release:bazel-diff-rust` names the binary for the +platform it was built on (`bazel-diff-rust--`, plus `.exe` on Windows): + +```terminal +make release_rust_binary # bazel build //release:bazel-diff-rust --config=release +``` + ### Performance gate The Rust candidate is expected to be faster than Kotlin, and CI enforces it. `make perf-gate` From 2e4c0d035b3b3298fd01b720c9794c4544817fab Mon Sep 17 00:00:00 2001 From: Maxwell Elliott Date: Sat, 15 Aug 2026 09:05:17 -0400 Subject: [PATCH 3/5] Match the Cargo release profile when Bazel builds release binaries rules_rust does not read Cargo profiles, so `-c opt` alone gave the published binaries opt-level=3/debuginfo=0/strip=debuginfo -- no LTO and a full symbol table -- while Cargo.toml has declared `[profile.release] lto = "thin", strip = true` all along. Anyone building with cargo got a better binary than the one we ship. Add both to --config=release. On macOS arm64 the artifact drops from 6,344,496 to 5,304,656 bytes (-16.4%); //:rust_tests passes under the config. -Cstrip=symbols goes through extra_rustc_flags rather than the toolchain's strip_level so it applies to release builds only, and rules_rust appends it after the toolchain's own -Cstrip, where last-wins. Co-Authored-By: Claude Opus 5 (1M context) --- .bazelrc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.bazelrc b/.bazelrc index 4633d19..1a85676 100644 --- a/.bazelrc +++ b/.bazelrc @@ -23,8 +23,22 @@ build:windows --host_cxxopt=/std:c++17 # CI uses nothing but this config, so the flags a published binary is built with # live here rather than in the workflow files. The C++ standard flags come from # the platform-specific configs above. +# +# rules_rust ignores Cargo profiles, so `-c opt` alone (opt-level=3, +# debuginfo=0, strip=debuginfo) builds a *weaker* binary than +# `cargo build --release` does under [profile.release] in Cargo.toml. The two +# settings below restore the difference; keep them in sync with that profile. build:release -c opt +# lto = "thin" in Cargo.toml. Cross-crate inlining/DCE at link time. rules_rust +# skips it for build scripts and proc-macros, matching Cargo. +build:release --@rules_rust//rust/settings:lto=thin + +# strip = true in Cargo.toml (`-c opt` only strips debuginfo, not the symbol +# table). Passed as an extra flag because the strip level is otherwise a +# property of the toolchain, which would change every build, not just releases. +build:release --@rules_rust//rust/settings:extra_rustc_flags=-Cstrip=symbols + # Avoid cache thrashing, but allow integration tests to find "bazel" on the PATH. common --incompatible_strict_action_env common --test_env=PATH From 6b0c14ca2149aad3d43cac7c368430df70cb0f13 Mon Sep 17 00:00:00 2001 From: Maxwell Elliott Date: Sat, 15 Aug 2026 11:04:28 -0400 Subject: [PATCH 4/5] Stop Git bash from mangling the //release label on Windows The Windows deploy leg failed with "invalid package name '/release'": Git bash's MSYS runtime treats an argument starting with //release as a UNC-ish Windows path and rewrites it to /release before Bazel ever sees it. The label this replaced, //:bazel-diff-rust, has no path-like segment after the slashes, so it was never converted -- the mangling only showed up once the target moved into a package. MSYS2_ARG_CONV_EXCL='//' excludes exactly the label arguments from conversion and leaves the rest of the command line alone. Co-Authored-By: Claude Opus 5 (1M context) --- .github/workflows/ci.yaml | 6 ++++++ .github/workflows/release.yaml | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 309b568..eb6dc03 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -339,6 +339,12 @@ jobs: # the assertion that Bazel's name still matches matrix.rust_asset. - name: Build Rust binary shell: bash + env: + # Windows runs this under Git bash, whose MSYS runtime rewrites any + # argument starting with `//package` into a `/package` Windows path -- + # Bazel then rejects "invalid package name '/release'". (`//:target` + # survived only because it has no path-like segment to convert.) + MSYS2_ARG_CONV_EXCL: '//' run: bazelisk build //release:bazel-diff-rust --config=release ${{ matrix.bazel_extra_flags }} - uses: actions/upload-artifact@v4 with: diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 93bca10..1238937 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -85,6 +85,12 @@ jobs: # build flags live in .bazelrc under --config=release. - name: Build Rust binary shell: bash + env: + # Windows runs this under Git bash, whose MSYS runtime rewrites any + # argument starting with `//package` into a `/package` Windows path -- + # Bazel then rejects "invalid package name '/release'". (`//:target` + # survived only because it has no path-like segment to convert.) + MSYS2_ARG_CONV_EXCL: '//' run: bazelisk build //release:bazel-diff-rust --config=release ${{ matrix.bazel_extra_flags }} - name: Upload release asset shell: bash From ef235be019413041667973bf6325aac8cbeb43b5 Mon Sep 17 00:00:00 2001 From: Maxwell Elliott Date: Sat, 15 Aug 2026 11:48:44 -0400 Subject: [PATCH 5/5] Keep the Windows release build under MAX_PATH The Windows leg has never built the Rust binary -- it failed the same way on this PR's first commit, before the //release target existed, so the label fix only got far enough to expose it. link.exe is MAX_PATH-bound at 260, and under Bazel's default Windows output root the Rust stdlib rlib C:\users\runneradmin\_bazel_runneradmin\\execroot\_main\bazel-out\ x64_windows-opt-exec-\bin\external\rules_rust++rust+rw-_tools\ rust_toolchain\lib\rustlib\x86_64-pc-windows-msvc\lib\ librustc_std_workspace_alloc-e9a7af2889795557.rlib comes to 263 characters, so the link dies with LNK1181. Every rlib opened before it has a shorter file name and fits; that one is the first over. --output_user_root=C:/b shortens the prefix by 35 characters. It has to be a startup flag, so it rides in a matrix entry rather than --config=release. Co-Authored-By: Claude Opus 5 (1M context) --- .github/workflows/ci.yaml | 17 +++++++++++++---- .github/workflows/release.yaml | 10 +++++++++- 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index eb6dc03..d7985f5 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -271,23 +271,32 @@ jobs: matrix: # rust_asset is the name //release:bazel-diff-rust gives the binary on # that platform -- it is asserted, not applied (see the upload step). - # bazel_extra_flags is Windows-only: --config=release can't carry it, - # since .bazelrc expands platform-specific config for the bare `build` - # config name only. + # + # The two Windows-only Bazel flags can't move into --config=release: + # startup flags can't live in a --config at all, and .bazelrc expands + # platform-specific config for the bare `build` config name only. + # bazel_startup_flags shortens the output root because MSVC's link.exe + # is MAX_PATH-bound (260): under the default root, the Rust stdlib path + # ...rust_toolchain\lib\rustlib\x86_64-pc-windows-msvc\lib\ + # librustc_std_workspace_alloc-.rlib comes to 263 characters and + # the link fails with LNK1181. C:/b buys back 35. include: - os: ubuntu-latest java: '11' rust_asset: bazel-diff-rust-linux-amd64 + bazel_startup_flags: '' bazel_extra_flags: '' upload_jar_and_archive: true - os: macos-latest java: '11' rust_asset: bazel-diff-rust-macos-arm64 + bazel_startup_flags: '' bazel_extra_flags: '' upload_jar_and_archive: false - os: windows-latest java: '11' rust_asset: bazel-diff-rust-windows-amd64.exe + bazel_startup_flags: '--output_user_root=C:/b' bazel_extra_flags: '--legacy_external_runfiles' upload_jar_and_archive: false steps: @@ -345,7 +354,7 @@ jobs: # Bazel then rejects "invalid package name '/release'". (`//:target` # survived only because it has no path-like segment to convert.) MSYS2_ARG_CONV_EXCL: '//' - run: bazelisk build //release:bazel-diff-rust --config=release ${{ matrix.bazel_extra_flags }} + run: bazelisk ${{ matrix.bazel_startup_flags }} build //release:bazel-diff-rust --config=release ${{ matrix.bazel_extra_flags }} - uses: actions/upload-artifact@v4 with: name: ${{ matrix.rust_asset }} diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 1238937..587cdc4 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -44,15 +44,23 @@ jobs: strategy: fail-fast: false matrix: + # bazel_startup_flags shortens the output root on Windows because MSVC's + # link.exe is MAX_PATH-bound (260): under the default root the Rust + # stdlib rlib ...\librustc_std_workspace_alloc-.rlib comes to 263 + # characters and the link fails with LNK1181. Keep in sync with the + # `deploy` job in ci.yaml, which is where this gets exercised per-PR. include: - os: ubuntu-latest asset: bazel-diff-rust-linux-amd64 + bazel_startup_flags: "" bazel_extra_flags: "" - os: macos-latest asset: bazel-diff-rust-macos-arm64 + bazel_startup_flags: "" bazel_extra_flags: "" - os: windows-latest asset: bazel-diff-rust-windows-amd64.exe + bazel_startup_flags: "--output_user_root=C:/b" bazel_extra_flags: "--legacy_external_runfiles" steps: - name: Checkout @@ -91,7 +99,7 @@ jobs: # Bazel then rejects "invalid package name '/release'". (`//:target` # survived only because it has no path-like segment to convert.) MSYS2_ARG_CONV_EXCL: '//' - run: bazelisk build //release:bazel-diff-rust --config=release ${{ matrix.bazel_extra_flags }} + run: bazelisk ${{ matrix.bazel_startup_flags }} build //release:bazel-diff-rust --config=release ${{ matrix.bazel_extra_flags }} - name: Upload release asset shell: bash env: