Skip to content

Commit

Permalink
Add check (#3460)
Browse files Browse the repository at this point in the history
This library is a dependency of open62541's tests, which we'd like to
build.

Ideally we'll drop use of rules_foreign_cc in favor of natively building
the library, but that requires wrangling some complexity around
configured files.
  • Loading branch information
mbeards authored Dec 19, 2024
1 parent f511240 commit 8b8489e
Show file tree
Hide file tree
Showing 6 changed files with 81 additions and 0 deletions.
10 changes: 10 additions & 0 deletions modules/check/0.15.2/MODULE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module(
name = "check",
version = "0.15.2",
compatibility_level = 0,
)

bazel_dep(
name = "rules_foreign_cc",
version = "0.13.0",
)
17 changes: 17 additions & 0 deletions modules/check/0.15.2/patches/add_build_file.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
--- /dev/null
+++ BUILD.bazel
@@ -0,0 +1,14 @@
+load("@rules_foreign_cc//foreign_cc:defs.bzl", "cmake")
+
+filegroup(
+ name="all_srcs",
+ srcs= glob(["**"]),
+)
+
+cmake(
+ name="check",
+ lib_source = ":all_srcs",
+ out_static_libs = ["libcheck.a"],
+ linkopts =["-lrt"],
+ visibility = ["//visibility:public"],
+)
13 changes: 13 additions & 0 deletions modules/check/0.15.2/patches/module_dot_bazel.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
--- MODULE.bazel
+++ MODULE.bazel
@@ -0,0 +1,10 @@
+module(
+ name = "check",
+ version = "0.15.2",
+ compatibility_level = 0,
+)
+
+bazel_dep(
+ name = "rules_foreign_cc",
+ version = "0.13.0",
+)
14 changes: 14 additions & 0 deletions modules/check/0.15.2/presubmit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
matrix:
platform:
- debian10
- ubuntu2004
bazel:
- 8.x
- 7.x
tasks:
verify_targets:
name: Verify build targets
platform: ${{ platform }}
bazel: ${{ bazel }}
build_targets:
- '@check//:check'
10 changes: 10 additions & 0 deletions modules/check/0.15.2/source.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"url": "https://github.com/libcheck/check/releases/download/0.15.2/check-0.15.2.tar.gz",
"integrity": "sha256-qN5OC6z7TXbdHGGN7SY1I7U7hdkqFG2INesaUpMvogo=",
"strip_prefix": "check-0.15.2",
"patches": {
"add_build_file.patch": "sha256-8Xq7WLYk1k54AWpedJcQjixvHXyGd/tPqgKFJxTzY1A=",
"module_dot_bazel.patch": "sha256-+xh4zRz0/HENCGs8EH3lrcblSI2j7PbAlqvgaXV7deY="
},
"patch_strip": 0
}
17 changes: 17 additions & 0 deletions modules/check/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"homepage": "https://libcheck.github.io/check/",
"maintainers": [
{
"email": "[email protected]",
"github": "mbeards",
"name": "Michael Beardsworth"
}
],
"repository": [
"github:libcheck/check"
],
"versions": [
"0.15.2"
],
"yanked_versions": {}
}

0 comments on commit 8b8489e

Please sign in to comment.