Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test basic-gazelle example with incompatible flags #3575

Merged
merged 2 commits into from
May 30, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 8 additions & 20 deletions .bazelci/presubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -332,8 +332,9 @@ tasks:
platform: ubuntu2004
working_directory: examples/basic-gazelle
build_flags:
- "--incompatible_config_setting_private_default_visibility"
- "--incompatible_enforce_config_setting_visibility"
- "--config=incompatible"
test_flags:
- "--config=incompatible"
fmeum marked this conversation as resolved.
Show resolved Hide resolved
build_targets:
- "//..."
test_targets:
Expand All @@ -343,8 +344,9 @@ tasks:
platform: macos
working_directory: examples/basic-gazelle
build_flags:
- "--incompatible_config_setting_private_default_visibility"
- "--incompatible_enforce_config_setting_visibility"
- "--config=incompatible"
test_flags:
- "--config=incompatible"
build_targets:
- "//..."
test_targets:
Expand All @@ -354,33 +356,19 @@ tasks:
platform: windows
working_directory: examples/basic-gazelle
build_flags:
- "--incompatible_config_setting_private_default_visibility"
- "--incompatible_enforce_config_setting_visibility"
- "--config=incompatible"
# Go requires a C toolchain that accepts options and emits errors like
# gcc or clang. The Go SDK does not support MSVC.
- "--cpu=x64_windows"
- "--compiler=mingw-gcc"
- '--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.
- "--extra_toolchains=@local_config_cc//:cc-toolchain-x64_windows_mingw"
- "--host_platform=@io_bazel_rules_go//go/toolchain:windows_amd64_cgo"
- "--platforms=@io_bazel_rules_go//go/toolchain:windows_amd64_cgo"
- "--incompatible_enable_cc_toolchain_resolution"
build_targets:
- "//..."
test_targets:
- "//..."
test_flags:
# Go requires a C toolchain that accepts options and emits errors like
# gcc or clang. The Go SDK does not support MSVC.
- "--cpu=x64_windows"
- "--compiler=mingw-gcc"
- "--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'
- "--extra_toolchains=@local_config_cc//:cc-toolchain-x64_windows_mingw"
- "--host_platform=@io_bazel_rules_go//go/toolchain:windows_amd64_cgo"
- "--platforms=@io_bazel_rules_go//go/toolchain:windows_amd64_cgo"
- "--incompatible_enable_cc_toolchain_resolution"
# 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"
Expand Down
1 change: 1 addition & 0 deletions examples/basic-gazelle/.bazelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import %workspace%/../../.bazelrc
6 changes: 3 additions & 3 deletions examples/basic-gazelle/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ http_archive(
# Download the bazel_gazelle ruleset.
http_archive(
name = "bazel_gazelle",
sha256 = "efbbba6ac1a4fd342d5122cbdfdb82aeb2cf2862e35022c752eaddffada7c3f3",
sha256 = "727f3e4edd96ea20c29e8c2ca9e8d2af724d8c7778e7923a854b2c80952bc405",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.27.0/bazel-gazelle-v0.27.0.tar.gz",
"https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.27.0/bazel-gazelle-v0.27.0.tar.gz",
"https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.30.0/bazel-gazelle-v0.30.0.tar.gz",
"https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.30.0/bazel-gazelle-v0.30.0.tar.gz",
],
)

Expand Down