Skip to content

Commit 58b2ac1

Browse files
committed
fix presubmit.yaml
1 parent fa196a5 commit 58b2ac1

File tree

1 file changed

+32
-30
lines changed

1 file changed

+32
-30
lines changed

.bazelci/presubmit.yml

Lines changed: 32 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,19 @@ buildifier:
1818
# Use a specific version to avoid skew issues when new versions are released.
1919
version: 6.1.0
2020
warnings: "all"
21-
.bazel_7_cxx_17_config: &bazel_7_cxx_17_config
21+
.bazel_7_cxx_17_flags: &bazel_7_cxx_17_flags
2222
# recent protobuf and abseil-cpp requires C++17 which is not used by default in Bazel 7
23-
- "--cxxopt=-std=c++17"
24-
- "--host_cxxopt=-std=c++17"
23+
build_flags:
24+
- "--cxxopt=-std=c++17"
25+
- "--host_cxxopt=-std=c++17"
26+
test_flags:
27+
- "--cxxopt=-std=c++17"
28+
- "--host_cxxopt=-std=c++17"
2529
# NOTE: Minimum supported version is 7.x
2630
.minimum_supported_version: &minimum_supported_version
2731
# For testing minimum supported version.
2832
# NOTE: Keep in sync with //:version.bzl
29-
build_flags:
30-
<<: *bazel_7_cxx_17_config
31-
test_flags:
32-
<<: *bazel_7_cxx_17_config
33+
<<: *bazel_7_cxx_17_flags
3334
bazel: 7.x
3435
skip_in_bazel_downstream_pipeline: "Bazel 7 required"
3536
.reusable_config: &reusable_config
@@ -57,34 +58,46 @@ buildifier:
5758
build_flags:
5859
- "--keep_going"
5960
- "--build_tag_filters=-integration-test"
60-
<<: *bazel_7_cxx_17_config
61+
# recent protobuf and abseil-cpp requires C++17 which is not used by default in Bazel 7
62+
- "--cxxopt=-std=c++17"
63+
- "--host_cxxopt=-std=c++17"
6164
test_targets:
6265
- "--"
6366
- "..."
6467
test_flags:
6568
- "--test_tag_filters=-integration-test"
66-
<<: *bazel_7_cxx_17_config
69+
# recent protobuf and abseil-cpp requires C++17 which is not used by default in Bazel 7
70+
- "--cxxopt=-std=c++17"
71+
- "--host_cxxopt=-std=c++17"
6772
.common_workspace_flags_min_bazel: &common_workspace_flags_min_bazel
6873
build_flags:
6974
- "--noenable_bzlmod"
7075
- "--build_tag_filters=-integration-test"
71-
<<: *bazel_7_cxx_17_config
76+
# recent protobuf and abseil-cpp requires C++17 which is not used by default in Bazel 7
77+
- "--cxxopt=-std=c++17"
78+
- "--host_cxxopt=-std=c++17"
7279
test_flags:
7380
- "--noenable_bzlmod"
7481
- "--test_tag_filters=-integration-test"
75-
<<: *bazel_7_cxx_17_config
82+
# recent protobuf and abseil-cpp requires C++17 which is not used by default in Bazel 7
83+
- "--cxxopt=-std=c++17"
84+
- "--host_cxxopt=-std=c++17"
7685
.common_workspace_flags: &common_workspace_flags
7786
skip_in_bazel_downstream_pipeline: "Bazel 9 doesn't support workspace"
7887
test_flags:
7988
- "--noenable_bzlmod"
8089
- "--enable_workspace"
8190
- "--test_tag_filters=-integration-test"
82-
<<: *bazel_7_cxx_17_config
91+
# recent protobuf and abseil-cpp requires C++17 which is not used by default in Bazel 7
92+
- "--cxxopt=-std=c++17"
93+
- "--host_cxxopt=-std=c++17"
8394
build_flags:
8495
- "--noenable_bzlmod"
8596
- "--enable_workspace"
8697
- "--build_tag_filters=-integration-test"
87-
<<: *bazel_7_cxx_17_config
98+
# recent protobuf and abseil-cpp requires C++17 which is not used by default in Bazel 7
99+
- "--cxxopt=-std=c++17"
100+
- "--host_cxxopt=-std=c++17"
88101
bazel: 7.x
89102
# NOTE: The Mac and Windows bazelinbazel jobs override parts of this config.
90103
.common_bazelinbazel_config: &common_bazelinbazel_config
@@ -254,7 +267,8 @@ tasks:
254267
test_flags:
255268
- "--test_tag_filters=-integration-test,-acceptance-test"
256269
- "--extra_toolchains=@buildkite_config//config:cc-toolchain"
257-
<<: *bazel_7_cxx_17_config
270+
- "--cxxopt=-std=c++17"
271+
- "--host_cxxopt=-std=c++17"
258272
integration_test_build_file_generation_ubuntu_minimum_supported_workspace:
259273
<<: *minimum_supported_version
260274
<<: *reusable_build_test_all
@@ -298,14 +312,11 @@ tasks:
298312
integration_test_bzlmod_ubuntu:
299313
<<: *reusable_build_test_all
300314
<<: *coverage_targets_example_bzlmod
315+
<<: *bazel_7_cxx_17_flags
301316
name: "examples/bzlmod: Ubuntu"
302317
working_directory: examples/bzlmod
303318
platform: ubuntu2204
304319
bazel: 7.x
305-
build_flags:
306-
<<: *bazel_7_cxx_17_config
307-
test_flags:
308-
<<: *bazel_7_cxx_17_config
309320
integration_test_bzlmod_ubuntu_upcoming:
310321
<<: *reusable_build_test_all
311322
<<: *coverage_targets_example_bzlmod
@@ -316,14 +327,11 @@ tasks:
316327
integration_test_bzlmod_debian:
317328
<<: *reusable_build_test_all
318329
<<: *coverage_targets_example_bzlmod
330+
<<: *bazel_7_cxx_17_flags
319331
name: "examples/bzlmod: Debian"
320332
working_directory: examples/bzlmod
321333
platform: debian11
322334
bazel: 7.x
323-
build_flags:
324-
<<: *bazel_7_cxx_17_config
325-
test_flags:
326-
<<: *bazel_7_cxx_17_config
327335
integration_test_bzlmod_ubuntu_vendor:
328336
<<: *reusable_build_test_all
329337
name: "examples/bzlmod: bazel vendor"
@@ -336,14 +344,11 @@ tasks:
336344
integration_test_bzlmod_macos:
337345
<<: *reusable_build_test_all
338346
<<: *coverage_targets_example_bzlmod
347+
<<: *bazel_7_cxx_17_flags
339348
name: "examples/bzlmod: macOS"
340349
working_directory: examples/bzlmod
341350
platform: macos
342351
bazel: 7.x
343-
build_flags:
344-
<<: *bazel_7_cxx_17_config
345-
test_flags:
346-
<<: *bazel_7_cxx_17_config
347352
integration_test_bzlmod_macos_upcoming:
348353
<<: *reusable_build_test_all
349354
<<: *coverage_targets_example_bzlmod
@@ -353,15 +358,12 @@ tasks:
353358
bazel: last_rc
354359
integration_test_bzlmod_windows:
355360
<<: *reusable_build_test_all
361+
<<: *bazel_7_cxx_17_flags
356362
# coverage is not supported on Windows
357363
name: "examples/bzlmod: Windows"
358364
working_directory: examples/bzlmod
359365
platform: windows
360366
bazel: 7.x
361-
build_flags:
362-
<<: *bazel_7_cxx_17_config
363-
test_flags:
364-
<<: *bazel_7_cxx_17_config
365367
integration_test_bzlmod_windows_upcoming:
366368
<<: *reusable_build_test_all
367369
# coverage is not supported on Windows

0 commit comments

Comments
 (0)