Skip to content

Commit 207d2c3

Browse files
committed
Move CI flags to .bazelrc
This simplifies the CI config and also ensures that the recent BwoB flip in CI is disabled in all runs.
1 parent 0ca1dca commit 207d2c3

File tree

2 files changed

+16
-31
lines changed

2 files changed

+16
-31
lines changed

.bazelci/presubmit.yml

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,6 @@ tasks:
1111
bazel: 5.4.0 # test minimum supported version of bazel
1212
shell_commands:
1313
- tests/core/cgo/generate_imported_dylib.sh
14-
build_flags:
15-
# Temporary rollback to fix //tests/core/go_path builds
16-
# https://github.com/bazelbuild/continuous-integration/commit/a95a916098d3015bb4ea20b7e33bc7d27d00bffc
17-
- "--remote_download_outputs=all"
18-
- "--build_runfile_links"
1914
build_targets:
2015
- "//..."
2116
test_flags:
@@ -57,20 +52,12 @@ tasks:
5752
- "--apple_crosstool_top=@local_config_apple_cc//:toolchain"
5853
- "--crosstool_top=@local_config_apple_cc//:toolchain"
5954
- "--host_crosstool_top=@local_config_apple_cc//:toolchain"
60-
# Temporary rollback to fix //tests/core/cgo:versioned_dylib_test
61-
# https://github.com/bazelbuild/continuous-integration/commit/a95a916098d3015bb4ea20b7e33bc7d27d00bffc
62-
- "--remote_download_outputs=all"
63-
- "--build_runfile_links"
6455
build_targets:
6556
- "//..."
6657
test_flags:
6758
- "--apple_crosstool_top=@local_config_apple_cc//:toolchain"
6859
- "--crosstool_top=@local_config_apple_cc//:toolchain"
6960
- "--host_crosstool_top=@local_config_apple_cc//:toolchain"
70-
# Temporary rollback to fix //tests/core/cgo:versioned_dylib_test
71-
# https://github.com/bazelbuild/continuous-integration/commit/a95a916098d3015bb4ea20b7e33bc7d27d00bffc
72-
- "--remote_download_outputs=all"
73-
- "--build_runfile_links"
7461
test_targets:
7562
- "//..."
7663
rbe_ubuntu1604:
@@ -94,17 +81,7 @@ tasks:
9481
- "-//tests/core/stdlib:buildid_test"
9582
windows:
9683
build_flags:
97-
# Go requires a C toolchain that accepts options and emits errors like
98-
# gcc or clang. The Go SDK does not support MSVC.
99-
- "--cpu=x64_windows"
100-
- "--compiler=mingw-gcc"
10184
- '--action_env=PATH=C:\tools\msys64\usr\bin;C:\tools\msys64\bin;C:\tools\msys64\mingw64\bin;C:\python3\Scripts\;C:\python3;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C:\ProgramData\GooGet;C:\Program Files\Google\Compute Engine\metadata_scripts;C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\bin;C:\Program Files\Google\Compute Engine\sysprep;C:\ProgramData\chocolatey\bin;C:\Program Files\Git\cmd;C:\tools\msys64\usr\bin;c:\openjdk\bin;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files\CMake\bin;c:\ninja;c:\bazel;c:\buildkite'
102-
# NOTE(bazelbuild/bazel#10529): bazel doesn't register the mingw toolchain automatically.
103-
# We also need the host and target platforms to have the mingw constraint value.
104-
- "--extra_toolchains=@local_config_cc//:cc-toolchain-x64_windows_mingw"
105-
- "--host_platform=@io_bazel_rules_go//go/toolchain:windows_amd64_cgo"
106-
- "--platforms=@io_bazel_rules_go//go/toolchain:windows_amd64_cgo"
107-
- "--incompatible_enable_cc_toolchain_resolution"
10885
build_targets:
10986
# BUG(bazelbuild/bazel#6485): Bazel 0.18.0 crashes when loading
11087
# @com_google_protobuf//:protobuf. We have to exclude everything that
@@ -279,15 +256,7 @@ tasks:
279256
- "-//tests/legacy/test_rundir:go_default_test"
280257
- "-//tests/legacy/transitive_data:go_default_test"
281258
test_flags:
282-
# Go requires a C toolchain that accepts options and emits errors like
283-
# gcc or clang. The Go SDK does not support MSVC.
284-
- "--cpu=x64_windows"
285-
- "--compiler=mingw-gcc"
286259
- '--action_env=PATH=C:\tools\msys64\usr\bin;C:\tools\msys64\bin;C:\tools\msys64\mingw64\bin;C:\python3\Scripts\;C:\python3;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C:\ProgramData\GooGet;C:\Program Files\Google\Compute Engine\metadata_scripts;C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\bin;C:\Program Files\Google\Compute Engine\sysprep;C:\ProgramData\chocolatey\bin;C:\Program Files\Git\cmd;C:\tools\msys64\usr\bin;c:\openjdk\bin;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files\CMake\bin;c:\ninja;c:\bazel;c:\buildkite'
287-
- "--extra_toolchains=@local_config_cc//:cc-toolchain-x64_windows_mingw"
288-
- "--host_platform=@io_bazel_rules_go//go/toolchain:windows_amd64_cgo"
289-
- "--platforms=@io_bazel_rules_go//go/toolchain:windows_amd64_cgo"
290-
- "--incompatible_enable_cc_toolchain_resolution"
291260
# On Windows CI, bazel (bazelisk) needs %LocalAppData% to find the cache directory.
292261
# We invoke bazel in tests, so the tests need this, too.
293262
- "--test_env=LOCALAPPDATA"

.bazelrc

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
1+
common --enable_platform_specific_config
2+
3+
# //tests/core/go_path is incompatible with BwoB, which is enabled in Bazel CI.
4+
# https://github.com/bazelbuild/continuous-integration/commit/a95a916098d3015bb4ea20b7e33bc7d27d00bffc
5+
build --remote_download_outputs=all
6+
build --build_runfile_links
7+
build --experimental_remote_download_regex=.*tests/core/go_path/.*
8+
9+
# Go requires a C toolchain that accepts options and emits errors like
10+
# gcc or clang. The Go SDK does not support MSVC.
111
build:windows --cpu=x64_windows
212
build:windows --compiler=mingw-gcc
13+
# NOTE(bazelbuild/bazel#10529): bazel doesn't register the mingw toolchain automatically.
14+
# We also need the host and target platforms to have the mingw constraint value.
15+
build:windows --extra_toolchains=@local_config_cc//:cc-toolchain-x64_windows_mingw
16+
build:windows --host_platform=@io_bazel_rules_go//go/toolchain:windows_amd64_cgo
17+
build:windows --platforms=@io_bazel_rules_go//go/toolchain:windows_amd64_cgo
18+
build:windows --incompatible_enable_cc_toolchain_resolution
319

420
build:check --all_incompatible_changes
521

0 commit comments

Comments
 (0)