aboutsummaryrefslogtreecommitdiff
path: root/.bazelci/presubmit.yml
blob: 80a461bdcb11925b17299493ba9d5f8c0ed9e354 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
---
matrix:
  platform:
    - ubuntu2004
    - macos
    - windows

tasks:
  ubuntu1804_bazel400:
    platform: ubuntu1804
    bazel: 5.4.0 # test minimum supported version of bazel
    shell_commands:
      - tests/core/cgo/generate_imported_dylib.sh
    build_targets:
    - "//..."
    test_targets:
    - "//..."
  ubuntu2004:
    # enable some unflipped incompatible flags on this platform to ensure we don't regress.
    shell_commands:
      - tests/core/cgo/generate_imported_dylib.sh
    build_flags:
    - "--config=incompatible"
    test_flags:
    - "--config=incompatible"
    build_targets:
    - "//..."
    test_targets:
    - "//..."
  bcr_tests:
    name: BCR test module
    platform: ${{ platform }}
    working_directory: tests/bcr
    build_flags:
      - "--allow_yanked_versions=all"
    test_flags:
      - "--allow_yanked_versions=all"
    build_targets:
      - "//..."
      - "@go_default_sdk//..."
    test_targets:
      - "//..."
  macos:
    shell_commands:
      - tests/core/cgo/generate_imported_dylib.sh
    build_flags:
      - "--apple_crosstool_top=@local_config_apple_cc//:toolchain"
      - "--crosstool_top=@local_config_apple_cc//:toolchain"
      - "--host_crosstool_top=@local_config_apple_cc//:toolchain"
    build_targets:
    - "//..."
    test_flags:
      - "--apple_crosstool_top=@local_config_apple_cc//:toolchain"
      - "--crosstool_top=@local_config_apple_cc//:toolchain"
      - "--host_crosstool_top=@local_config_apple_cc//:toolchain"
    test_targets:
    - "//..."
  rbe_ubuntu1604:
    shell_commands:
      - tests/core/cgo/generate_imported_dylib.sh
    build_targets:
    - "//..."
    test_flags:
    # Some tests depend on this feature being disabled. However, because it's
    # enabled by default in the rbe_ubuntu1604 platform, we cannot simply remove
    # this flag here, we have to explicitly override it with 0.
    - "--action_env=BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=0"
    # go_bazel_test rules are marked local, since the executors don't have bazel
    # installed. It appears bazel is no longer in PATH on the host machines
    # in this configuration either.
    - "--test_tag_filters=-local"
    test_targets:
    - "--"
    - "//..."
    - "-//tests/core/stdlib:buildid_test"
  windows:
    build_flags:
    - '--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'
    build_targets:
    # BUG(bazelbuild/bazel#6485): Bazel 0.18.0 crashes when loading
    # @com_google_protobuf//:protobuf. We have to exclude everything that
    # transitively depends on it.
    # TODO(#1787): There is a cc_import target in //tests/core/cgo that
    # doesn't set the interface_library attribute. This causes an
    # analysis failure.
    # TODO(#1790): Tests that require data should use bazel.Runfile.
    # TODO(#2516): Tests that require protoc fail when protoc is built with mingw-gcc.
    - "--"
    - "//..."
    - "-@com_github_golang_protobuf//ptypes:go_default_library_gen"
    - "-@com_google_protobuf//:any_proto"
    - "-@com_google_protobuf//:api_proto"
    - "-@com_google_protobuf//:compiler_plugin_proto"
    - "-@com_google_protobuf//:descriptor_proto"
    - "-@com_google_protobuf//:duration_proto"
    - "-@com_google_protobuf//:empty_proto"
    - "-@com_google_protobuf//:field_mask_proto"
    - "-@com_google_protobuf//:protobuf"
    - "-@com_google_protobuf//:protoc"
    - "-@com_google_protobuf//:protoc_lib"
    - "-@com_google_protobuf//:source_context_proto"
    - "-@com_google_protobuf//:struct_proto"
    - "-@com_google_protobuf//:timestamp_proto"
    - "-@com_google_protobuf//:type_proto"
    - "-@com_google_protobuf//:wrappers_proto"
    - "-@go_googleapis//google/rpc:code_go_proto"
    - "-@go_googleapis//google/rpc:code_proto"
    - "-@go_googleapis//google/rpc:errdetails_go_proto"
    - "-@go_googleapis//google/rpc:errdetails_proto"
    - "-@go_googleapis//google/rpc:status_go_proto"
    - "-@go_googleapis//google/rpc:status_proto"
    - "-@go_googleapis//google/type:color_go_proto"
    - "-@gogo_special_proto//github.com/gogo/protobuf/gogoproto:gogoproto"
    - "-//go/tools/bazel:bazel_test"
    - "-@io_bazel_rules_go//proto:gogofaster_proto"
    - "-@io_bazel_rules_go//proto:go_grpc"
    - "-@io_bazel_rules_go//proto:go_proto"
    - "-@io_bazel_rules_go//proto:go_proto_bootstrap"
    - "-@io_bazel_rules_go//proto:go_proto_validate"
    - "-@io_bazel_rules_go//proto/wkt:any_go_proto"
    - "-@io_bazel_rules_go//proto/wkt:api_go_proto"
    - "-@io_bazel_rules_go//proto/wkt:compiler_plugin_go_proto"
    - "-@io_bazel_rules_go//proto/wkt:descriptor_go_proto"
    - "-@io_bazel_rules_go//proto/wkt:duration_go_proto"
    - "-@io_bazel_rules_go//proto/wkt:empty_go_proto"
    - "-@io_bazel_rules_go//proto/wkt:field_mask_go_proto"
    - "-@io_bazel_rules_go//proto/wkt:source_context_go_proto"
    - "-@io_bazel_rules_go//proto/wkt:struct_go_proto"
    - "-@io_bazel_rules_go//proto/wkt:timestamp_go_proto"
    - "-@io_bazel_rules_go//proto/wkt:type_go_proto"
    - "-@io_bazel_rules_go//proto/wkt:wrappers_go_proto"
    - "-@org_golang_x_crypto//ed25519:ed25519_test"
    - "-@org_golang_x_crypto//sha3:sha3_test"
    - "-@org_golang_x_sys//windows/registry:registry_test"
    - "-@org_golang_x_sys//windows/svc/eventlog:eventlog_test"
    - "-@org_golang_x_sys//windows/svc:svc_test"
    - "-@org_golang_x_text//language:language_test"
    - "-//proto:combo_grpc"
    - "-//proto:combo_proto"
    - "-//proto:gofast_grpc"
    - "-//proto:gofast_proto"
    - "-//proto:gogofaster_grpc"
    - "-//proto:gogofaster_proto"
    - "-//proto:gogofast_grpc"
    - "-//proto:gogofast_proto"
    - "-//proto:gogo_grpc"
    - "-//proto:gogo_proto"
    - "-//proto:gogoslick_grpc"
    - "-//proto:gogoslick_proto"
    - "-//proto:gogotypes_grpc"
    - "-//proto:gogotypes_proto"
    - "-//proto:go_grpc"
    - "-//proto:go_proto"
    - "-//proto:go_proto_bootstrap"
    - "-//proto:go_proto_validate"
    - "-//proto:gostring_grpc"
    - "-//proto:gostring_proto"
    - "-//proto/wkt:any_go_proto"
    - "-//proto/wkt:api_go_proto"
    - "-//proto/wkt:compiler_plugin_go_proto"
    - "-//proto/wkt:descriptor_go_proto"
    - "-//proto/wkt:duration_go_proto"
    - "-//proto/wkt:empty_go_proto"
    - "-//proto/wkt:field_mask_go_proto"
    - "-//proto/wkt:source_context_go_proto"
    - "-//proto/wkt:struct_go_proto"
    - "-//proto/wkt:timestamp_go_proto"
    - "-//proto/wkt:type_go_proto"
    - "-//proto/wkt:wrappers_go_proto"
    - "-//tests:buildifier_test" # transitively requires proto, doesn't build in CI
    - "-@test_chdir_remote//sub:go_default_test"
    - "-//tests/core/cgo:dylib_client"
    - "-//tests/core/cgo:dylib_test"
    - "-//tests/core/cgo:generated_dylib_client"
    - "-//tests/core/cgo:generated_dylib_test"
    - "-//tests/core/cgo:versioned_dylib_client"
    - "-//tests/core/cgo:versioned_dylib_test"
    - "-//tests/core/cgo:generated_versioned_dylib_client"
    - "-//tests/core/cgo:generated_versioned_dylib_test"
    - "-//tests/core/cross:proto_test"
    - "-//tests/core/go_path:go_path"
    - "-//tests/core/go_path:go_path_test"
    - "-//tests/core/go_path:nodata_path"
    - "-//tests/core/go_path:copy_path"
    - "-//tests/core/go_path:archive_path"
    - "-//tests/core/go_path/pkg/lib:vendored"
    - "-//tests/core/go_path/pkg/lib:go_default_test"
    - "-//tests/core/go_path/pkg/lib:go_default_library"
    - "-//tests/core/go_path/pkg/lib:embed_test"
    - "-//tests/core/go_path/pkg/lib:embed_lib"
    - "-//tests/core/go_path/cmd/bin:cross"
    - "-//tests/core/go_path/cmd/bin:bin"
    - "-//tests/core/go_plugin:go_plugin"
    - "-//tests/core/go_plugin:go_default_test"
    - "-//tests/core/go_plugin:plugin"
    - "-//tests/core/go_plugin_with_proto_library:go_plugin_with_proto_library"
    - "-//tests/core/go_plugin_with_proto_library:go_default_test"
    - "-//tests/core/go_plugin_with_proto_library:plugin"
    - "-//tests/core/go_proto_library:all"
    - "-//tests/core/go_proto_library_importmap:foo_go_proto"
    - "-//tests/core/go_proto_library_importmap:foo_proto"
    - "-//tests/core/go_proto_library_importmap:importmap_test"
    - "-//tests/core/go_test:data_test"
    - "-//tests/core/go_test:pwd_test"
    - "-//tests/core/race:race_test"
    - "-//tests/core/stdlib:buildid_test"
    - "-//tests/examples/executable_name:executable_name"
    - "-//tests/integration/googleapis:color_service"
    - "-//tests/integration/googleapis:color_service_go_proto"
    - "-//tests/integration/googleapis:color_service_proto"
    - "-//tests/integration/googleapis:color_service_test"
    - "-//tests/legacy/examples/cgo/example_command:example_command_test"
    - "-//tests/legacy/examples/cgo/example_command:example_command_script"
    - "-//tests/legacy/examples/cgo/example_command:example_command"
    - "-//tests/legacy/examples/cgo:generate_go_src"
    - "-//tests/legacy/examples/cgo:cgo_lib_test"
    - "-//tests/legacy/examples/cgo:go_default_library"
    - "-//tests/legacy/examples/cgo/cc_dependency:version"
    - "-//tests/legacy/examples/cgo/cc_dependency:c_version_so"
    - "-//tests/legacy/examples/cgo:sub"
    - "-//tests/legacy/examples/proto/dep:useful_go_proto"
    - "-//tests/legacy/examples/proto/dep:useful_proto"
    - "-//tests/legacy/examples/proto/embed:embed_go_proto"
    - "-//tests/legacy/examples/proto/embed:embed_proto"
    - "-//tests/legacy/examples/proto/embed:go_default_library"
    - "-//tests/legacy/examples/proto:go_default_library"
    - "-//tests/legacy/examples/proto/gogo:gogo_test"
    - "-//tests/legacy/examples/proto/gogo:values_go_proto"
    - "-//tests/legacy/examples/proto/gogo:values_proto"
    - "-//tests/legacy/examples/proto/gostyle:gostyle_go_proto"
    - "-//tests/legacy/examples/proto/gostyle:gostyle_proto"
    - "-//tests/legacy/examples/proto/grpc:my_svc_go_proto"
    - "-//tests/legacy/examples/proto/grpc:my_svc_proto"
    - "-//tests/legacy/examples/proto/grpc:not_grpc"
    - "-//tests/legacy/examples/proto/grpc:test_grpc"
    - "-//tests/legacy/examples/proto/lib:lib_go_proto"
    - "-//tests/legacy/examples/proto/lib:lib_proto"
    - "-//tests/legacy/examples/proto:proto_pure_test"
    - "-//tests/legacy/examples/proto:proto_test"
    - "-//tests/legacy/extldflags_rpath:extldflags_rpath_test"
    - "-//tests/legacy/info:info"
    - "-//tests/legacy/proto_ignore_go_package_option:a_go_proto"
    - "-//tests/legacy/proto_ignore_go_package_option:a_proto"
    - "-//tests/legacy/proto_ignore_go_package_option:b_go_proto"
    - "-//tests/legacy/proto_ignore_go_package_option:b_proto"
    - "-//tests/legacy/test_chdir:go_default_test"
    - "-//tests/legacy/test_rundir:go_default_test"
    - "-//tests/legacy/transitive_data:go_default_test"
    test_flags:
    - '--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'
    # On Windows CI, bazel (bazelisk) needs %LocalAppData% to find the cache directory.
    # We invoke bazel in tests, so the tests need this, too.
    - "--test_env=LOCALAPPDATA"
    # go_bazel_test runs bazel in a test workspace. It needs the same flags as above.
    - "--test_env=GO_BAZEL_TEST_BAZELFLAGS=--cpu=x64_windows --compiler=mingw-gcc --extra_toolchains=@local_config_cc//:cc-toolchain-x64_windows_mingw --action_env=PATH --host_platform=@io_bazel_rules_go//go/toolchain:windows_amd64_cgo --incompatible_enable_cc_toolchain_resolution"
    - "--test_env=PATH"
    test_targets:
    - "--"
    - "//..."
    - "-//go/tools/bazel:bazel_test"
    - "-@org_golang_x_crypto//ed25519:ed25519_test"
    - "-@org_golang_x_crypto//sha3:sha3_test"
    - "-@org_golang_x_net//ipv4:ipv4_test"
    - "-@org_golang_x_sys//windows/registry:registry_test"
    - "-@org_golang_x_sys//windows/svc/eventlog:eventlog_test"
    - "-@org_golang_x_sys//windows/svc:svc_test"
    - "-@org_golang_x_text//language:language_test"
    - "-@org_golang_x_tools//cmd/splitdwarf/internal/macho:macho_test"
    - "-@test_chdir_remote//sub:go_default_test"
    - "-//go/tools/builders:stdliblist_test" # fails on Windows due to #2491
    - "-//tests:buildifier_test" # requires bash
    - "-//tests/core/cgo:dylib_client"
    - "-//tests/core/cgo:dylib_test"
    - "-//tests/core/cgo:generated_dylib_client"
    - "-//tests/core/cgo:generated_dylib_test"
    - "-//tests/core/cgo:race_test" # fails on Windows due to upstream bug, see issue #2911
    - "-//tests/core/cgo:versioned_dylib_client"
    - "-//tests/core/cgo:versioned_dylib_test"
    - "-//tests/core/cgo:generated_versioned_dylib_client"
    - "-//tests/core/cgo:generated_versioned_dylib_test"
    - "-//tests/core/coverage:coverage_test"
    - "-//tests/core/coverage:issue3017_test"
    - "-//tests/core/cross:proto_test"
    - "-//tests/core/go_binary:go_default_test"
    - "-//tests/extras/go_embed_data:go_default_test"
    - "-//tests/core/go_path:go_path"
    - "-//tests/core/go_path:go_path_test"
    - "-//tests/core/go_path/pkg/lib:embed_test"
    - "-//tests/core/go_path/pkg/lib:go_default_test"
    - "-//tests/core/go_plugin:go_plugin"
    - "-//tests/core/go_plugin:go_default_test"
    - "-//tests/core/go_plugin:plugin"
    - "-//tests/core/go_plugin_with_proto_library:go_plugin_with_proto_library"
    - "-//tests/core/go_plugin_with_proto_library:go_default_test"
    - "-//tests/core/go_plugin_with_proto_library:plugin"
    - "-//tests/core/go_proto_library:all"
    - "-//tests/core/go_proto_library_importmap:importmap_test"
    - "-//tests/core/go_test:data_test"
    - "-//tests/core/go_test:pwd_test"
    - "-//tests/core/nogo/coverage:coverage_test"
    - "-//tests/core/nogo/coverage:gen_code_test"
    - "-//tests/core/race:race_test" # fails on Windows due to upstream bug, see issue #2911
    - "-//tests/core/stdlib:buildid_test"
    - "-//tests/examples/executable_name:executable_name"
    - "-//tests/integration/gazelle:gazelle_test" # exceeds command line length limit
    - "-//tests/integration/googleapis:color_service_test"
    - "-//tests/integration/reproducibility:reproducibility_test"
    - "-//tests/legacy/cgo_pthread_flag:go_default_test" # fails without error, passes locally. Problem with CI msys2?
    - "-//tests/legacy/examples/cgo/example_command:example_command_test"
    - "-//tests/legacy/examples/cgo/example_command:example_command_script"
    - "-//tests/legacy/examples/cgo/example_command:example_command"
    - "-//tests/legacy/examples/cgo:generate_go_src"
    - "-//tests/legacy/examples/cgo:cgo_lib_test"
    - "-//tests/legacy/examples/cgo:go_default_library"
    - "-//tests/legacy/examples/cgo/cc_dependency:version"
    - "-//tests/legacy/examples/cgo/cc_dependency:c_version_so"
    - "-//tests/legacy/examples/proto/gogo:gogo_test"
    - "-//tests/legacy/examples/proto:proto_pure_test"
    - "-//tests/legacy/examples/proto:proto_test"
    - "-//tests/legacy/extldflags_rpath:extldflags_rpath_test"
    - "-//tests/legacy/info:info"
    - "-//tests/legacy/test_chdir:go_default_test"
    - "-//tests/legacy/test_rundir:go_default_test"
    - "-//tests/legacy/transitive_data:go_default_test"
    # Stardoc produces different line-endings on windows,
    # so the documentation it generates doesn't match the checked in files.
    # - Tracking issue https://github.com/bazelbuild/stardoc/issues/42.
    - "-//docs:all"
# The following configurations test a seperate WORKSPACE under the examples folder
  ubuntu2004_examples:
    name: Examples test on Ubuntu
    platform: ubuntu2004
    working_directory: examples/basic-gazelle
    build_flags:
      - "--config=incompatible"
    test_flags:
      - "--config=incompatible"
    build_targets:
      - "//..."
    test_targets:
      - "//..."
  macos_examples:
    name: Examples test on MacOS
    platform: macos
    working_directory: examples/basic-gazelle
    build_flags:
      - "--config=incompatible"
    test_flags:
      - "--config=incompatible"
    build_targets:
    - "//..."
    test_targets:
    - "//..."
  windows_examples:
    name: Examples test on Windows
    platform: windows
    working_directory: examples/basic-gazelle
    build_flags:
    - "--config=incompatible"
    # Go requires a C toolchain that accepts options and emits errors like
    # gcc or clang. The Go SDK does not support MSVC.
    - '--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'
    # NOTE(bazelbuild/bazel#10529): bazel doesn't register the mingw toolchain automatically.
    # We also need the host and target platforms to have the mingw constraint value.
    build_targets:
    - "//..."
    test_targets:
    - "//..."
    test_flags:
    - "--config=incompatible"
    - '--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'
    # On Windows CI, bazel (bazelisk) needs %LocalAppData% to find the cache directory.
    # We invoke bazel in tests, so the tests need this, too.
    - "--test_env=LOCALAPPDATA"
    # go_bazel_test runs bazel in a test workspace. It needs the same flags as above.
    - "--test_env=GO_BAZEL_TEST_BAZELFLAGS=--cpu=x64_windows --compiler=mingw-gcc --extra_toolchains=@local_config_cc//:cc-toolchain-x64_windows_mingw --action_env=PATH --host_platform=@io_bazel_rules_go//go/toolchain:windows_amd64_cgo --incompatible_enable_cc_toolchain_resolution"
    - "--test_env=PATH"