From 8ded5cdcde9f9ae8de0aa9f8c7fa337ac417f7b8 Mon Sep 17 00:00:00 2001 From: Ezekiel Warren Date: Thu, 7 Sep 2023 18:53:28 -0700 Subject: [PATCH] feat: initial bzlmod support --- .bazelrc | 10 ++++++++++ .github/workflows/bzlmod-archive.yml | 12 ++++++++++++ .gitignore | 6 ++++++ BUILD.bazel | 29 ++++++++++++++++++++++++++++ MODULE.bazel | 22 +++++++++++++++++++++ WORKSPACE.bazel | 1 + 6 files changed, 80 insertions(+) create mode 100644 .bazelrc create mode 100644 .github/workflows/bzlmod-archive.yml create mode 100644 .gitignore create mode 100644 BUILD.bazel create mode 100644 MODULE.bazel create mode 100644 WORKSPACE.bazel diff --git a/.bazelrc b/.bazelrc new file mode 100644 index 0000000..dd6962b --- /dev/null +++ b/.bazelrc @@ -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 diff --git a/.github/workflows/bzlmod-archive.yml b/.github/workflows/bzlmod-archive.yml new file mode 100644 index 0000000..d1823b6 --- /dev/null +++ b/.github/workflows/bzlmod-archive.yml @@ -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 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b0f4929 --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ + +/bazel-* +/external +/.cache +/compile_commands.json +user.bazelrc diff --git a/BUILD.bazel b/BUILD.bazel new file mode 100644 index 0000000..fd1f83f --- /dev/null +++ b/BUILD.bazel @@ -0,0 +1,29 @@ +load("@rules_cc//cc:defs.bzl", "cc_library") + +package(default_visibility = ["//visibility:public"]) + +cc_library( + name = "boost.icl", + hdrs = glob([ + "include/**/*.hpp", + "include/**/*.h", + ]), + includes = ["include"], + deps = [ + "@boost.assert", + "@boost.concept_check", + "@boost.config", + "@boost.container", + "@boost.core", + "@boost.date_time", + "@boost.detail", + "@boost.iterator", + "@boost.move", + "@boost.mpl", + "@boost.range", + "@boost.rational", + "@boost.static_assert", + "@boost.type_traits", + "@boost.utility", + ], +) diff --git a/MODULE.bazel b/MODULE.bazel new file mode 100644 index 0000000..d72d166 --- /dev/null +++ b/MODULE.bazel @@ -0,0 +1,22 @@ +module( + name = "boost.icl", + version = "1.83.0.bzl.1", + compatibility_level = 108300, +) + +bazel_dep(name = "rules_cc", version = "0.0.8") +bazel_dep(name = "boost.assert", version = "1.83.0.bzl.1") +bazel_dep(name = "boost.concept_check", version = "1.83.0.bzl.1") +bazel_dep(name = "boost.config", version = "1.83.0.bzl.6") +bazel_dep(name = "boost.container", version = "1.83.0.bzl.1") +bazel_dep(name = "boost.core", version = "1.83.0.bzl.1") +bazel_dep(name = "boost.date_time", version = "1.83.0.bzl.1") +bazel_dep(name = "boost.detail", version = "1.83.0.bzl.1") +bazel_dep(name = "boost.iterator", version = "1.83.0.bzl.1") +bazel_dep(name = "boost.move", version = "1.83.0.bzl.1") +bazel_dep(name = "boost.mpl", version = "1.83.0.bzl.1") +bazel_dep(name = "boost.range", version = "1.83.0.bzl.1") +bazel_dep(name = "boost.rational", version = "1.83.0.bzl.1") +bazel_dep(name = "boost.static_assert", version = "1.83.0.bzl.1") +bazel_dep(name = "boost.type_traits", version = "1.83.0.bzl.1") +bazel_dep(name = "boost.utility", version = "1.83.0.bzl.1") diff --git a/WORKSPACE.bazel b/WORKSPACE.bazel new file mode 100644 index 0000000..be0754f --- /dev/null +++ b/WORKSPACE.bazel @@ -0,0 +1 @@ +# SEE: MODULE.bazel