mirror of
https://github.com/google/benchmark.git
synced 2024-11-29 00:34:42 +00:00
bc946b919c
It is now possible to build Mac wheels on native machines in Github Actions, so ARM64 Mac wheels are now built and tested on M1 machines. Also, the artifact up-/download was migrated to v4, which made it necessary to upload wheels to unique artifact names, and then later stitch them together again in a subsequent job. The cross-platform Mac build injection in setup.py was removed, since it is no longer necessary. I relanded a monkey-patching of Bazel build files, this time for MODULE.bazel. This is because `rules_python` does not allow running as the root user, which is the case in cibuildwheel+Linux (happens in a Docker container). Since I did not see a quick way of switching to rootless containers, and did not want to hardcode the config change (it can apparently cause cache misses and build failures), I inject the "ignore_root_user_error" flag into the MODULE.bazel file when running in cibuildwheel on Linux.
42 lines
1.4 KiB
Plaintext
42 lines
1.4 KiB
Plaintext
module(
|
|
name = "google_benchmark",
|
|
version = "1.8.3",
|
|
)
|
|
|
|
bazel_dep(name = "bazel_skylib", version = "1.5.0")
|
|
bazel_dep(name = "platforms", version = "0.0.8")
|
|
bazel_dep(name = "rules_foreign_cc", version = "0.10.1")
|
|
bazel_dep(name = "rules_cc", version = "0.0.9")
|
|
|
|
bazel_dep(name = "rules_python", version = "0.31.0", dev_dependency = True)
|
|
bazel_dep(name = "googletest", version = "1.12.1", dev_dependency = True, repo_name = "com_google_googletest")
|
|
|
|
bazel_dep(name = "libpfm", version = "4.11.0")
|
|
|
|
# Register a toolchain for Python 3.9 to be able to build numpy. Python
|
|
# versions >=3.10 are problematic.
|
|
# A second reason for this is to be able to build Python hermetically instead
|
|
# of relying on the changing default version from rules_python.
|
|
|
|
python = use_extension("@rules_python//python/extensions:python.bzl", "python", dev_dependency = True)
|
|
python.toolchain(python_version = "3.8")
|
|
python.toolchain(python_version = "3.9")
|
|
python.toolchain(python_version = "3.10")
|
|
python.toolchain(python_version = "3.11")
|
|
python.toolchain(
|
|
is_default = True,
|
|
python_version = "3.12",
|
|
)
|
|
|
|
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip", dev_dependency = True)
|
|
pip.parse(
|
|
hub_name = "tools_pip_deps",
|
|
python_version = "3.9",
|
|
requirements_lock = "//tools:requirements.txt",
|
|
)
|
|
use_repo(pip, "tools_pip_deps")
|
|
|
|
# -- bazel_dep definitions -- #
|
|
|
|
bazel_dep(name = "nanobind_bazel", version = "1.0.0", dev_dependency = True)
|