diff --git a/Makefile b/Makefile index 36e1f08..7459ed0 100644 --- a/Makefile +++ b/Makefile @@ -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) diff --git a/README.md b/README.md index ee9dfd4..f0a5484 100644 --- a/README.md +++ b/README.md @@ -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 | diff --git a/docker/static/testers/cpp-rapidengine-event b/docker/static/testers/cpp-rapidengine-event new file mode 100755 index 0000000..caa3c16 --- /dev/null +++ b/docker/static/testers/cpp-rapidengine-event @@ -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 diff --git a/docker/static/testers/cpp-rapidyaml-event b/docker/static/testers/cpp-rapidyaml-event index f3b81a2..1646b9a 100755 --- a/docker/static/testers/cpp-rapidyaml-event +++ b/docker/static/testers/cpp-rapidyaml-event @@ -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 diff --git a/docker/static/testers/cpp-rapidyaml-json b/docker/static/testers/cpp-rapidyaml-json new file mode 100755 index 0000000..ece5e60 --- /dev/null +++ b/docker/static/testers/cpp-rapidyaml-json @@ -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 diff --git a/docker/static/testers/cpp-rapidyaml-yaml b/docker/static/testers/cpp-rapidyaml-yaml new file mode 100755 index 0000000..b8cb65d --- /dev/null +++ b/docker/static/testers/cpp-rapidyaml-yaml @@ -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 diff --git a/docker/static/utils/cpp-rapidyaml-build.sh b/docker/static/utils/cpp-rapidyaml-build.sh index 325e3bc..2acae36 100755 --- a/docker/static/utils/cpp-rapidyaml-build.sh +++ b/docker/static/utils/cpp-rapidyaml-build.sh @@ -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 diff --git a/list.yaml b/list.yaml index 11875d0..29572df 100644 --- a/list.yaml +++ b/list.yaml @@ -1,5 +1,6 @@ --- + runtimes: - &all @@ -44,6 +45,7 @@ runtimes: - &static runtime: static + libraries: c-libyaml: @@ -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]