Skip to content

Commit

Permalink
feat: initial bzlmod support
Browse files Browse the repository at this point in the history
  • Loading branch information
zaucy committed Sep 8, 2023
1 parent 354a160 commit c7e71a0
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

common --enable_bzlmod
build --incompatible_use_platforms_repo_for_constraints
build --incompatible_enable_cc_toolchain_resolution
build --incompatible_strict_action_env
build --enable_runfiles
build --registry=https://raw.githubusercontent.com/bazelboost/registry/main
build --registry=https://bcr.bazel.build

try-import %workspace%/user.bazelrc
12 changes: 12 additions & 0 deletions .github/workflows/bzlmod-archive.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Bzlmod Archive

on:
release:
types: [published]

jobs:
bzlmod-archive:
uses: bazelboost/registry/.github/workflows/bzlmod-archive.yml@main
secrets: inherit
permissions:
contents: write
21 changes: 21 additions & 0 deletions BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
load("@rules_cc//cc:defs.bzl", "cc_library")

package(default_visibility = ["//visibility:public"])

cc_library(
name = "boost.histogram",
hdrs = glob([
"include/**/*.hpp",
"include/**/*.h",
]),
includes = ["include"],
deps = [
"@boost.config",
"@boost.core",
"@boost.math",
"@boost.mp11",
"@boost.serialization",
"@boost.throw_exception",
"@boost.variant2",
],
)
14 changes: 14 additions & 0 deletions MODULE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
module(
name = "boost.histogram",
version = "1.83.0.bzl.1",
compatibility_level = 108300,
)

bazel_dep(name = "rules_cc", version = "0.0.8")
bazel_dep(name = "boost.config", version = "1.83.0.bzl.6")
bazel_dep(name = "boost.core", version = "1.83.0.bzl.1")
bazel_dep(name = "boost.math", version = "1.83.0.bzl.1")
bazel_dep(name = "boost.mp11", version = "1.83.0.bzl.1")
bazel_dep(name = "boost.serialization", version = "1.83.0.bzl.1")
bazel_dep(name = "boost.throw_exception", version = "1.83.0.bzl.1")
bazel_dep(name = "boost.variant2", version = "1.83.0.bzl.1")
1 change: 1 addition & 0 deletions WORKSPACE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# SEE: MODULE.bazel

0 comments on commit c7e71a0

Please sign in to comment.