Conversation
rules_rust is only a dev dependency, so users can't build Rust tools like `exe_zip_maker` themselves; the tools must ship prebuilt. Before attaching them to releases, the release workflow should show that they build on each target platform. `//dev/release_artifacts:artifacts_for_release` builds its files with release settings through a transition: optimized, with glibc (Linux) or the C runtime (Windows) linked statically, and macOS 11 as the minimum. Presubmit's bzlmod `//...` builds now cover these settings too; under WORKSPACE, where rules_rust is a stub, the target is manual. The target also lists the files' paths, so scripts don't need `bazel cquery`. The release workflow now calls a reusable workflow that natively builds the target on Linux, macOS, and Windows (x86_64 and aarch64), with `--stamp` and the release tag as `--embed_label`, checks the Linux and macOS binaries' OS requirements, and uploads the binaries as workflow artifacts. Nothing is attached to the release yet, so a failed `bazel build` only adds a warning to the run. The workflow can also be run manually to try it before a release.
Collaborator
Author
|
Ready for review. I'm not familiar with building rust stuff. The special flags to statically link glibc I find a bit strange, but 🤷 . I'd also prefer to cross build, but not sure what platforms we can cross-build do with rust. Google's rules_ml_toolchain has crossbuild for linux->{windows,mac} for c++, so i suspect its possible with rust, too, somehow. The AI seemed to prefer host-based builds, though, which I'm OK with doing, at least to get started. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This makes the release workflow build the exe zip maker tool as
part of releases. Because more plumbing is needed to integrate
prebuilt binaries, they are just built, but not actually
included into the final release. For that same reason, failures
to build are ignored for now.
This provides some basic verification of the overall flow and will
give an idea of how expensive it is to build them.
The binaries are built to be fully statically linked to minimize
system dependencies.
Work towards #4216