Skip to content

Commit 95d7802

Browse files
mostynbthesayyn
andauthored
ci: test bazel 8.4.2 and 7.6.2, and build with 8.4.2 by default (#854)
Co-authored-by: Sahin Yort <[email protected]>
1 parent d688832 commit 95d7802

File tree

15 files changed

+42
-31
lines changed

15 files changed

+42
-31
lines changed

.bazelrc

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,8 @@ build --incompatible_strict_action_env
66
build --nolegacy_external_runfiles
77
common --test_env=DOCKER_HOST --action_env=DOCKER_HOST --repo_env=DOCKER_HOST
88

9-
# On bazel 6.4.0 these are needed to successfully fetch images.
10-
common:needs_credential_helpers --credential_helper=public.ecr.aws=%workspace%/examples/credential_helper/auth.sh
11-
common:needs_credential_helpers --credential_helper=index.docker.io=%workspace%/examples/credential_helper/auth.sh
12-
common:needs_credential_helpers --credential_helper=docker.elastic.co=%workspace%/examples/credential_helper/auth.sh
13-
common:needs_credential_helpers --credential_helper_cache_duration=0
9+
# Keep WORKSPACE support until we stop supporting bazel 7?
10+
common --enable_workspace
1411

1512
# Don’t want to push a rules author to update their deps if not needed.
1613
# https://bazel.build/reference/command-line-reference#flag--check_direct_dependencies

.bazelversion

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
7.4.1
1+
8.4.2
22

33
# The first line of this file is used by Bazelisk and Bazel to be sure
44
# the right version of Bazel is used to build and test this repo.

.github/workflows/ci.yaml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ jobs:
2323
runs-on: ubuntu-latest
2424
steps:
2525
- uses: actions/checkout@v4
26-
- id: bazel_7
26+
- id: bazel_8
2727
run: echo "bazelversion=$(head -n 1 .bazelversion)" >> $GITHUB_OUTPUT
28-
- id: bazel_6
29-
run: echo "bazelversion=6.4.0" >> $GITHUB_OUTPUT
28+
- id: bazel_7
29+
run: echo "bazelversion=7.6.2" >> $GITHUB_OUTPUT
3030
outputs:
31-
# Will look like ["<version from .bazelversion>", "6.4.0"]
31+
# Will look like ["<version from .bazelversion>", "7.6.2"]
3232
bazelversions: ${{ toJSON(steps.*.outputs.bazelversion) }}
3333

3434
matrix-prep-os:
@@ -74,13 +74,13 @@ jobs:
7474
- os: macos-13
7575
folder: e2e/assertion
7676
- os: macos-13
77-
bazelversion: 6.4.0
77+
bazelversion: 7.6.2
7878
- folder: .
79-
bazelversion: 6.4.0
79+
bazelversion: 7.6.2
8080
- folder: examples/dockerfile
8181
bzlmodEnabled: false
8282
- folder: examples/dockerfile
83-
bazelversion: 6.4.0
83+
bazelversion: 7.6.2
8484
# e2e/assertion is bzlmod only but it has test for both cases.
8585
- folder: e2e/assertion
8686
bzlmodEnabled: false
@@ -91,7 +91,7 @@ jobs:
9191
- folder: .
9292
bzlmodEnabled: false
9393
# This is tested on Buildkite using Aspect Workflows
94-
- bazelversion: 7.4.1
94+
- bazelversion: 7.6.2
9595
folder: .
9696
os: ubuntu-latest
9797
# Steps represent a sequence of tasks that will be executed as part of the job
@@ -121,12 +121,12 @@ jobs:
121121
# Add --config needs_credential_helpers to add additional credential helpers
122122
# to fetch from registries with HTTP headers set by credential helpers.
123123
id: set_credential_helper_flag
124-
if: matrix.bazelversion == '6.4.0' && matrix.folder == '.'
124+
if: matrix.bazelversion == '7.6.2' && matrix.folder == '.'
125125
run: echo "credential_helper_flag=--config=needs_credential_helpers" >> $GITHUB_OUTPUT
126126

127127
- name: Setup crane for credential helpers to use
128128
uses: imjasonh/[email protected]
129-
if: matrix.bazelversion == '6.4.0' && matrix.folder == '.'
129+
if: matrix.bazelversion == '7.6.2' && matrix.folder == '.'
130130
with:
131131
version: "v0.19.1"
132132

MODULE.bazel

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ module(
77

88
bazel_dep(name = "aspect_bazel_lib", version = "2.7.2")
99
bazel_dep(name = "bazel_features", version = "1.10.0")
10-
bazel_dep(name = "bazel_skylib", version = "1.8.1")
11-
bazel_dep(name = "platforms", version = "0.0.8")
10+
bazel_dep(name = "bazel_skylib", version = "1.8.2")
11+
bazel_dep(name = "platforms", version = "1.0.0")
1212

1313
oci = use_extension("//oci:extensions.bzl", "oci")
1414
oci.toolchains()

docs/image.md

Lines changed: 6 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/image_index.md

Lines changed: 5 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/load.md

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/pull.md

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/push.md

Lines changed: 5 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

e2e/assertion/BUILD.bazel

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ load("@aspect_bazel_lib//lib:bats.bzl", "bats_test")
3535
)
3636
for (name, flags) in [
3737
("bzlmod", "--enable_bzlmod"),
38-
("nobzlmod", "--noenable_bzlmod"),
3938
]
4039
]
4140

@@ -65,7 +64,6 @@ load("@aspect_bazel_lib//lib:bats.bzl", "bats_test")
6564
)
6665
for (name, flags) in [
6766
("bzlmod", "--enable_bzlmod"),
68-
("nobzlmod", "--noenable_bzlmod"),
6967
]
7068
]
7169

@@ -95,8 +93,6 @@ load("@aspect_bazel_lib//lib:bats.bzl", "bats_test")
9593
)
9694
for (name, flags) in [
9795
("bzlmod_legacy_runfiles", "--enable_bzlmod --legacy_external_runfiles"),
98-
("nobzlmod_legacy_runfiles", "--noenable_bzlmod --legacy_external_runfiles"),
9996
("bzlmod_nolegacy_runfiles", "--enable_bzlmod --nolegacy_external_runfiles"),
100-
("nobzlmod_nolegacy_runfiles", "--noenable_bzlmod --nolegacy_external_runfiles"),
10197
]
10298
]

0 commit comments

Comments
 (0)