Skip to content

Commit

Permalink
Test with incompatible flags
Browse files Browse the repository at this point in the history
  • Loading branch information
fmeum committed Dec 27, 2023
1 parent f5a5c5d commit 2004cd9
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 3 deletions.
12 changes: 12 additions & 0 deletions .bazelci/presubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -164,3 +164,15 @@ tasks:
# which doesn't match the golden files generated on *nix.
- "-//tests:fix_mode_print0"
- "-//tests:fix_mode_strict"
incompatible:
platform: ubuntu2204
build_flags:
- "--config=incompatible"
build_targets:
- "..."
run_targets:
- "//:gazelle_ci"
test_flags:
- "--config=incompatible"
test_targets:
- "..."
9 changes: 9 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,12 @@ test:ci --test_strategy=standalone

common --lockfile_mode=update
test --test_output=errors

build:incompatible --incompatible_load_proto_rules_from_bzl
build:incompatible --incompatible_enable_cc_toolchain_resolution
build:incompatible --incompatible_config_setting_private_default_visibility
build:incompatible --incompatible_enforce_config_setting_visibility
build:incompatible --incompatible_disallow_empty_glob
build:incompatible --incompatible_disable_starlark_host_transitions
build:incompatible --nolegacy_external_runfiles
test:incompatible --test_env=GO_BAZEL_TEST_BAZELFLAGS='--incompatible_load_proto_rules_from_bzl --incompatible_enable_cc_toolchain_resolution --incompatible_config_setting_private_default_visibility --incompatible_enforce_config_setting_visibility --incompatible_disallow_empty_glob --incompatible_disable_starlark_host_transitions --nolegacy_external_runfiles'
7 changes: 4 additions & 3 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
name = "io_bazel_rules_go",
sha256 = "c8035e8ae248b56040a65ad3f0b7434712e2037e5dfdcebfe97576e620422709",
integrity = "sha256-C4AgoAugSPzSnRcEilR0x16TzYFuUcAnOhYRdYuB5fs=",
strip_prefix = "rules_go-32b8404911a3810f57b9be1077092729fb3fe8aa",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.44.0/rules_go-v0.44.0.zip",
"https://github.com/bazelbuild/rules_go/releases/download/v0.44.0/rules_go-v0.44.0.zip",
# TODO: Return to the next release.
"https://github.com/bazelbuild/rules_go/archive/32b8404911a3810f57b9be1077092729fb3fe8aa.tar.gz",
],
)

Expand Down

0 comments on commit 2004cd9

Please sign in to comment.