...

Text file src/github.com/bazelbuild/rules_go/.bazelci/presubmit.yml

Documentation: github.com/bazelbuild/rules_go/.bazelci

     1---
     2matrix:
     3  platform:
     4    - ubuntu2004
     5    - macos
     6    - macos_arm64
     7    - windows
     8
     9tasks:
    10  ubuntu1804_bazel400:
    11    platform: ubuntu1804
    12    bazel: 5.4.0 # test minimum supported version of bazel
    13    shell_commands:
    14      - tests/core/cgo/generate_imported_dylib.sh
    15    build_targets:
    16      - "//..."
    17      - "--"
    18      - "-//tests/core/cross:darwin_go_cross_cgo"  # Doesn't work before bazel 6
    19      - "-//tests/core/cross:linux_go_cross_cgo"  # Doesn't work before bazel 6
    20      - "-//tests/core/cross:windows_go_cross_cgo"  # Doesn't work before bazel 6
    21      - "-//tests/core/starlark/cgo/..."  # Doesn't work before bazel 6
    22    test_targets:
    23      - "//..."
    24      - "-//tests/core/cross:darwin_go_cross_cgo"  # Doesn't work before bazel 6
    25      - "-//tests/core/cross:linux_go_cross_cgo"  # Doesn't work before bazel 6
    26      - "-//tests/core/cross:windows_go_cross_cgo"  # Doesn't work before bazel 6
    27      - "-//tests/core/starlark/cgo/..."  # Doesn't work before bazel 6
    28      # Bzlmod tests require Bazel 6+
    29      - "-//tests/core/nogo/bzlmod/..."
    30      # Nogo includes/excludes doesn't work before bazel 6
    31      - "-//tests/core/nogo/includes_excludes:includes_exclude_test"
    32  ubuntu2004:
    33    # enable some unflipped incompatible flags on this platform to ensure we don't regress.
    34    shell_commands:
    35      - tests/core/cgo/generate_imported_dylib.sh
    36    build_flags:
    37      - "--config=incompatible"
    38    test_flags:
    39      - "--config=incompatible"
    40    build_targets:
    41      - "//..."
    42      - "--"
    43      - "-//tests/core/cross:darwin_go_cross_cgo"  # Doesn't work before bazel 6
    44      - "-//tests/core/cross:linux_go_cross_cgo"  # Doesn't work before bazel 6
    45      - "-//tests/core/cross:windows_go_cross_cgo"  # Doesn't work before bazel 6
    46    test_targets:
    47      - "//..."
    48  debian11_zig_cc:
    49    platform: debian11
    50    shell_commands:
    51      - tests/core/cgo/generate_imported_dylib.sh
    52    build_flags:
    53      - "--config=incompatible"
    54      - "--extra_toolchains=@zig_sdk//toolchain:linux_amd64_gnu.2.31"
    55    test_flags:
    56      - "--config=incompatible"
    57      - "--extra_toolchains=@zig_sdk//toolchain:linux_amd64_gnu.2.31"
    58      - "--test_env=ZIG_CC=1"
    59    build_targets:
    60      - "//..."
    61    test_targets:
    62      - "//..."
    63  bcr_tests:
    64    name: BCR test module
    65    platform: ${{ platform }}
    66    working_directory: tests/bcr
    67    build_flags:
    68      - "--allow_yanked_versions=all"
    69    test_flags:
    70      - "--allow_yanked_versions=all"
    71    build_targets:
    72      - "//..."
    73      - "@go_default_sdk//..."
    74    test_targets:
    75      - "//..."
    76  macos:
    77    shell_commands:
    78      - tests/core/cgo/generate_imported_dylib.sh
    79    build_flags:
    80      - "--apple_crosstool_top=@local_config_apple_cc//:toolchain"
    81      - "--crosstool_top=@local_config_apple_cc//:toolchain"
    82      - "--host_crosstool_top=@local_config_apple_cc//:toolchain"
    83    build_targets:
    84      - "//..."
    85      - "--"
    86      - "-//tests/core/cross:darwin_go_cross_cgo"  # Doesn't work before bazel 6
    87      - "-//tests/core/cross:linux_go_cross_cgo"  # Doesn't work before bazel 6
    88      - "-//tests/core/cross:windows_go_cross_cgo"  # Doesn't work before bazel 6
    89    test_flags:
    90      - "--apple_crosstool_top=@local_config_apple_cc//:toolchain"
    91      - "--crosstool_top=@local_config_apple_cc//:toolchain"
    92      - "--host_crosstool_top=@local_config_apple_cc//:toolchain"
    93    test_targets:
    94      - "//..."
    95  rbe_ubuntu1604:
    96    shell_commands:
    97      - tests/core/cgo/generate_imported_dylib.sh
    98    build_targets:
    99      - "//..."
   100      - "--"
   101      - "-//tests/core/cross:darwin_go_cross_cgo"  # Doesn't work before bazel 6
   102      - "-//tests/core/cross:linux_go_cross_cgo"  # Doesn't work before bazel 6
   103      - "-//tests/core/cross:windows_go_cross_cgo"  # Doesn't work before bazel 6
   104    test_flags:
   105      # Some tests depend on this feature being disabled. However, because it's
   106      # enabled by default in the rbe_ubuntu1604 platform, we cannot simply remove
   107      # this flag here, we have to explicitly override it with 0.
   108      - "--action_env=BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=0"
   109      # go_bazel_test rules are marked local, since the executors don't have bazel
   110      # installed. It appears bazel is no longer in PATH on the host machines
   111      # in this configuration either.
   112      - "--test_tag_filters=-local"
   113    test_targets:
   114      - "--"
   115      - "//..."
   116      - "-//tests/core/stdlib:buildid_test"
   117  windows:
   118    build_flags:
   119      - '--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'
   120    build_targets:
   121      # BUG(bazelbuild/bazel#6485): Bazel 0.18.0 crashes when loading
   122      # @com_google_protobuf//:protobuf. We have to exclude everything that
   123      # transitively depends on it.
   124      # TODO(#1787): There is a cc_import target in //tests/core/cgo that
   125      # doesn't set the interface_library attribute. This causes an
   126      # analysis failure.
   127      # TODO(#1790): Tests that require data should use bazel.Runfile.
   128      # TODO(#2516): Tests that require protoc fail when protoc is built with mingw-gcc.
   129      - "--"
   130      - "//..."
   131      - "-@com_github_golang_protobuf//ptypes:go_default_library_gen"
   132      - "-@com_google_protobuf//:any_proto"
   133      - "-@com_google_protobuf//:api_proto"
   134      - "-@com_google_protobuf//:compiler_plugin_proto"
   135      - "-@com_google_protobuf//:descriptor_proto"
   136      - "-@com_google_protobuf//:duration_proto"
   137      - "-@com_google_protobuf//:empty_proto"
   138      - "-@com_google_protobuf//:field_mask_proto"
   139      - "-@com_google_protobuf//:protobuf"
   140      - "-@com_google_protobuf//:protoc"
   141      - "-@com_google_protobuf//:protoc_lib"
   142      - "-@com_google_protobuf//:source_context_proto"
   143      - "-@com_google_protobuf//:struct_proto"
   144      - "-@com_google_protobuf//:timestamp_proto"
   145      - "-@com_google_protobuf//:type_proto"
   146      - "-@com_google_protobuf//:wrappers_proto"
   147      - "-@gogo_special_proto//github.com/gogo/protobuf/gogoproto:gogoproto"
   148      - "-//go/tools/bazel:bazel_test"
   149      - "-@io_bazel_rules_go//proto:gogofaster_proto"
   150      - "-@io_bazel_rules_go//proto:go_grpc"
   151      - "-@io_bazel_rules_go//proto:go_proto"
   152      - "-@io_bazel_rules_go//proto:go_proto_bootstrap"
   153      - "-@org_golang_x_crypto//ed25519:ed25519_test"
   154      - "-@org_golang_x_crypto//sha3:sha3_test"
   155      - "-@org_golang_x_sys//windows/registry:registry_test"
   156      - "-@org_golang_x_sys//windows/svc/eventlog:eventlog_test"
   157      - "-@org_golang_x_sys//windows/svc:svc_test"
   158      - "-@org_golang_x_text//language:language_test"
   159      - "-//proto:combo_grpc"
   160      - "-//proto:combo_proto"
   161      - "-//proto:gofast_grpc"
   162      - "-//proto:gofast_proto"
   163      - "-//proto:gogofaster_grpc"
   164      - "-//proto:gogofaster_proto"
   165      - "-//proto:gogofast_grpc"
   166      - "-//proto:gogofast_proto"
   167      - "-//proto:gogo_grpc"
   168      - "-//proto:gogo_proto"
   169      - "-//proto:gogoslick_grpc"
   170      - "-//proto:gogoslick_proto"
   171      - "-//proto:gogotypes_grpc"
   172      - "-//proto:gogotypes_proto"
   173      - "-//proto:go_grpc"
   174      - "-//proto:go_proto"
   175      - "-//proto:go_proto_bootstrap"
   176      - "-//proto:gostring_grpc"
   177      - "-//proto:gostring_proto"
   178      - "-//proto/wkt:any_go_proto"
   179      - "-//proto/wkt:api_go_proto"
   180      - "-//proto/wkt:compiler_plugin_go_proto"
   181      - "-//proto/wkt:descriptor_go_proto"
   182      - "-//proto/wkt:duration_go_proto"
   183      - "-//proto/wkt:empty_go_proto"
   184      - "-//proto/wkt:field_mask_go_proto"
   185      - "-//proto/wkt:source_context_go_proto"
   186      - "-//proto/wkt:struct_go_proto"
   187      - "-//proto/wkt:timestamp_go_proto"
   188      - "-//proto/wkt:type_go_proto"
   189      - "-//proto/wkt:wrappers_go_proto"
   190      - "-//tests:buildifier_test" # transitively requires proto, doesn't build in CI
   191      - "-@test_chdir_remote//sub:go_default_test"
   192      - "-//tests/core/cgo:dylib_client"
   193      - "-//tests/core/cgo:dylib_test"
   194      - "-//tests/core/cgo:generated_dylib_client"
   195      - "-//tests/core/cgo:generated_dylib_test"
   196      - "-//tests/core/cgo:versioned_dylib_client"
   197      - "-//tests/core/cgo:versioned_dylib_test"
   198      - "-//tests/core/cgo:generated_versioned_dylib_client"
   199      - "-//tests/core/cgo:generated_versioned_dylib_test"
   200      - "-//tests/core/cross:proto_test"
   201      - "-//tests/core/go_path:go_path"
   202      - "-//tests/core/go_path:go_path_test"
   203      - "-//tests/core/go_path:nodata_path"
   204      - "-//tests/core/go_path:copy_path"
   205      - "-//tests/core/go_path:archive_path"
   206      - "-//tests/core/go_path/pkg/lib:vendored"
   207      - "-//tests/core/go_path/pkg/lib:go_default_test"
   208      - "-//tests/core/go_path/pkg/lib:go_default_library"
   209      - "-//tests/core/go_path/pkg/lib:embed_test"
   210      - "-//tests/core/go_path/pkg/lib:embed_lib"
   211      - "-//tests/core/go_path/cmd/bin:cross"
   212      - "-//tests/core/go_path/cmd/bin:bin"
   213      - "-//tests/core/go_plugin:go_plugin"
   214      - "-//tests/core/go_plugin:go_default_test"
   215      - "-//tests/core/go_plugin:plugin"
   216      - "-//tests/core/go_plugin_with_proto_library:go_plugin_with_proto_library"
   217      - "-//tests/core/go_plugin_with_proto_library:go_default_test"
   218      - "-//tests/core/go_plugin_with_proto_library:plugin"
   219      - "-//tests/core/go_proto_library:all"
   220      - "-//tests/core/go_proto_library_importmap:foo_go_proto"
   221      - "-//tests/core/go_proto_library_importmap:foo_proto"
   222      - "-//tests/core/go_proto_library_importmap:importmap_test"
   223      - "-//tests/core/go_test:data_test"
   224      - "-//tests/core/go_test:pwd_test"
   225      - "-//tests/core/race:race_test"
   226      - "-//tests/core/stdlib:buildid_test"
   227      - "-//tests/examples/executable_name:executable_name"
   228      - "-//tests/integration/googleapis:color_service"
   229      - "-//tests/integration/googleapis:color_service_go_proto"
   230      - "-//tests/integration/googleapis:color_service_proto"
   231      - "-//tests/integration/googleapis:color_service_test"
   232      - "-//tests/legacy/examples/cgo/example_command:example_command_test"
   233      - "-//tests/legacy/examples/cgo/example_command:example_command_script"
   234      - "-//tests/legacy/examples/cgo/example_command:example_command"
   235      - "-//tests/legacy/examples/cgo:generate_go_src"
   236      - "-//tests/legacy/examples/cgo:cgo_lib_test"
   237      - "-//tests/legacy/examples/cgo:go_default_library"
   238      - "-//tests/legacy/examples/cgo/cc_dependency:version"
   239      - "-//tests/legacy/examples/cgo/cc_dependency:c_version_so"
   240      - "-//tests/legacy/examples/cgo:sub"
   241      - "-//tests/legacy/examples/proto/dep:useful_go_proto"
   242      - "-//tests/legacy/examples/proto/dep:useful_proto"
   243      - "-//tests/legacy/examples/proto/embed:embed_go_proto"
   244      - "-//tests/legacy/examples/proto/embed:embed_proto"
   245      - "-//tests/legacy/examples/proto/embed:go_default_library"
   246      - "-//tests/legacy/examples/proto:go_default_library"
   247      - "-//tests/legacy/examples/proto/gogo:gogo_test"
   248      - "-//tests/legacy/examples/proto/gogo:values_go_proto"
   249      - "-//tests/legacy/examples/proto/gogo:values_proto"
   250      - "-//tests/legacy/examples/proto/gostyle:gostyle_go_proto"
   251      - "-//tests/legacy/examples/proto/gostyle:gostyle_proto"
   252      - "-//tests/legacy/examples/proto/grpc:my_svc_go_proto"
   253      - "-//tests/legacy/examples/proto/grpc:my_svc_proto"
   254      - "-//tests/legacy/examples/proto/grpc:not_grpc"
   255      - "-//tests/legacy/examples/proto/grpc:test_grpc"
   256      - "-//tests/legacy/examples/proto/lib:lib_go_proto"
   257      - "-//tests/legacy/examples/proto/lib:lib_proto"
   258      - "-//tests/legacy/examples/proto:proto_pure_test"
   259      - "-//tests/legacy/examples/proto:proto_test"
   260      - "-//tests/legacy/extldflags_rpath:extldflags_rpath_test"
   261      - "-//tests/legacy/info:info"
   262      - "-//tests/legacy/proto_ignore_go_package_option:a_go_proto"
   263      - "-//tests/legacy/proto_ignore_go_package_option:a_proto"
   264      - "-//tests/legacy/proto_ignore_go_package_option:b_go_proto"
   265      - "-//tests/legacy/proto_ignore_go_package_option:b_proto"
   266      - "-//tests/legacy/test_chdir:go_default_test"
   267      - "-//tests/legacy/test_rundir:go_default_test"
   268      - "-//tests/legacy/transitive_data:go_default_test"
   269      - "-//tests/core/cross:darwin_go_cross_cgo"  # Doesn't work before bazel 6
   270      - "-//tests/core/cross:linux_go_cross_cgo"  # Doesn't work before bazel 6
   271      - "-//tests/core/cross:windows_go_cross_cgo"  # Doesn't work before bazel 6
   272    test_flags:
   273      - '--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'
   274      # On Windows CI, bazel (bazelisk) needs %LocalAppData% to find the cache directory.
   275      # We invoke bazel in tests, so the tests need this, too.
   276      - "--test_env=LOCALAPPDATA"
   277      # go_bazel_test runs bazel in a test workspace. It needs the same flags as above.
   278      - "--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"
   279      - "--test_env=PATH"
   280    test_targets:
   281      - "--"
   282      - "//..."
   283      - "-//go/tools/bazel:bazel_test"
   284      - "-@org_golang_x_crypto//ed25519:ed25519_test"
   285      - "-@org_golang_x_crypto//sha3:sha3_test"
   286      - "-@org_golang_x_net//ipv4:ipv4_test"
   287      - "-@org_golang_x_sys//windows/registry:registry_test"
   288      - "-@org_golang_x_sys//windows/svc/eventlog:eventlog_test"
   289      - "-@org_golang_x_sys//windows/svc:svc_test"
   290      - "-@org_golang_x_text//language:language_test"
   291      - "-@org_golang_x_tools//cmd/splitdwarf/internal/macho:macho_test"
   292      - "-@test_chdir_remote//sub:go_default_test"
   293      - "-//go/tools/builders:stdliblist_test" # fails on Windows due to #2491
   294      - "-//tests:buildifier_test" # requires bash
   295      - "-//tests/core/cgo:dylib_client"
   296      - "-//tests/core/cgo:dylib_test"
   297      - "-//tests/core/cgo:generated_dylib_client"
   298      - "-//tests/core/cgo:generated_dylib_test"
   299      - "-//tests/core/cgo:race_test" # fails on Windows due to upstream bug, see issue #2911
   300      - "-//tests/core/cgo:versioned_dylib_client"
   301      - "-//tests/core/cgo:versioned_dylib_test"
   302      - "-//tests/core/cgo:generated_versioned_dylib_client"
   303      - "-//tests/core/cgo:generated_versioned_dylib_test"
   304      - "-//tests/core/coverage:coverage_test"
   305      - "-//tests/core/coverage:issue3017_test"
   306      - "-//tests/core/cross:proto_test"
   307      - "-//tests/core/go_binary:go_default_test"
   308      - "-//tests/core/go_path:go_path"
   309      - "-//tests/core/go_path:go_path_test"
   310      - "-//tests/core/go_path/pkg/lib:embed_test"
   311      - "-//tests/core/go_path/pkg/lib:go_default_test"
   312      - "-//tests/core/go_plugin:go_plugin"
   313      - "-//tests/core/go_plugin:go_default_test"
   314      - "-//tests/core/go_plugin:plugin"
   315      - "-//tests/core/go_plugin_with_proto_library:go_plugin_with_proto_library"
   316      - "-//tests/core/go_plugin_with_proto_library:go_default_test"
   317      - "-//tests/core/go_plugin_with_proto_library:plugin"
   318      - "-//tests/core/go_proto_library:all"
   319      - "-//tests/core/go_proto_library_importmap:importmap_test"
   320      - "-//tests/core/go_test:data_test"
   321      - "-//tests/core/go_test:pwd_test"
   322      - "-//tests/core/nogo/coverage:coverage_cgo_test"
   323      - "-//tests/core/nogo/coverage:coverage_test"
   324      - "-//tests/core/nogo/coverage:gen_code_test"
   325      - "-//tests/core/race:race_test" # fails on Windows due to upstream bug, see issue #2911
   326      - "-//tests/core/stdlib:buildid_test"
   327      - "-//tests/examples/executable_name:executable_name"
   328      - "-//tests/integration/gazelle:gazelle_test" # exceeds command line length limit
   329      - "-//tests/integration/googleapis:color_service_test"
   330      - "-//tests/integration/reproducibility:reproducibility_test"
   331      - "-//tests/legacy/cgo_pthread_flag:go_default_test" # fails without error, passes locally. Problem with CI msys2?
   332      - "-//tests/legacy/examples/cgo/example_command:example_command_test"
   333      - "-//tests/legacy/examples/cgo/example_command:example_command_script"
   334      - "-//tests/legacy/examples/cgo/example_command:example_command"
   335      - "-//tests/legacy/examples/cgo:generate_go_src"
   336      - "-//tests/legacy/examples/cgo:cgo_lib_test"
   337      - "-//tests/legacy/examples/cgo:go_default_library"
   338      - "-//tests/legacy/examples/cgo/cc_dependency:version"
   339      - "-//tests/legacy/examples/cgo/cc_dependency:c_version_so"
   340      - "-//tests/legacy/examples/proto/gogo:gogo_test"
   341      - "-//tests/legacy/examples/proto:proto_pure_test"
   342      - "-//tests/legacy/examples/proto:proto_test"
   343      - "-//tests/legacy/extldflags_rpath:extldflags_rpath_test"
   344      - "-//tests/legacy/info:info"
   345      - "-//tests/legacy/test_chdir:go_default_test"
   346      - "-//tests/legacy/test_rundir:go_default_test"
   347      - "-//tests/legacy/transitive_data:go_default_test"
   348      # Stardoc produces different line-endings on windows,
   349      # so the documentation it generates doesn't match the checked in files.
   350      # - Tracking issue https://github.com/bazelbuild/stardoc/issues/42.
   351      - "-//docs:all"
   352  # The following configurations test a seperate WORKSPACE under the examples folder
   353  ubuntu2004_examples:
   354    name: Examples test on Ubuntu
   355    platform: ubuntu2004
   356    working_directory: examples/basic-gazelle
   357    build_flags:
   358      - "--config=incompatible"
   359    test_flags:
   360      - "--config=incompatible"
   361    build_targets:
   362      - "//..."
   363    test_targets:
   364      - "//..."
   365  macos_examples:
   366    name: Examples test on MacOS
   367    platform: macos
   368    working_directory: examples/basic-gazelle
   369    build_flags:
   370      - "--config=incompatible"
   371    test_flags:
   372      - "--config=incompatible"
   373    build_targets:
   374      - "//..."
   375    test_targets:
   376      - "//..."
   377  windows_examples:
   378    name: Examples test on Windows
   379    platform: windows
   380    working_directory: examples/basic-gazelle
   381    build_flags:
   382      - "--config=incompatible"
   383      # Go requires a C toolchain that accepts options and emits errors like
   384      # gcc or clang. The Go SDK does not support MSVC.
   385      - '--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'
   386    # NOTE(bazelbuild/bazel#10529): bazel doesn't register the mingw toolchain automatically.
   387    # We also need the host and target platforms to have the mingw constraint value.
   388    build_targets:
   389      - "//..."
   390    test_targets:
   391      - "//..."
   392    test_flags:
   393      - "--config=incompatible"
   394      - '--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'
   395      # On Windows CI, bazel (bazelisk) needs %LocalAppData% to find the cache directory.
   396      # We invoke bazel in tests, so the tests need this, too.
   397      - "--test_env=LOCALAPPDATA"
   398      # go_bazel_test runs bazel in a test workspace. It needs the same flags as above.
   399      - "--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"
   400      - "--test_env=PATH"

View as plain text