Skip to content

Commit

Permalink
Merge branch 'bazelbuild:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
HoloRin authored Sep 18, 2023
2 parents 089a929 + c415999 commit 0fa7cbe
Show file tree
Hide file tree
Showing 51 changed files with 1,103 additions and 8 deletions.
6 changes: 6 additions & 0 deletions modules/glog/0.6.0/MODULE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module(
name = "glog",
version = "0.6.0",
compatibility_level = 1,
)
bazel_dep(name = "gflags", version = "2.2.2", repo_name = "com_github_gflags_gflags")
9 changes: 9 additions & 0 deletions modules/glog/0.6.0/patches/module_dot_bazel.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
--- a/MODULE.bazel
+++ a/MODULE.bazel
@@ -0,0 +1,6 @@
+module(
+ name = "glog",
+ version = "0.6.0",
+ compatibility_level = 1,
+)
+bazel_dep(name = "gflags", version = "2.2.2", repo_name = "com_github_gflags_gflags")
13 changes: 13 additions & 0 deletions modules/glog/0.6.0/patches/remove_only_the_first_leading_at.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/bazel/glog.bzl b/bazel/glog.bzl
index 40833b4..bcbdc8a 100644
--- a/bazel/glog.bzl
+++ b/bazel/glog.bzl
@@ -33,7 +33,7 @@ def dict_union(x, y):

def glog_library(namespace = "google", with_gflags = 1, **kwargs):
if native.repository_name() != "@":
- repo_name = native.repository_name().lstrip("@")
+ repo_name = native.repository_name()[1:] # Strip the first leading @
gendir = "$(GENDIR)/external/" + repo_name
src_windows = "external/%s/src/windows" % repo_name
else:
16 changes: 16 additions & 0 deletions modules/glog/0.6.0/presubmit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
platforms:
centos7:
build_targets:
- '@glog//:glog'
debian10:
build_targets:
- '@glog//:glog'
macos:
build_targets:
- '@glog//:glog'
ubuntu2004:
build_targets:
- '@glog//:glog'
windows:
build_targets:
- '@glog//:glog'
10 changes: 10 additions & 0 deletions modules/glog/0.6.0/source.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"integrity": "sha256-ioO/mC83u3CCXfcalwn6kOqfREf7PAmeHXIKQ52IutY=",
"patch_strip": 1,
"patches": {
"remove_only_the_first_leading_at.patch": "sha256-ieceuBwB5MiGzs1ES3FKKLTCuHwxxERo2clZn5h8S3g=",
"module_dot_bazel.patch": "sha256-lk2dSaMpmon+fNEP5KJeeXqkbsXYvRAcePQGwVMt2wg="
},
"strip_prefix": "glog-0.6.0",
"url": "https://github.com/google/glog/archive/refs/tags/v0.6.0.tar.gz"
}
3 changes: 2 additions & 1 deletion modules/glog/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"github:google/glog"
],
"versions": [
"0.5.0"
"0.5.0",
"0.6.0"
],
"yanked_versions": {}
}
5 changes: 5 additions & 0 deletions modules/libdeflate/1.19/MODULE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module(
name = "libdeflate",
version = "1.19",
compatibility_level = 1,
)
58 changes: 58 additions & 0 deletions modules/libdeflate/1.19/patches/add_build_file.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
--- /dev/null
+++ BUILD.bazel
@@ -0,0 +1,55 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) Contributors to the OpenEXR Project.
+
+cc_library(
+ name = "deflate",
+ srcs = [
+ "common_defs.h",
+ "lib/adler32.c",
+ "lib/adler32_vec_template.h",
+ "lib/arm/adler32_impl.h",
+ "lib/arm/cpu_features.c",
+ "lib/arm/cpu_features.h",
+ "lib/arm/crc32_impl.h",
+ "lib/arm/crc32_pmull_helpers.h",
+ "lib/arm/crc32_pmull_wide.h",
+ "lib/arm/matchfinder_impl.h",
+ "lib/bt_matchfinder.h",
+ "lib/cpu_features_common.h",
+ "lib/crc32.c",
+ "lib/crc32_multipliers.h",
+ "lib/crc32_tables.h",
+ "lib/decompress_template.h",
+ "lib/deflate_compress.c",
+ "lib/deflate_compress.h",
+ "lib/deflate_constants.h",
+ "lib/deflate_decompress.c",
+ "lib/gzip_compress.c",
+ "lib/gzip_constants.h",
+ "lib/gzip_decompress.c",
+ "lib/hc_matchfinder.h",
+ "lib/ht_matchfinder.h",
+ "lib/lib_common.h",
+ "lib/matchfinder_common.h",
+ "lib/utils.c",
+ "lib/x86/adler32_impl.h",
+ "lib/x86/cpu_features.c",
+ "lib/x86/cpu_features.h",
+ "lib/x86/crc32_impl.h",
+ "lib/x86/crc32_pclmul_template.h",
+ "lib/x86/decompress_impl.h",
+ "lib/x86/matchfinder_impl.h",
+ "lib/zlib_compress.c",
+ "lib/zlib_constants.h",
+ "lib/zlib_decompress.c",
+ ],
+ hdrs = ["libdeflate.h"],
+ includes = ["."],
+ visibility = ["//visibility:public"],
+)
+
+alias(
+ name = "libdeflate",
+ actual = ":deflate",
+ visibility = ["//visibility:public"],
+)
8 changes: 8 additions & 0 deletions modules/libdeflate/1.19/patches/module_dot_bazel.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
--- MODULE.bazel
+++ MODULE.bazel
@@ -0,0 +1,5 @@
+module(
+ name = "libdeflate",
+ version = "1.19",
+ compatibility_level = 1,
+)
14 changes: 14 additions & 0 deletions modules/libdeflate/1.19/presubmit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
matrix:
platform:
- debian10
- ubuntu2004
- macos
- windows
tasks:
verify_targets:
name: Verify build targets
platform: ${{ platform }}
build_flags:
- --cxxopt=-std=c++14
build_targets:
- '@libdeflate//:deflate'
10 changes: 10 additions & 0 deletions modules/libdeflate/1.19/source.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"url": "https://github.com/ebiggers/libdeflate/archive/refs/tags/v1.19.tar.gz",
"integrity": "sha256-J79i1xzWRyj/Q6n+uS8qwvK/dImG2FYTPMHlGZJCjCU=",
"strip_prefix": "libdeflate-1.19",
"patch_strip": 0,
"patches": {
"add_build_file.patch": "sha256-L5cLd/VE0kOH29ifL5KdRkGX2KOldCTgKqTmNTWOTjg=",
"module_dot_bazel.patch": "sha256-GcCZeZoaXO2+nzQQlv8TqMYlyiAyoz1/f/CjSpUbd8Q="
}
}
3 changes: 2 additions & 1 deletion modules/libdeflate/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
}
],
"versions": [
"1.18"
"1.18",
"1.19"
],
"yanked_versions": {}
}
77 changes: 77 additions & 0 deletions modules/rabbitmq_osiris/1.6.6/MODULE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
module(
name = "rabbitmq_osiris",
version = "1.6.6",
)

bazel_dep(
name = "rules_erlang",
version = "3.11.4",
)

bazel_dep(
name = "rabbitmq_seshat",
version = "0.6.1",
repo_name = "seshat",
)

erlang_config = use_extension(
"@rules_erlang//bzlmod:extensions.bzl",
"erlang_config",
dev_dependency = True,
)

erlang_config.internal_erlang_from_github_release(
name = "24",
sha256 = "8444ff9abe23aea268adbb95463561fc222c965052d35d7c950b17be01c3ad82",
version = "24.3.4.6",
)

erlang_config.internal_erlang_from_github_release(
name = "25",
sha256 = "42840c32e13a27bdb2c376d69aa22466513d441bfe5eb882de23baf8218308d3",
version = "25.1.1",
)

erlang_config.internal_erlang_from_github_release(
name = "26",
sha256 = "3ff3c53d7ef9a45b5720e95b8756269c1a1b58eb51accc992ca97522fdb234d4",
version = "26.0",
)

use_repo(
erlang_config,
"erlang_config",
)

erlang_package = use_extension(
"@rules_erlang//bzlmod:extensions.bzl",
"erlang_package",
)

erlang_package.hex_package(
name = "gen_batch_server",
sha256 = "c3e6a1a2a0fb62aee631a98cfa0fd8903e9562422cbf72043953e2fb1d203017",
version = "0.8.8",
)

use_repo(
erlang_package,
"gen_batch_server",
)

erlang_dev_package = use_extension(
"@rules_erlang//bzlmod:extensions.bzl",
"erlang_package",
dev_dependency = True,
)

erlang_dev_package.hex_package(
name = "eunit_formatters",
version = "0.5.0",
build_file = "@rabbitmq_osiris//bzl:BUILD.eunit_formatters",
)

use_repo(
erlang_dev_package,
"eunit_formatters",
)
27 changes: 27 additions & 0 deletions modules/rabbitmq_osiris/1.6.6/presubmit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
shell_commands: &shell_commands
- curl -O https://raw.githubusercontent.com/kerl/kerl/master/kerl
- chmod a+x kerl
- ./kerl update releases
- ./kerl build ${ERLANG_VERSION}
- ./kerl install ${ERLANG_VERSION} ~/kerl/${ERLANG_VERSION}
- realpath ~/kerl/${ERLANG_VERSION}

platforms:
macos:
environment:
ERLANG_VERSION: "25.0"
ERLANG_HOME: /Users/buildkite/kerl/25.0
shell_commands: *shell_commands
build_flags:
- --incompatible_strict_action_env
build_targets:
- '@rabbitmq_osiris//:erlang_app'
ubuntu2004:
environment:
ERLANG_VERSION: "25.0"
ERLANG_HOME: /var/lib/buildkite-agent/kerl/25.0
shell_commands: *shell_commands
build_flags:
- --incompatible_strict_action_env
build_targets:
- '@rabbitmq_osiris//:erlang_app'
5 changes: 5 additions & 0 deletions modules/rabbitmq_osiris/1.6.6/source.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"integrity": "sha256-mAniC1oH7HMsIV+ST1zpjVbuMEDeoMmbUgkpqEadj0c=",
"strip_prefix": "osiris-1.6.6",
"url": "https://github.com/rabbitmq/osiris/releases/download/v1.6.6/osiris-1.6.6.tar.gz"
}
77 changes: 77 additions & 0 deletions modules/rabbitmq_osiris/1.6.7/MODULE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
module(
name = "rabbitmq_osiris",
version = "1.6.7",
)

bazel_dep(
name = "rules_erlang",
version = "3.11.4",
)

bazel_dep(
name = "rabbitmq_seshat",
version = "0.6.1",
repo_name = "seshat",
)

erlang_config = use_extension(
"@rules_erlang//bzlmod:extensions.bzl",
"erlang_config",
dev_dependency = True,
)

erlang_config.internal_erlang_from_github_release(
name = "24",
sha256 = "8444ff9abe23aea268adbb95463561fc222c965052d35d7c950b17be01c3ad82",
version = "24.3.4.6",
)

erlang_config.internal_erlang_from_github_release(
name = "25",
sha256 = "42840c32e13a27bdb2c376d69aa22466513d441bfe5eb882de23baf8218308d3",
version = "25.1.1",
)

erlang_config.internal_erlang_from_github_release(
name = "26",
sha256 = "3ff3c53d7ef9a45b5720e95b8756269c1a1b58eb51accc992ca97522fdb234d4",
version = "26.0",
)

use_repo(
erlang_config,
"erlang_config",
)

erlang_package = use_extension(
"@rules_erlang//bzlmod:extensions.bzl",
"erlang_package",
)

erlang_package.hex_package(
name = "gen_batch_server",
sha256 = "c3e6a1a2a0fb62aee631a98cfa0fd8903e9562422cbf72043953e2fb1d203017",
version = "0.8.8",
)

use_repo(
erlang_package,
"gen_batch_server",
)

erlang_dev_package = use_extension(
"@rules_erlang//bzlmod:extensions.bzl",
"erlang_package",
dev_dependency = True,
)

erlang_dev_package.hex_package(
name = "eunit_formatters",
version = "0.5.0",
build_file = "@rabbitmq_osiris//bzl:BUILD.eunit_formatters",
)

use_repo(
erlang_dev_package,
"eunit_formatters",
)
27 changes: 27 additions & 0 deletions modules/rabbitmq_osiris/1.6.7/presubmit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
shell_commands: &shell_commands
- curl -O https://raw.githubusercontent.com/kerl/kerl/master/kerl
- chmod a+x kerl
- ./kerl update releases
- ./kerl build ${ERLANG_VERSION}
- ./kerl install ${ERLANG_VERSION} ~/kerl/${ERLANG_VERSION}
- realpath ~/kerl/${ERLANG_VERSION}

platforms:
macos:
environment:
ERLANG_VERSION: "25.0"
ERLANG_HOME: /Users/buildkite/kerl/25.0
shell_commands: *shell_commands
build_flags:
- --incompatible_strict_action_env
build_targets:
- '@rabbitmq_osiris//:erlang_app'
ubuntu2004:
environment:
ERLANG_VERSION: "25.0"
ERLANG_HOME: /var/lib/buildkite-agent/kerl/25.0
shell_commands: *shell_commands
build_flags:
- --incompatible_strict_action_env
build_targets:
- '@rabbitmq_osiris//:erlang_app'
Loading

0 comments on commit 0fa7cbe

Please sign in to comment.