Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add jsoncons #2666

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions modules/jsoncons/0.177.0/MODULE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module(
name = "jsoncons",
version = "0.177.0",
compatibility_level = 1,
)

bazel_dep(name = "rules_foreign_cc", version = "0.12.0")
22 changes: 22 additions & 0 deletions modules/jsoncons/0.177.0/patches/add_build_file.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
--- /dev/null
+++ BUILD.bazel
@@ -0,0 +1,19 @@
+package(default_visibility = ["//visibility:public"])
+
+cc_library(
+ name = "json",
+ hdrs = glob(["include/**/*.hpp"])
+)
+
+cmake(
+ name = "json_cmake",
+ out_binaries = ["unit_tests"]
+)
+
+sh_test(
+ name = "unit_tests_as_sh"
+ src = "test.sh"
+ data = [
+ "//:unit_tests"
+ ],
+)
10 changes: 10 additions & 0 deletions modules/jsoncons/0.177.0/patches/module_dot_bazel.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
--- MODULE.bazel
+++ MODULE.bazel
@@ -0,0 +1,7 @@
+module(
+ name = "jsoncons",
+ version = "0.177.0",
+ compatibility_level = 1,
+)
+
+bazel_dep(name = "rules_foreign_cc", version = "0.12.0")
6 changes: 6 additions & 0 deletions modules/jsoncons/0.177.0/patches/test_dot_sh.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
--- /dev/null
+++ test.sh
@@ -0,0 +1,3 @@
+#!/usr/bin/env bash
+
+./unit_tests
16 changes: 16 additions & 0 deletions modules/jsoncons/0.177.0/presubmit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
matrix:
platform:
- debian12
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no debian12 support on Bazel CI yet..

- ubuntu2204
- macos
- macos_arm64
- windows

tasks:
run_tests:
name: Run tests
version:
platform: ${{ platform }}
bazel: 7.x
build_targets:
- '@jsoncons//:unit_tests'
11 changes: 11 additions & 0 deletions modules/jsoncons/0.177.0/source.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"url": "https://github.com/danielaparker/jsoncons/archive/refs/tags/v0.177.0.zip",
"integrity": "sha256-zp8O4dvNxnczz55QsDj4HTYSG4APjRKj2J6lIyRX7dY=",
"strip_prefix": "jsoncons-0.177.0",
"patches": {
"add_build_file.patch": "sha256-YBWr5cjfLlKXvzgDKL8m2JD02s1OBGa/OReLKIDL0xc=",
"module_dot_bazel.patch": "sha256-7N+QhtRM69GuJtVqGLqkLZXLQYedIuaUXUlY1MdsxnM=",
"test_dot_sh.patch": "sha256-GoFJ7IcWoprnDCKUuDcPHrP4OPYfA1jDfPeausQEnl0="
},
"patch_strip": 0
}
16 changes: 16 additions & 0 deletions modules/jsoncons/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"homepage": "https://github.com/danielaparker/jsoncons",
"maintainers": [
{
"email": "bcr-maintainers@bazel.build",
"name": "No Maintainer Specified"
}
],
"repository": [
"github:danielaparker/jsoncons"
],
"versions": [
"0.177.0"
],
"yanked_versions": {}
}
Loading