Skip to content

Rapidyaml #219

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

Open
wants to merge 25 commits into
base: devel
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
8e789ba
make: Major Makefile refactoring
ingydotnet Mar 24, 2025
25740fa
make: Uncomment .DELETE_ON_ERROR
ingydotnet Mar 24, 2025
8e00bca
core: Add rapidyaml parser support
ingydotnet Aug 28, 2024
8efaa8e
rapidyaml: Enable C++ tests, clean native/Makefile
biojppm Aug 29, 2024
122e89f
rapidyaml: Reserve memory
biojppm Aug 29, 2024
bc4cbee
rapidyaml: Compile both shared and static
biojppm Jan 5, 2025
ff5ea4f
rapidyaml: Add parsing of ys to integer-based events
biojppm Sep 15, 2024
6e721f6
rapidyaml: Update to 0.8.0
biojppm Feb 15, 2025
1fbf6a2
rapidyaml: YS integration updates
biojppm Feb 17, 2025
bb24eb1
rapidyaml: Integrate rapidyaml evt int parser.clj
ingydotnet Feb 21, 2025
98d4eee
rapidyaml: Test parsing yamllm.ys
biojppm Feb 22, 2025
2a91cc5
core: Add a YS_PARSER_TIME variable to time parsing
ingydotnet Feb 23, 2025
26736d9
core: Refactor parser to get rid of rapidyaml-edn
ingydotnet Feb 23, 2025
c848abd
rapidyaml: Add directbuffer JNI methods, save >14ms/call
biojppm Feb 17, 2025
47bd892
rapidyaml: Remove edn parsing
biojppm Feb 23, 2025
328e399
rapidyaml: Add run-time timing toggle
biojppm Feb 24, 2025
586f7bf
rapidyaml: Rename ryml2evt/ys2evt to ysparse
biojppm Feb 24, 2025
dd51414
rapidyaml: Working with native-image
biojppm Feb 24, 2025
54b6993
rapidyaml: Makefile major refactoring
ingydotnet Mar 24, 2025
772fb1a
POC: bytebuffer 2 slice 2 str
biojppm Mar 27, 2025
8795909
small ryml refactors
ingydotnet Mar 27, 2025
5ef0dd8
ryml: everything works (on linux)
ingydotnet Mar 27, 2025
dc0e93e
ryml: no need to upcast to ^Long for annotation
biojppm Mar 27, 2025
86950cd
ryml: set 'rapid' as default for rapidyaml-buf
biojppm Mar 27, 2025
c4ff3f6
ryml: add github workflows
biojppm Mar 27, 2025
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
107 changes: 107 additions & 0 deletions .github/workflows/rapidyaml.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
name: rapidyaml

defaults:
run:
shell: bash -xeo pipefail {0}
'on':
workflow_dispatch: null
push:
branches:
- main
pull_request:

jobs:

# check that the spec'ed version of rapidyaml passes its own tests
ryml:
runs-on: ubuntu-24.04
if: always()
continue-on-error: false
strategy:
fail-fast: false
matrix:
include:
- bt: Debug
- bt: Release
steps:
- name: checkout (action)
uses: actions/checkout@v4
with: {submodules: recursive, fetch-depth: 0} # use fetch-depth to ensure all tags are fetched
- name: checkout rapidyaml
run: |
cd rapidyaml/native
make rapidyaml
- name: configure
run: |
cd rapidyaml/native/rapidyaml
cmake -B build -D CMAKE_BUILD_TYPE=${{matrix.bt}} -D RYML_BUILD_TESTS=ON
- name: build
run: |
cd rapidyaml/native/rapidyaml
cmake --build build --target ryml-test-build --parallel --verbose
- name: run tests
run: |
cd rapidyaml/native/rapidyaml
cmake --build build --target ryml-test-run

# run the c++ tests, also in Debug to test with assertions
cpp:
runs-on: ubuntu-24.04
if: always()
continue-on-error: false
strategy:
fail-fast: false
matrix:
include:
- bt: Debug
- bt: Release
steps:
- name: checkout (action)
uses: actions/checkout@v4
with: {submodules: recursive, fetch-depth: 0} # use fetch-depth to ensure all tags are fetched
- name: check jni header up to date
run: make -C rapidyaml/native -B jni jnicheck
- name: get rapidyaml
run: make -C rapidyaml/native rapidyaml
- name: run c++ tests, static -----------------------------
run: echo
- name: cfg c++, static
run: RAPIDYAML_BUILD_TYPE=${{matrix.bt}} make -C rapidyaml/native cfg-static
- name: build c++ tests, static
run: RAPIDYAML_BUILD_TYPE=${{matrix.bt}} make -C rapidyaml/native build-static
- name: run c++ tests, static
run: RAPIDYAML_BUILD_TYPE=${{matrix.bt}} make -C rapidyaml/native test-static
- name: run c++ tests, static with timing
run: RAPIDYAML_BUILD_TYPE=${{matrix.bt}} make -C rapidyaml/native test-static-timing
- name: run c++ tests, shared -----------------------------
run: echo
- name: cfg c++, shared
run: RAPIDYAML_BUILD_TYPE=${{matrix.bt}} make -C rapidyaml/native cfg-shared
- name: build c++ tests, shared
run: RAPIDYAML_BUILD_TYPE=${{matrix.bt}} make -C rapidyaml/native build-shared
- name: run c++ tests, shared
run: RAPIDYAML_BUILD_TYPE=${{matrix.bt}} make -C rapidyaml/native test-shared
- name: run c++ tests, shared with timing
run: RAPIDYAML_BUILD_TYPE=${{matrix.bt}} make -C rapidyaml/native test-shared-timing

# run the java tests, also in Debug to test with assertions
java:
runs-on: ubuntu-24.04
if: always()
continue-on-error: false
strategy:
fail-fast: false
matrix:
include:
- bt: Debug
- bt: Release
steps:
- name: checkout (action)
uses: actions/checkout@v4
with: {submodules: recursive, fetch-depth: 0} # use fetch-depth to ensure all tags are fetched
- name: build lib
run: RAPIDYAML_BUILD_TYPE=${{matrix.bt}} make -C rapidyaml build
- name: build jar
run: RAPIDYAML_BUILD_TYPE=${{matrix.bt}} make -C rapidyaml jar
- name: run java tests
run: RAPIDYAML_BUILD_TYPE=${{matrix.bt}} make -C rapidyaml test
65 changes: 65 additions & 0 deletions .github/workflows/ys.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: ys

defaults:
run:
shell: bash -xeo pipefail {0}
'on':
workflow_dispatch: null
push:
branches:
- main
pull_request:

jobs:

# run ys tests, also in Debug to test with assertions.
# TODO: add a job to do all the downloads and build graalvm, and
# then make the other jobs depend on that
ys:
name: ys/${{matrix.ysparser}}/${{matrix.bt}}
runs-on: ubuntu-24.04
if: always()
continue-on-error: false
strategy:
fail-fast: false
matrix:
include:
- {v: 1, ysparser: snake}
- {v: 1, ysparser: rapid-arr, bt: Debug}
- {v: 1, ysparser: rapid-arr, bt: Release}
- {v: 1, ysparser: rapid-buf, bt: Debug}
- {v: 1, ysparser: rapid-buf, bt: Release}
steps:
- name: checkout (action)
uses: actions/checkout@v4
with: {submodules: recursive, fetch-depth: 0} # use fetch-depth to ensure all tags are fetched
- name: run core tests
run: |
. .profile
make test-core \
v=${{matrix.v}} \
YS_TESTING=1 \
YS_PARSER=${{matrix.ysparser}} \
RAPIDYAML_BUILD_TYPE=${{matrix.bt}}
- name: run ys/test-run
run: |
. .profile
make -C ys test-run \
v=${{matrix.v}} \
YS_PARSER=${{matrix.ysparser}} \
RAPIDYAML_BUILD_TYPE=${{matrix.bt}}
- name: run test-ys
run: |
. .profile
make test-ys \
v=${{matrix.v}} \
YS_PARSER=${{matrix.ysparser}} \
RAPIDYAML_BUILD_TYPE=${{matrix.bt}}
- name: run all tests
run: |
. .profile
make test \
v=${{matrix.v}} \
YS_TESTING=1 \
YS_PARSER=${{matrix.ysparser}} \
RAPIDYAML_BUILD_TYPE=${{matrix.bt}}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.vimrc
/*.clj
/*.md
*.md.tmp
Expand Down
29 changes: 6 additions & 23 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,14 @@ BINDINGS := \
rust \

DIRS := \
rapidyaml \
core \
libyamlscript \
$(BINDINGS) \
ys \

BUILD_DIRS := \
rapidyaml \
libyamlscript \
go \
nodejs \
Expand All @@ -49,9 +51,6 @@ PUBLISH := $(DIRS:%=publish-%)
CLEAN := $(DIRS:%=clean-%)
REALCLEAN := $(DIRS:%=realclean-%)
DISTCLEAN := $(DIRS:%=distclean-%)
DOCKER_BUILD := $(DIRS:%=docker-build-%)
DOCKER_TEST := $(DIRS:%=docker-test-%)
DOCKER_SHELL := $(DIRS:%=docker-shell-%)

export HEAD := $(shell git rev-parse HEAD)

Expand Down Expand Up @@ -142,7 +141,7 @@ test: $(TEST)
test-core:
$(MAKE) -C core test v=$v
test-ys:
$(MAKE) -C ys test-all v=$v GRAALVM_O=b
$(MAKE) -C ys test v=$v GRAALVM_O=b
test-%: %
$(MAKE) -C $< test v=$v GRAALVM_O=b
test-unit:
Expand Down Expand Up @@ -262,7 +261,9 @@ bump: $(BUILD_BIN_YS)

$(CLEAN):
clean: $(CLEAN)
$(RM) -r libyamlscript/lib ys/bin $(MAVEN_REPOSITORY)/yamlscript
$(RM) -r $(MAVEN_REPOSITORY)/yamlscript
$(RM) -r $(MAVEN_REPOSITORY)/org/yamlscript
$(RM) -r libyamlscript/lib ys/bin
$(RM) -r libyamlscript-0* ys-0* yamlscript.cli-*.jar
$(RM) -r sample/advent/hearsay-rust/target/
$(RM) -r homebrew-yamlscript
Expand All @@ -289,24 +290,6 @@ distclean-%: %
$(MAKE) -C $< distclean
$(RM) -r .calva/ .clj-kondo/.cache .lsp/

# XXX Limit removing ~/.m2 to ingy until we can get ~/.m2 to not be used
sysclean: realclean
$(RM) -r $(YS_TMP)
$(RM) -r /tmp/yamlscript-* /tmp/ys-local
ifeq (ingy,$(USER))
$(RM) -r $(HOME)/.m2
endif

$(DOCKER_BUILD):
docker-build: $(DOCKER_BUILD)
docker-build-%: %
$(MAKE) -C $< docker-build

$(DOCKER_TEST):
docker-test: $(DOCKER_TEST)
docker-test-%: %
$(MAKE) -C $< docker-test v=$v

$(DOCKER_SHELL):
docker-shell-%: %
$(MAKE) -C $< docker-shell v=$v
2 changes: 1 addition & 1 deletion clojure/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export CLOJARS_PASSWORD ?= $(shell util/get-setting password)

#------------------------------------------------------------------------------

test install deploy:: $(LEIN) $(YAMLSCRIPT_JAVA_INSTALLED)
test install deploy:: $(LEIN)
$< $@

release: deploy
Expand Down
4 changes: 0 additions & 4 deletions common/base.mk
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,6 @@ chown::
clean-all::
$(MAKE) -C $(ROOT) $@

docker-build::

docker-test::

always:

env::
Expand Down
9 changes: 4 additions & 5 deletions common/binding.mk
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
include $(COMMON)/docker.mk
include $(COMMON)/vars-rapidyaml.mk
include $(COMMON)/vars-libys.mk

test:: $(LIBYAMLSCRIPT_SO_FQNP)
test:: $(LIBYS_SO_FQNP)

$(LIBYAMLSCRIPT_SO_FQNP): | $(ROOT)/libyamlscript
$(LIBYS_SO_FQNP): | $(ROOT)/libyamlscript
$(MAKE) -C $(ROOT)/libyamlscript build

export PATH := $(BUILD_BIN):$(PATH)

build-doc:: build-bin

build-bin:
Expand Down
3 changes: 1 addition & 2 deletions common/clojure.mk
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ LEIN_REPL_OPTIONS := \
#------------------------------------------------------------------------------

clean::
$(RM) Dockerfile
$(RM) -r .lein-*
$(RM) -r reports/ target/

Expand Down Expand Up @@ -128,7 +127,7 @@ ifdef PORT
repl-port := :port $(PORT)
endif

.nrepl-pid: $(LEIN)
.nrepl-pid: $(LEIN) repl-deps
( \
$< $(LEIN_REPL_OPTIONS) repl :headless $(repl-port) & \
echo $$! > $@ \
Expand Down
22 changes: 0 additions & 22 deletions common/docker-apt-base.dockerfile

This file was deleted.

5 changes: 0 additions & 5 deletions common/docker-apt-clojure.dockerfile

This file was deleted.

14 changes: 0 additions & 14 deletions common/docker-apt-dev.dockerfile

This file was deleted.

12 changes: 0 additions & 12 deletions common/docker-apt-node.dockerfile

This file was deleted.

5 changes: 0 additions & 5 deletions common/docker-apt-perl.dockerfile

This file was deleted.

7 changes: 0 additions & 7 deletions common/docker-apt-python.dockerfile

This file was deleted.

2 changes: 0 additions & 2 deletions common/docker-copy-project-clj.dockerfile

This file was deleted.

2 changes: 0 additions & 2 deletions common/docker-copy-project-deps.dockerfile

This file was deleted.

5 changes: 0 additions & 5 deletions common/docker-deps-clojure.dockerfile

This file was deleted.

9 changes: 0 additions & 9 deletions common/docker-deps-node.dockerfile

This file was deleted.

Loading
Loading