Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
25 changes: 23 additions & 2 deletions BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
load("@buildifier_prebuilt//:rules.bzl", "buildifier", "buildifier_test")
load("@pybind11_bazel//:build_defs.bzl", "pybind_extension")
load("@rules_cc//cc:defs.bzl", "cc_library", "cc_test")
load("@rules_gazebo//gazebo:headers.bzl", "gz_configure_header", "gz_export_header", "gz_include_header")
load("@rules_license//rules:license.bzl", "license")
load("@rules_python//python:py_library.bzl", "py_library")
Expand Down Expand Up @@ -140,10 +142,29 @@ py_test_sources = glob(
[
py_test(
name = src.replace("/", "_").replace(".py", "_py").replace("src_python_pybind11_test_", ""),
srcs = [src, "src/python_pybind11/test/numpy_helpers.py" ],
srcs = [
src,
"src/python_pybind11/test/numpy_helpers.py",
],
imports = ["src/python_pybind11/test/"],
main = src,
deps = [":python"],
imports = ["src/python_pybind11/test/"],
)
for src in py_test_sources
]

buildifier(
name = "buildifier.fix",
exclude_patterns = ["./.git/*"],
lint_mode = "fix",
mode = "fix",
)

buildifier_test(
name = "buildifier.test",
exclude_patterns = ["./.git/*"],
lint_mode = "warn",
mode = "diff",
no_sandbox = True,
workspace = "//:MODULE.bazel",
)
28 changes: 14 additions & 14 deletions MODULE.bazel
Original file line number Diff line number Diff line change
@@ -1,25 +1,17 @@
## MODULE.bazel
module(
name = "gz-math",
repo_name = "org_gazebosim_gz-math",
)

bazel_dep(name = "buildifier_prebuilt", version = "8.2.0.2")
bazel_dep(name = "googletest", version = "1.14.0")
bazel_dep(name = "rules_license", version = "1.0.0")
bazel_dep(name = "eigen", version = "3.4.0.bcr.3") # workaround for https://github.com/bazelbuild/bazel-central-registry/issues/4355
bazel_dep(name = "googletest", version = "1.14.0")
bazel_dep(name = "gz-utils", version = "4.0.0-pre1")
bazel_dep(name = "platforms", version = "0.0.11") # Required for `load("@pybind11_bazel//:build_defs.bzl", "pybind_extension")` in BUILD.bazel
bazel_dep(name = "pybind11_bazel", version = "2.13.6")
bazel_dep(name = "rules_python", version = "0.36.0")
bazel_dep(name = "platforms", version = "0.0.11")

# Gazebo Dependencies
bazel_dep(name = "rules_cc", version = "0.1.1")
bazel_dep(name = "rules_gazebo", version = "0.0.6")
bazel_dep(name = "gz-utils")
archive_override(
module_name = "gz-utils",
strip_prefix = "gz-utils-main",
urls = ["https://github.com/gazebosim/gz-utils/archive/refs/heads/main.tar.gz"],
)
bazel_dep(name = "rules_license", version = "1.0.0")
bazel_dep(name = "rules_python", version = "0.36.0")

PYTHON_VERSIONS = [
"3.9",
Expand All @@ -37,3 +29,11 @@ python = use_extension("@rules_python//python/extensions:python.bzl", "python")
)
for python_version in PYTHON_VERSIONS
]

# Override Gz deps to be pulled from the `main` branches so that CI uses deps
# from HEAD on `main`.
archive_override(
module_name = "gz-utils",
strip_prefix = "gz-utils-main",
urls = ["https://github.com/gazebosim/gz-utils/archive/refs/heads/main.tar.gz"],
)
1 change: 1 addition & 0 deletions eigen3/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
load("@rules_cc//cc:defs.bzl", "cc_library", "cc_test")
load("@rules_gazebo//gazebo:headers.bzl", "gz_include_header")
load("@rules_license//rules:license.bzl", "license")

Expand Down
1 change: 1 addition & 0 deletions examples/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
load("@rules_cc//cc:defs.bzl", "cc_binary")
load("@rules_license//rules:license.bzl", "license")
load("@rules_python//python:py_binary.bzl", "py_binary")

Expand Down
Loading