ci: add bazel 7 prerelease tests (#452)
This commit is contained in:
parent
b05974b197
commit
c4e601f244
|
@ -0,0 +1,15 @@
|
||||||
|
# Speed up all builds by not checking if external repository files have been modified.
|
||||||
|
# Docs: https://github.com/bazelbuild/bazel/blob/1af61b21df99edc2fc66939cdf14449c2661f873/src/main/java/com/google/devtools/build/lib/bazel/repository/RepositoryOptions.java#L244
|
||||||
|
build --noexperimental_check_external_repository_files
|
||||||
|
fetch --noexperimental_check_external_repository_files
|
||||||
|
query --noexperimental_check_external_repository_files
|
||||||
|
|
||||||
|
# Directories used by sandboxed non-worker execution may be reused to avoid unnecessary setup costs.
|
||||||
|
# Save time on Sandbox creation and deletion when many of the same kind of action run during the
|
||||||
|
# build.
|
||||||
|
# Docs: https://bazel.build/reference/command-line-reference#flag--reuse_sandbox_directories
|
||||||
|
build --reuse_sandbox_directories
|
||||||
|
|
||||||
|
# Avoid this flag being enabled by remote_download_minimal or remote_download_toplevel
|
||||||
|
# See https://meroton.com/blog/bazel-6-errors-build-without-the-bytes/
|
||||||
|
build --noexperimental_action_cache_store_output_metadata
|
|
@ -41,10 +41,12 @@ jobs:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- id: bazel_6
|
- id: bazel_6
|
||||||
run: echo "bazelversion=$(head -n 1 .bazelversion)" >> $GITHUB_OUTPUT
|
run: echo "bazelversion=$(head -n 1 .bazelversion)" >> $GITHUB_OUTPUT
|
||||||
|
- id: bazel_7
|
||||||
|
run: echo "bazelversion=7.0.0-pre.20230530.3" >> $GITHUB_OUTPUT
|
||||||
- id: bazel_5
|
- id: bazel_5
|
||||||
run: echo "bazelversion=5.4.0" >> $GITHUB_OUTPUT
|
run: echo "bazelversion=5.4.1" >> $GITHUB_OUTPUT
|
||||||
outputs:
|
outputs:
|
||||||
# Will look like '["6.0.0", "5.4.0"]'
|
# Will look like '["<version from .bazelversion>", "7.0.0-pre.*", "5.4.1"]'
|
||||||
bazelversions: ${{ toJSON(steps.*.outputs.bazelversion) }}
|
bazelversions: ${{ toJSON(steps.*.outputs.bazelversion) }}
|
||||||
|
|
||||||
matrix-prep-os:
|
matrix-prep-os:
|
||||||
|
@ -103,6 +105,9 @@ jobs:
|
||||||
# Don't test MacOS with Bazel 5 to minimize MacOS minutes (billed at 10X)
|
# Don't test MacOS with Bazel 5 to minimize MacOS minutes (billed at 10X)
|
||||||
- bazelversion: 5.4.0
|
- bazelversion: 5.4.0
|
||||||
os: macos-latest
|
os: macos-latest
|
||||||
|
# Don't test MacOS with Bazel 7 to minimize MacOS minutes (billed at 10X)
|
||||||
|
- bazelversion: 7.0.0-pre.20230530.3
|
||||||
|
os: macos-latest
|
||||||
# Don't test Windows with RBE to minimize Windows minutes (billed at 2X)
|
# Don't test Windows with RBE to minimize Windows minutes (billed at 2X)
|
||||||
- config: rbe
|
- config: rbe
|
||||||
os: windows-latest
|
os: windows-latest
|
||||||
|
|
|
@ -4,8 +4,8 @@ load("@aspect_bazel_lib//lib:bazelrc_presets.bzl", _write_aspect_bazelrc_presets
|
||||||
load("@aspect_bazel_lib_host//:defs.bzl", "host")
|
load("@aspect_bazel_lib_host//:defs.bzl", "host")
|
||||||
|
|
||||||
def write_aspect_bazelrc_presets(**kwargs):
|
def write_aspect_bazelrc_presets(**kwargs):
|
||||||
if host.bazel_version[0] != "5":
|
if host.bazel_version[0] == "6":
|
||||||
# Don't stamp this target out if we're testing against Bazel 5. The bazel6.bazelrc file is
|
# Don't stamp this target out if we're testing against Bazel 5 or 7. The bazel6.bazelrc file is
|
||||||
# deleted on CI when testing Bazel 5 which breaks analysis for this target. See
|
# deleted on CI when testing Bazel 5 which breaks analysis for this target. See
|
||||||
# https://github.com/aspect-build/bazel-lib/blob/fff5f10ad8e6921a45816e256f588d8020b3f2ee/.github/workflows/ci.yaml#L145.
|
# https://github.com/aspect-build/bazel-lib/blob/fff5f10ad8e6921a45816e256f588d8020b3f2ee/.github/workflows/ci.yaml#L145.
|
||||||
_write_aspect_bazelrc_presets(**kwargs)
|
_write_aspect_bazelrc_presets(**kwargs)
|
||||||
|
|
Loading…
Reference in New Issue