Skip to content

Commit

Permalink
add rapidyaml 0.7.0 processors
Browse files Browse the repository at this point in the history
  • Loading branch information
biojppm committed Jun 12, 2024
1 parent e21316f commit d4779d1
Show file tree
Hide file tree
Showing 8 changed files with 68 additions and 12 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ PERL = perl-pp perl-pplibyaml perl-syck perl-tiny perl-xs perl-yaml perl-refp
PYTHON = py-pyyaml py-ruamel
#RAKUDO = raku-yamlish
RUBY = ruby-psych
STATIC = c-libfyaml c-libyaml cpp-rapidyaml cpp-yamlcpp go-yaml rust-yamlrust
STATIC = c-libfyaml c-libyaml cpp-rapidyaml cpp-rapidengine cpp-yamlcpp go-yaml rust-yamlrust

build: $(DOTNET) $(HASKELL) $(LUA) $(NIM) $(NODE) $(PERL) $(PYTHON) $(RUBY) $(STATIC)

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ Type `make list` to see the following list:
| ----------------- | ---------- | ------------------ | -------- | ------- |
| c-libfyaml | C | [libfyaml](https://github.com/pantoniou/libfyaml) | 0.7.12 | static |
| c-libyaml | C | [libyaml](https://github.com/yaml/libyaml) | 0.2.5 | static |
| cpp-rapidyaml | C++ | [rapidyaml](https://github.com/biojppm/rapidyaml) | 0.4.0 | static |
| cpp-rapidyaml | C++ | [rapidyaml](https://github.com/biojppm/rapidyaml) | 0.7.0 | static |
| cpp-yamlcpp | C++ | [yaml-cpp](https://github.com/jbeder/yaml-cpp) | 0.8.0 | static |
| dotnet-yamldotnet | C# | [YamlDotNet](https://github.com/aaubry/YamlDotNet) | 11.2.1 | dotnet |
| go-yaml | Go | [go-yaml](https://github.com/go-yaml/yaml) | v2 | static |
Expand Down
8 changes: 8 additions & 0 deletions docker/static/testers/cpp-rapidengine-event
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh

if [ ! -t 0 ]; then
# if input comes from stdin, ryml wants a `-`
ryml-yaml-events -s $@ -
else
ryml-yaml-events -s $@
fi
4 changes: 2 additions & 2 deletions docker/static/testers/cpp-rapidyaml-event
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

if [ ! -t 0 ]; then
# if input comes from stdin, ryml wants a `-`
ryml-yaml-events $@ -
ryml-yaml-events -t $@ -
else
ryml-yaml-events $@
ryml-yaml-events -t $@
fi
8 changes: 8 additions & 0 deletions docker/static/testers/cpp-rapidyaml-json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh

if [ ! -t 0 ]; then
# if input comes from stdin, ryml wants a `-`
ryml-parse-emit -j $@ -
else
ryml-parse-emit -j $@
fi
8 changes: 8 additions & 0 deletions docker/static/testers/cpp-rapidyaml-yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh

if [ ! -t 0 ]; then
# if input comes from stdin, ryml wants a `-`
ryml-parse-emit $@ -
else
ryml-parse-emit $@
fi
33 changes: 27 additions & 6 deletions docker/static/utils/cpp-rapidyaml-build.sh
Original file line number Diff line number Diff line change
@@ -1,17 +1,38 @@
#!/bin/sh

set -x
set -xe
cd /tmp

cp $SOURCE .
tar xvf rapidyaml-$VERSION-src.tgz
cd rapidyaml-$VERSION-src
#override_version=master
if [ "$override_version" != "" ] ; then
tag=$override_version
mkdir rapidyaml-$tag
cd rapidyaml-$tag
git init -q .
git remote add origin https://github.com/biojppm/rapidyaml
git fetch origin $tag
git reset --hard FETCH_HEAD
git submodule update --init --recursive
else
cp $SOURCE .
tar xvf rapidyaml-$VERSION-src.tgz
cd rapidyaml-$VERSION-src
fi

cmake --version
cmake -S . -B ./build \
-DRYML_BUILD_TOOLS=ON -DRYML_WITH_TAB_TOKENS=ON \
-DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=Debug
-DRYML_BUILD_TOOLS=ON \
-DRYML_WITH_TAB_TOKENS=ON \
-DRYML_DEFAULT_CALLBACK_USES_EXCEPTIONS=ON \
-DBUILD_SHARED_LIBS=OFF \
-DCMAKE_BUILD_TYPE=Release
cmake --build ./build -j --target ryml-yaml-events
cmake --build ./build -j --target ryml-parse-emit

file=$(find ./build -name 'ryml-yaml-events*' -type f)
mkdir -p /build/bin/
cp -fav $file /build/bin/ryml-yaml-events

file=$(find ./build -name 'ryml-parse-emit*' -type f)
mkdir -p /build/bin/
cp -fav $file /build/bin/ryml-parse-emit
15 changes: 13 additions & 2 deletions list.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---


runtimes:

- &all
Expand Down Expand Up @@ -44,6 +45,7 @@ runtimes:
- &static
runtime: static


libraries:

c-libyaml:
Expand Down Expand Up @@ -81,8 +83,17 @@ libraries:
name: rapidyaml
homepage: https://github.com/biojppm/rapidyaml
lang: C++
version: 0.4.0
source: https://github.com/biojppm/rapidyaml/releases/download/v0.4.0/rapidyaml-0.4.0-src.tgz
version: 0.7.0
source: https://github.com/biojppm/rapidyaml/releases/download/v0.7.0/rapidyaml-0.7.0-src.tgz
build-script: cpp-rapidyaml-build.sh
tests: [event, json, yaml]
cpp-rapidengine:
<<: *static
name: rapidengine
homepage: https://github.com/biojppm/rapidyaml
lang: C++
version: 0.7.0
source: https://github.com/biojppm/rapidyaml/releases/download/v0.7.0/rapidyaml-0.7.0-src.tgz
build-script: cpp-rapidyaml-build.sh
tests: [event]

Expand Down

0 comments on commit d4779d1

Please sign in to comment.