From 07746695438762f49b3116ec95159146263955a3 Mon Sep 17 00:00:00 2001 From: James Sharpe Date: Fri, 10 Jan 2025 23:43:07 +0000 Subject: [PATCH] Fix ci for bazel 8.x --- .bazelci/config.yaml | 72 ++++++++++++------ .bazelversion | 1 - MODULE.bazel | 12 ++- REPO.bazel | 0 WORKSPACE.bzlmod | 10 --- docs/.bazelrc | 3 + docs/.bazelversion | 1 - docs/WORKSPACE.bazel | 84 +++++++++++++++++++++ examples/.bazelversion | 1 - examples/MODULE.bazel | 69 +++++++++++------ examples/WORKSPACE.bazel | 15 +++- examples/WORKSPACE.bzlmod | 35 --------- examples/cmake_crosstool/.bazelversion | 1 - examples/deps/deps_jvm_external.bzl | 4 + examples/third_party/.bazelversion | 1 - examples/third_party/gn/gn_repositories.bzl | 18 ++++- examples/third_party/gn/patch.gen_ninja.sh | 2 +- foreign_cc/built_tools/meson_build.bzl | 1 + test/detect_root_test/.bazelversion | 1 - test/detect_root_test/MODULE.bazel | 24 ++++++ test/standard_cxx_flags_test/.bazelversion | 1 - test/standard_cxx_flags_test/MODULE.bazel | 24 ++++++ 22 files changed, 271 insertions(+), 109 deletions(-) delete mode 100644 .bazelversion create mode 100644 REPO.bazel delete mode 100644 docs/.bazelversion delete mode 100644 examples/.bazelversion delete mode 100644 examples/cmake_crosstool/.bazelversion delete mode 100644 examples/third_party/.bazelversion delete mode 100644 test/detect_root_test/.bazelversion create mode 100644 test/detect_root_test/MODULE.bazel delete mode 100644 test/standard_cxx_flags_test/.bazelversion create mode 100644 test/standard_cxx_flags_test/MODULE.bazel diff --git a/.bazelci/config.yaml b/.bazelci/config.yaml index 0fc49c264..5801283cf 100644 --- a/.bazelci/config.yaml +++ b/.bazelci/config.yaml @@ -18,6 +18,12 @@ tasks: - "//..." test_targets: - "//..." + macos_arm64: + platform: macos_arm64 + build_targets: + - "//..." + test_targets: + - "//..." windows: platform: windows build_targets: @@ -35,6 +41,7 @@ tasks: - "--enable_workspace" ubuntu1804_examples_standalone: name: Examples (spawn_strategy=standalone) + bazel: "7.4.1" platform: ubuntu1804 working_directory: examples linux_targets: &linux_targets_standalone @@ -45,17 +52,16 @@ tasks: - "-c" - "dbg" - "--spawn_strategy=standalone" - - "--noenable_bzlmod" - "--enable_workspace" test_targets: *linux_targets_standalone test_flags: - "-c" - "dbg" - "--spawn_strategy=standalone" - - "--noenable_bzlmod" - "--enable_workspace" ubuntu2004_examples: name: Examples + bazel: "7.4.1" platform: ubuntu2004 working_directory: examples linux_targets: &linux_targets @@ -64,26 +70,12 @@ tasks: build_targets: *linux_targets test_targets: *linux_targets build_flags: - - "--noenable_bzlmod" - "--enable_workspace" test_flags: - - "--noenable_bzlmod" - "--enable_workspace" - ubuntu2004_examples_bzlmod: - name: Examples (bzlmod) - platform: ubuntu2004 - working_directory: examples - linux_targets: &linux_targets_bzlmod - - "//..." - - "//:third_party_examples_linux_tests" - # gives error '//external:databinding_annotation_processor': target 'databinding_annotation_processor' not declared in package 'external' defined by /workdir/examples/WORKSPACE.bazel (Tip: use `query "//external:*"` to see all the targets in that package) and referenced by '@bazel_tools//tools/android:databinding_annotation_processor' - - "-//cmake_android/..." - build_targets: *linux_targets_bzlmod - test_targets: *linux_targets_bzlmod - build_flags: - - "--enable_bzlmod" rbe_ubuntu2004_examples: name: Examples + bazel: "7.4.1" platform: rbe_ubuntu2004 working_directory: examples rbe_targets: &rbe_targets @@ -91,12 +83,15 @@ tasks: - "//:third_party_examples_linux_rbe_tests" # Gives error: zipalign: error while loading shared libraries: /usr/local/lib/libc++.so: file too short - "-//cmake_android/..." - # Python requirements not supported on Ubuntu 16.04 - - "-//:requirements_test" build_targets: *rbe_targets test_targets: *rbe_targets + build_flags: + - "--enable_workspace" + test_flags: + - "--enable_workspace" macos_examples_standalone: name: Examples (spawn_strategy=standalone) + bazel: "7.4.1" platform: macos working_directory: examples macos_targets: &macos_targets_standalone @@ -112,7 +107,6 @@ tasks: - "dbg" - "--spawn_strategy=standalone" - "--noincompatible_enable_cc_toolchain_resolution" - - "--noenable_bzlmod" - "--enable_workspace" test_targets: *macos_targets_standalone test_flags: @@ -120,10 +114,10 @@ tasks: - "dbg" - "--spawn_strategy=standalone" - "--noincompatible_enable_cc_toolchain_resolution" - - "--noenable_bzlmod" - "--enable_workspace" macos_examples: name: Examples + bazel: "7.4.1" platform: macos working_directory: examples macos_targets: &macos_targets @@ -136,15 +130,14 @@ tasks: build_targets: *macos_targets build_flags: - "--noincompatible_enable_cc_toolchain_resolution" - - "--noenable_bzlmod" - "--enable_workspace" test_targets: *macos_targets test_flags: - "--noincompatible_enable_cc_toolchain_resolution" - - "--noenable_bzlmod" - "--enable_workspace" windows_examples: name: Examples + bazel: "7.4.1" platform: windows working_directory: examples windows_targets: &windows_targets @@ -196,6 +189,12 @@ tasks: working_directory: test/standard_cxx_flags_test test_targets: - "//:flags_test" + macos_arm64_flags: + name: Flags (arm64) + platform: macos_arm64 + working_directory: test/standard_cxx_flags_test + test_targets: + - "//:flags_test" windows_flags: name: Flags platform: windows @@ -208,26 +207,53 @@ tasks: working_directory: test/detect_root_test test_targets: - "//:tests" + build_flags: + - "--enable_workspace" + test_flags: + - "--enable_workspace" ubuntu2004_detect_root: name: Detect root platform: ubuntu2004 working_directory: test/detect_root_test test_targets: - "//:tests" + build_flags: + - "--enable_workspace" + test_flags: + - "--enable_workspace" macos_detect_root: name: Detect root platform: macos working_directory: test/detect_root_test test_targets: - "//:tests" + build_flags: + - "--enable_workspace" + test_flags: + - "--enable_workspace" + macos_arm64_detect_root: + name: Detect root (arm64) + platform: macos_arm64 + working_directory: test/detect_root_test + test_targets: + - "//:tests" + build_flags: + - "--enable_workspace" + test_flags: + - "--enable_workspace" windows_detect_root: name: Detect root platform: windows working_directory: test/detect_root_test test_targets: - "//:tests" + build_flags: + - "--enable_workspace" + test_flags: + - "--enable_workspace" docs_linux: name: Docs + bazel: "7.4.1" platform: ubuntu2004 working_directory: docs build_targets: diff --git a/.bazelversion b/.bazelversion deleted file mode 100644 index 815da58b7..000000000 --- a/.bazelversion +++ /dev/null @@ -1 +0,0 @@ -7.4.1 diff --git a/MODULE.bazel b/MODULE.bazel index 3c1dbe96d..5bb5ecf05 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -7,7 +7,7 @@ module( ) bazel_dep(name = "bazel_features", version = "1.15.0") -bazel_dep(name = "bazel_skylib", version = "1.3.0") +bazel_dep(name = "bazel_skylib", version = "1.7.1") bazel_dep(name = "platforms", version = "0.0.5") bazel_dep(name = "rules_cc", version = "0.0.17") bazel_dep(name = "rules_python", version = "1.1.0-rc0") @@ -22,6 +22,16 @@ bazel_dep(name = "bazel_skylib_gazelle_plugin", version = "1.7.1", dev_dependenc bazel_dep(name = "stardoc", version = "0.5.6", dev_dependency = True, repo_name = "io_bazel_stardoc") bazel_dep(name = "bazel_ci_rules", version = "1.0.0", dev_dependency = True) +rbe_preconfig = use_repo_rule( + "@bazel_ci_rules//:rbe_repo.bzl", + "rbe_preconfig", +) + +rbe_preconfig( + name = "buildkite_config", + toolchain = "ubuntu2004", +) + python = use_extension("@rules_python//python/extensions:python.bzl", "python") python.toolchain(python_version = "3.12") use_repo(python, "python_3_12") diff --git a/REPO.bazel b/REPO.bazel new file mode 100644 index 000000000..e69de29bb diff --git a/WORKSPACE.bzlmod b/WORKSPACE.bzlmod index ea64da343..3712534de 100644 --- a/WORKSPACE.bzlmod +++ b/WORKSPACE.bzlmod @@ -1,11 +1 @@ workspace(name = "rules_foreign_cc") - -load("@bazel_ci_rules//:rbe_repo.bzl", "rbe_preconfig") - -# Creates a default toolchain config for RBE. -# Use this as is if you are using the rbe_ubuntu16_04 container, -# otherwise refer to RBE docs. -rbe_preconfig( - name = "buildkite_config", - toolchain = "ubuntu1804-bazel-java11", -) diff --git a/docs/.bazelrc b/docs/.bazelrc index 2158111ce..281432966 100644 --- a/docs/.bazelrc +++ b/docs/.bazelrc @@ -2,3 +2,6 @@ # https://github.com/bazelbuild/stardoc/issues/112 common --incompatible_allow_tags_propagation + +common --noenable_bzlmod +common --enable_workspace diff --git a/docs/.bazelversion b/docs/.bazelversion deleted file mode 100644 index 815da58b7..000000000 --- a/docs/.bazelversion +++ /dev/null @@ -1 +0,0 @@ -7.4.1 diff --git a/docs/WORKSPACE.bazel b/docs/WORKSPACE.bazel index 49225a871..4f84940a5 100644 --- a/docs/WORKSPACE.bazel +++ b/docs/WORKSPACE.bazel @@ -1 +1,85 @@ workspace(name = "rules_foreign_cc_docs") + +local_repository( + name = "rules_foreign_cc", + path = "..", +) + +load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") + +http_archive( + name = "bazel_skylib", + sha256 = "bc283cdfcd526a52c3201279cda4bc298652efa898b10b4db0837dc51652756f", + urls = [ + "https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.7.1/bazel-skylib-1.7.1.tar.gz", + "https://github.com/bazelbuild/bazel-skylib/releases/download/1.7.1/bazel-skylib-1.7.1.tar.gz", + ], +) + +http_archive( + name = "rules_java", + sha256 = "6d8c6d5cd86fed031ee48424f238fa35f33abc9921fd97dd4ae1119a29fc807f", + urls = [ + "https://github.com/bazelbuild/rules_java/releases/download/8.6.3/rules_java-8.6.3.tar.gz", + ], +) + +load("@rules_java//java:rules_java_deps.bzl", "rules_java_dependencies") + +rules_java_dependencies() + +load("@rules_foreign_cc//foreign_cc:repositories.bzl", "rules_foreign_cc_dependencies") + +rules_foreign_cc_dependencies() + +load("@bazel_features//:deps.bzl", "bazel_features_deps") + +bazel_features_deps() + +load("//:stardoc_repository.bzl", "stardoc_repository") + +stardoc_repository() + +load("//:stardoc_deps.bzl", "stardoc_deps") + +stardoc_deps() + +load("@rules_python//python:repositories.bzl", "py_repositories") + +py_repositories() + +# register toolchains +load("@rules_java//java:repositories.bzl", "rules_java_toolchains") + +rules_java_toolchains() + +# Gazelle dependencies + +http_archive( + name = "bazel_gazelle", + sha256 = "b7387f72efb59f876e4daae42f1d3912d0d45563eac7cb23d1de0b094ab588cf", + urls = [ + "https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.34.0/bazel-gazelle-v0.34.0.tar.gz", + "https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.34.0/bazel-gazelle-v0.34.0.tar.gz", + ], +) + +http_archive( + name = "bazel_skylib_gazelle_plugin", + sha256 = "747addf3f508186234f6232674dd7786743efb8c68619aece5fb0cac97b8f415", + urls = [ + "https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.5.0/bazel-skylib-gazelle-plugin-1.5.0.tar.gz", + "https://github.com/bazelbuild/bazel-skylib/releases/download/1.5.0/bazel-skylib-gazelle-plugin-1.5.0.tar.gz", + ], +) + +load("@bazel_skylib_gazelle_plugin//:workspace.bzl", "bazel_skylib_gazelle_plugin_workspace") + +bazel_skylib_gazelle_plugin_workspace() + +load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies") +load("@bazel_skylib_gazelle_plugin//:setup.bzl", "bazel_skylib_gazelle_plugin_setup") + +bazel_skylib_gazelle_plugin_setup() + +gazelle_dependencies(go_repository_default_config = "//:WORKSPACE.bazel") diff --git a/examples/.bazelversion b/examples/.bazelversion deleted file mode 100644 index 815da58b7..000000000 --- a/examples/.bazelversion +++ /dev/null @@ -1 +0,0 @@ -7.4.1 diff --git a/examples/MODULE.bazel b/examples/MODULE.bazel index 92f32916b..b0c3caa6c 100644 --- a/examples/MODULE.bazel +++ b/examples/MODULE.bazel @@ -1,4 +1,4 @@ -bazel_dep(name = "rules_foreign_cc", version = "0.0.0") +bazel_dep(name = "rules_foreign_cc") local_path_override( module_name = "rules_foreign_cc", path = "..", @@ -12,14 +12,20 @@ use_repo( "meson_src", ) -bazel_dep(name = "platforms", version = "0.0.6") +bazel_dep(name = "platforms", version = "0.0.10") +bazel_dep(name = "bazel_skylib", version = "1.7.1") bazel_dep(name = "rules_rust", version = "0.56.0") -bazel_dep(name = "rules_swift", version = "1.6.0", repo_name = "build_bazel_rules_swift") -bazel_dep(name = "rules_apple", version = "3.4.0", repo_name = "build_bazel_rules_apple") -bazel_dep(name = "apple_support", version = "1.12.0", repo_name = "build_bazel_apple_support") -bazel_dep(name = "rules_python", version = "0.23.0") -bazel_dep(name = "rules_cc", version = "0.0.9") +bazel_dep(name = "rules_swift", version = "2.1.1", repo_name = "build_bazel_rules_swift") +bazel_dep(name = "rules_apple", version = "3.16.1", repo_name = "build_bazel_rules_apple") +bazel_dep(name = "apple_support", version = "1.17.1", repo_name = "build_bazel_apple_support") +bazel_dep(name = "rules_python", version = "1.0.0") +bazel_dep(name = "rules_cc", version = "0.0.16") bazel_dep(name = "rules_shell", version = "0.3.0") +bazel_dep(name = "rules_java", version = "8.6.3") +bazel_dep(name = "rules_perl", version = "0.2.4") + +apple_cc_configure = use_extension("@build_bazel_apple_support//crosstool:setup.bzl", "apple_cc_configure_extension") +use_repo(apple_cc_configure, "local_config_apple_cc") python = use_extension("@rules_python//python/extensions:python.bzl", "python") python.toolchain( @@ -37,6 +43,37 @@ pip.parse( ) use_repo(pip, "pip") +bazel_dep(name = "rules_android", version = "0.6.0") +bazel_dep(name = "rules_android_ndk", version = "0.1.2") +bazel_dep(name = "rules_jvm_external", version = "6.6") + +maven = use_extension("@rules_jvm_external//:extensions.bzl", "maven") +maven.install( + name = "maven", + artifacts = [ + "com.android.support.constraint:constraint-layout:aar:1.1.2", + "com.android.support:appcompat-v7:aar:26.1.0", + ], + repositories = [ + "https://jcenter.bintray.com/", + "https://maven.google.com", + "https://repo1.maven.org/maven2", + ], +) +use_repo(maven, "maven") + +bazel_dep(name = "bazel_ci_rules", version = "1.0.0", dev_dependency = True) + +rbe_preconfig = use_repo_rule( + "@bazel_ci_rules//:rbe_repo.bzl", + "rbe_preconfig", +) + +rbe_preconfig( + name = "buildkite_config", + toolchain = "ubuntu2004", +) + # https://bazelbuild.github.io/rules_rust/crate_universe_bzlmod.html rust_example = use_extension("@rules_rust//crate_universe:extensions.bzl", "crate") @@ -65,21 +102,3 @@ use_repo( rust_example, "rust_example", ) - -# bazel_dep(name = "rules_android", version = "0.1.1") -# bazel_dep(name = "rules_jvm_external", version = "5.1") -# -# maven = use_extension("@rules_jvm_external//:extensions.bzl", "maven") -# -# maven.install( -# name = "maven_deps", -# artifacts = [ -# "com.android.support.constraint:constraint-layout:aar:1.1.2", -# "com.android.support:appcompat-v7:aar:26.1.0", -# ], -# repositories = [ -# "https://jcenter.bintray.com/", -# "https://maven.google.com", -# "https://repo1.maven.org/maven2", -# ], -# ) diff --git a/examples/WORKSPACE.bazel b/examples/WORKSPACE.bazel index e47cec2c1..15b576dd5 100644 --- a/examples/WORKSPACE.bazel +++ b/examples/WORKSPACE.bazel @@ -13,6 +13,17 @@ load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace") bazel_skylib_workspace() +load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") +load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") + +maybe( + http_archive, + name = "rules_cc", + sha256 = "abc605dd850f813bb37004b77db20106a19311a96b2da1c92b789da529d28fe1", + strip_prefix = "rules_cc-0.0.17", + urls = ["https://github.com/bazelbuild/rules_cc/releases/download/0.0.17/rules_cc-0.0.17.tar.gz"], +) + load("//deps:repositories.bzl", "repositories") repositories() @@ -63,8 +74,6 @@ load("@rules_foreign_cc_examples_third_party//:setup.bzl", examples_third_party_ examples_third_party_setup() -load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") - http_archive( name = "bazelci_rules", sha256 = "eca21884e6f66a88c358e580fd67a6b148d30ab57b1680f62a96c00f9bc6a07e", @@ -122,8 +131,6 @@ load( apple_support_dependencies() -load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") - maybe( http_archive, name = "rules_rust", diff --git a/examples/WORKSPACE.bzlmod b/examples/WORKSPACE.bzlmod index 6cdd67680..8325f2c58 100644 --- a/examples/WORKSPACE.bzlmod +++ b/examples/WORKSPACE.bzlmod @@ -1,17 +1,5 @@ workspace(name = "rules_foreign_cc_examples") -load("//deps:repositories.bzl", "repositories") - -repositories() - -load("//deps:deps_android.bzl", "deps_android") - -deps_android() - -load("//deps:deps_jvm_external.bzl", "deps_jvm_external") - -deps_jvm_external() - local_repository( name = "rules_foreign_cc_examples_third_party", path = "third_party", @@ -20,26 +8,3 @@ local_repository( load("@rules_foreign_cc_examples_third_party//:repositories.bzl", examples_third_party_repositories = "repositories") examples_third_party_repositories() - -load("@rules_foreign_cc_examples_third_party//:setup.bzl", examples_third_party_setup = "setup") - -examples_third_party_setup() - -load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") - -http_archive( - name = "bazelci_rules", - sha256 = "eca21884e6f66a88c358e580fd67a6b148d30ab57b1680f62a96c00f9bc6a07e", - strip_prefix = "bazelci_rules-1.0.0", - url = "https://github.com/bazelbuild/continuous-integration/releases/download/rules-1.0.0/bazelci_rules-1.0.0.tar.gz", -) - -load("@bazelci_rules//:rbe_repo.bzl", "rbe_preconfig") - -# Creates a default toolchain config for RBE. -# Use this as is if you are using the rbe_ubuntu16_04 container, -# otherwise refer to RBE docs. -rbe_preconfig( - name = "buildkite_config", - toolchain = "ubuntu1804-bazel-java11", -) diff --git a/examples/cmake_crosstool/.bazelversion b/examples/cmake_crosstool/.bazelversion deleted file mode 100644 index 815da58b7..000000000 --- a/examples/cmake_crosstool/.bazelversion +++ /dev/null @@ -1 +0,0 @@ -7.4.1 diff --git a/examples/deps/deps_jvm_external.bzl b/examples/deps/deps_jvm_external.bzl index 2284e2827..3a15e8e4e 100644 --- a/examples/deps/deps_jvm_external.bzl +++ b/examples/deps/deps_jvm_external.bzl @@ -1,5 +1,8 @@ """A module for bringing in transitive dependencies of rules_jvm_external""" +# note that the following line is what is minimally required from protobuf for the java rules +# consider using the protobuf_deps() public API from @com_google_protobuf//:protobuf_deps.bzl +load("@com_google_protobuf//bazel/private:proto_bazel_features.bzl", "proto_bazel_features") # buildifier: disable=bzl-visibility load("@rules_jvm_external//:defs.bzl", "maven_install") def deps_jvm_external(): @@ -14,3 +17,4 @@ def deps_jvm_external(): "https://repo1.maven.org/maven2", ], ) + proto_bazel_features(name = "proto_bazel_features") diff --git a/examples/third_party/.bazelversion b/examples/third_party/.bazelversion deleted file mode 100644 index 815da58b7..000000000 --- a/examples/third_party/.bazelversion +++ /dev/null @@ -1 +0,0 @@ -7.4.1 diff --git a/examples/third_party/gn/gn_repositories.bzl b/examples/third_party/gn/gn_repositories.bzl index b53a9e23c..9757b54a9 100644 --- a/examples/third_party/gn/gn_repositories.bzl +++ b/examples/third_party/gn/gn_repositories.bzl @@ -9,9 +9,21 @@ def gn_repositories(): name = "gn", build_file = Label("//gn:BUILD.gn.bazel"), commit = "dfcbc6fed0a8352696f92d67ccad54048ad182b3", - patch_args = [], - patch_tool = "bash", - patches = [Label("//gn:patch.gen_ninja.sh")], + patch_cmds = [ + "python3 build/gen.py --no-last-commit-position", + "cat > out/last_commit_position.h <> out/last_commit_position.h +echo "// Generated by @rules_foreign_cc_examples_third_party//gn:patch.gen_ninja.sh" > out/last_commit_position.h echo "" >> out/last_commit_position.h echo "#ifndef OUT_LAST_COMMIT_POSITION_H_" >> out/last_commit_position.h echo "#define OUT_LAST_COMMIT_POSITION_H_" >> out/last_commit_position.h diff --git a/foreign_cc/built_tools/meson_build.bzl b/foreign_cc/built_tools/meson_build.bzl index 81db0f54c..4820067cb 100644 --- a/foreign_cc/built_tools/meson_build.bzl +++ b/foreign_cc/built_tools/meson_build.bzl @@ -12,6 +12,7 @@ def meson_tool(name, main, data, requirements = [], **kwargs): srcs = [main], data = data, deps = requirements, + precompile = precompile, python_version = "PY3", main = main, **kwargs diff --git a/test/detect_root_test/.bazelversion b/test/detect_root_test/.bazelversion deleted file mode 100644 index 815da58b7..000000000 --- a/test/detect_root_test/.bazelversion +++ /dev/null @@ -1 +0,0 @@ -7.4.1 diff --git a/test/detect_root_test/MODULE.bazel b/test/detect_root_test/MODULE.bazel new file mode 100644 index 000000000..9fe1699ae --- /dev/null +++ b/test/detect_root_test/MODULE.bazel @@ -0,0 +1,24 @@ +bazel_dep(name = "bazel_skylib", version = "1.7.1") +bazel_dep(name = "rules_foreign_cc") +local_path_override( + module_name = "rules_foreign_cc", + path = "../..", +) + +bazel_dep(name = "platforms", version = "0.0.5") + +bazel_dep(name = "bazel_ci_rules", version = "1.0.0", dev_dependency = True) + +# note that this dev_dependency is only needed because bazel_ci_rules +# depends on it. If you are not using bazel_ci_rules; ideally we'd be able to remove this. +bazel_dep(name = "rules_cc", version = "0.0.9", dev_dependency = True) + +rbe_preconfig = use_repo_rule( + "@bazel_ci_rules//:rbe_repo.bzl", + "rbe_preconfig", +) + +rbe_preconfig( + name = "buildkite_config", + toolchain = "ubuntu2004", +) diff --git a/test/standard_cxx_flags_test/.bazelversion b/test/standard_cxx_flags_test/.bazelversion deleted file mode 100644 index 815da58b7..000000000 --- a/test/standard_cxx_flags_test/.bazelversion +++ /dev/null @@ -1 +0,0 @@ -7.4.1 diff --git a/test/standard_cxx_flags_test/MODULE.bazel b/test/standard_cxx_flags_test/MODULE.bazel new file mode 100644 index 000000000..9fe1699ae --- /dev/null +++ b/test/standard_cxx_flags_test/MODULE.bazel @@ -0,0 +1,24 @@ +bazel_dep(name = "bazel_skylib", version = "1.7.1") +bazel_dep(name = "rules_foreign_cc") +local_path_override( + module_name = "rules_foreign_cc", + path = "../..", +) + +bazel_dep(name = "platforms", version = "0.0.5") + +bazel_dep(name = "bazel_ci_rules", version = "1.0.0", dev_dependency = True) + +# note that this dev_dependency is only needed because bazel_ci_rules +# depends on it. If you are not using bazel_ci_rules; ideally we'd be able to remove this. +bazel_dep(name = "rules_cc", version = "0.0.9", dev_dependency = True) + +rbe_preconfig = use_repo_rule( + "@bazel_ci_rules//:rbe_repo.bzl", + "rbe_preconfig", +) + +rbe_preconfig( + name = "buildkite_config", + toolchain = "ubuntu2004", +)