Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cherry-pick to earlgrey_1.0.0: [bazel] Update Bazel to version 7.3.1 #25600

Open
wants to merge 12 commits into
base: earlgrey_1.0.0
Choose a base branch
from

Conversation

github-actions[bot]
Copy link

This is an automatic cherry-pick of #24392 to branch earlgrey_1.0.0.

@github-actions github-actions bot requested a review from cfrantz as a code owner December 11, 2024 11:45
@jwnrt jwnrt closed this Dec 11, 2024
@jwnrt jwnrt reopened this Dec 11, 2024
@jwnrt jwnrt requested review from jwnrt and removed request for cfrantz December 11, 2024 11:46
@jwnrt jwnrt self-assigned this Dec 11, 2024
@jwnrt
Copy link
Contributor

jwnrt commented Dec 11, 2024

I've had to include these PRs as well to make the airgapped build work:

#25562
#25601

jwnrt added 11 commits December 12, 2024 11:36
Signed-off-by: James Wainwright <james.wainwright@lowrisc.org>
(cherry picked from commit 317128f)
We were previously taking these from the Bazel repository at the version
we were using. This has broken, but Bazel has a documented way of doing
this now independent of version:

https://bazel.build/run/build#repository_cache_with_bazel_7_or_later

Signed-off-by: James Wainwright <james.wainwright@lowrisc.org>
(cherry picked from commit 75af583)
Bazel 7 does not like a rule which outputs a directory _and_ something
from that directory's contents.

This commit removes the build directory from the outputs and exposes
only those requested by `output_groups`. The paths should stay the same.

Signed-off-by: James Wainwright <james.wainwright@lowrisc.org>
(cherry picked from commit f534cb7)
Signed-off-by: James Wainwright <james.wainwright@lowrisc.org>
(cherry picked from commit 6826e0a)
Signed-off-by: James Wainwright <james.wainwright@lowrisc.org>
(cherry picked from commit bd85187)
This release includes a fix for Bazel 7 that we need.

Signed-off-by: James Wainwright <james.wainwright@lowrisc.org>
(cherry picked from commit 64273af)
When we build our C files for `bindgen` to consume, we use the `host`
configuration. The `--features` flag is no longer applied to `host` in
Bazel 7, so we must add this extra flag.

Signed-off-by: James Wainwright <james.wainwright@lowrisc.org>
(cherry picked from commit 6c694df)
Even though we're not using these, Bazel 7 hits errors if we try to run
`bazel query deps($something)` on a Rust dependency.

Fixed in `rules_rust>=0.38.0`.

bazelbuild/rules_rust#1166 (comment)

Signed-off-by: James Wainwright <james.wainwright@lowrisc.org>
(cherry picked from commit f9f257a)
Required for bzlmod support. Older versions do not recognise
`MODULE.bazel` as the root of the repo when searching for `.bazelversion`.

Signed-off-by: James Wainwright <james.wainwright@lowrisc.org>
(cherry picked from commit 573cb6e)
Signed-off-by: James Wainwright <james.wainwright@lowrisc.org>
(cherry picked from commit 36fe045)
This container pre-downloads Bazelisk for some reason, and the version
does not match what we're downloading in `bazelisk.sh`.

This old version is broken. Updating will fix the website build.

Signed-off-by: James Wainwright <james.wainwright@lowrisc.org>
(cherry picked from commit 6460129)
@jwnrt jwnrt force-pushed the backport-24392-to-earlgrey_1.0.0 branch from ae64d82 to 80d9425 Compare December 12, 2024 11:36
The `bazelisk.sh` script will try to use a real Bazel from the `PATH` if
it can find it, but doesn't check its value against `.bazelversion`.

This change checks the version and falls back to downloading `bazelisk`
if it doesn't match.

Signed-off-by: James Wainwright <james.wainwright@lowrisc.org>
(cherry picked from commit 68f74f7)
@jwnrt
Copy link
Contributor

jwnrt commented Dec 12, 2024

Also had to include this PR:
#25624

Also, there have been some persistent FPGA failures in CI which I can't reproduce locally. Hesitate to class them as flaky though because I can't immediately see them failing in other PRs. Strange.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant