Skip to content

Commit c4ff3f6

Browse files
committed
ryml: add github workflows
1 parent 86950cd commit c4ff3f6

File tree

2 files changed

+172
-0
lines changed

2 files changed

+172
-0
lines changed

.github/workflows/rapidyaml.yml

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
name: rapidyaml
2+
3+
defaults:
4+
run:
5+
shell: bash -xeo pipefail {0}
6+
'on':
7+
workflow_dispatch: null
8+
push:
9+
branches:
10+
- main
11+
pull_request:
12+
13+
jobs:
14+
15+
# check that the spec'ed version of rapidyaml passes its own tests
16+
ryml:
17+
runs-on: ubuntu-24.04
18+
if: always()
19+
continue-on-error: false
20+
strategy:
21+
fail-fast: false
22+
matrix:
23+
include:
24+
- bt: Debug
25+
- bt: Release
26+
steps:
27+
- name: checkout (action)
28+
uses: actions/checkout@v4
29+
with: {submodules: recursive, fetch-depth: 0} # use fetch-depth to ensure all tags are fetched
30+
- name: checkout rapidyaml
31+
run: |
32+
cd rapidyaml/native
33+
make rapidyaml
34+
- name: configure
35+
run: |
36+
cd rapidyaml/native/rapidyaml
37+
cmake -B build -D CMAKE_BUILD_TYPE=${{matrix.bt}} -D RYML_BUILD_TESTS=ON
38+
- name: build
39+
run: |
40+
cd rapidyaml/native/rapidyaml
41+
cmake --build build --target ryml-test-build --parallel --verbose
42+
- name: run tests
43+
run: |
44+
cd rapidyaml/native/rapidyaml
45+
cmake --build build --target ryml-test-run
46+
47+
# run the c++ tests, also in Debug to test with assertions
48+
cpp:
49+
runs-on: ubuntu-24.04
50+
if: always()
51+
continue-on-error: false
52+
strategy:
53+
fail-fast: false
54+
matrix:
55+
include:
56+
- bt: Debug
57+
- bt: Release
58+
steps:
59+
- name: checkout (action)
60+
uses: actions/checkout@v4
61+
with: {submodules: recursive, fetch-depth: 0} # use fetch-depth to ensure all tags are fetched
62+
- name: check jni header up to date
63+
run: make -C rapidyaml/native -B jni jnicheck
64+
- name: get rapidyaml
65+
run: make -C rapidyaml/native rapidyaml
66+
- name: run c++ tests, static -----------------------------
67+
run: echo
68+
- name: cfg c++, static
69+
run: RAPIDYAML_BUILD_TYPE=${{matrix.bt}} make -C rapidyaml/native cfg-static
70+
- name: build c++ tests, static
71+
run: RAPIDYAML_BUILD_TYPE=${{matrix.bt}} make -C rapidyaml/native build-static
72+
- name: run c++ tests, static
73+
run: RAPIDYAML_BUILD_TYPE=${{matrix.bt}} make -C rapidyaml/native test-static
74+
- name: run c++ tests, static with timing
75+
run: RAPIDYAML_BUILD_TYPE=${{matrix.bt}} make -C rapidyaml/native test-static-timing
76+
- name: run c++ tests, shared -----------------------------
77+
run: echo
78+
- name: cfg c++, shared
79+
run: RAPIDYAML_BUILD_TYPE=${{matrix.bt}} make -C rapidyaml/native cfg-shared
80+
- name: build c++ tests, shared
81+
run: RAPIDYAML_BUILD_TYPE=${{matrix.bt}} make -C rapidyaml/native build-shared
82+
- name: run c++ tests, shared
83+
run: RAPIDYAML_BUILD_TYPE=${{matrix.bt}} make -C rapidyaml/native test-shared
84+
- name: run c++ tests, shared with timing
85+
run: RAPIDYAML_BUILD_TYPE=${{matrix.bt}} make -C rapidyaml/native test-shared-timing
86+
87+
# run the java tests, also in Debug to test with assertions
88+
java:
89+
runs-on: ubuntu-24.04
90+
if: always()
91+
continue-on-error: false
92+
strategy:
93+
fail-fast: false
94+
matrix:
95+
include:
96+
- bt: Debug
97+
- bt: Release
98+
steps:
99+
- name: checkout (action)
100+
uses: actions/checkout@v4
101+
with: {submodules: recursive, fetch-depth: 0} # use fetch-depth to ensure all tags are fetched
102+
- name: build lib
103+
run: RAPIDYAML_BUILD_TYPE=${{matrix.bt}} make -C rapidyaml build
104+
- name: build jar
105+
run: RAPIDYAML_BUILD_TYPE=${{matrix.bt}} make -C rapidyaml jar
106+
- name: run java tests
107+
run: RAPIDYAML_BUILD_TYPE=${{matrix.bt}} make -C rapidyaml test

.github/workflows/ys.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: ys
2+
3+
defaults:
4+
run:
5+
shell: bash -xeo pipefail {0}
6+
'on':
7+
workflow_dispatch: null
8+
push:
9+
branches:
10+
- main
11+
pull_request:
12+
13+
jobs:
14+
15+
# run ys tests, also in Debug to test with assertions.
16+
# TODO: add a job to do all the downloads and build graalvm, and
17+
# then make the other jobs depend on that
18+
ys:
19+
name: ys/${{matrix.ysparser}}/${{matrix.bt}}
20+
runs-on: ubuntu-24.04
21+
if: always()
22+
continue-on-error: false
23+
strategy:
24+
fail-fast: false
25+
matrix:
26+
include:
27+
- {v: 1, ysparser: snake}
28+
- {v: 1, ysparser: rapid-arr, bt: Debug}
29+
- {v: 1, ysparser: rapid-arr, bt: Release}
30+
- {v: 1, ysparser: rapid-buf, bt: Debug}
31+
- {v: 1, ysparser: rapid-buf, bt: Release}
32+
steps:
33+
- name: checkout (action)
34+
uses: actions/checkout@v4
35+
with: {submodules: recursive, fetch-depth: 0} # use fetch-depth to ensure all tags are fetched
36+
- name: run core tests
37+
run: |
38+
. .profile
39+
make test-core \
40+
v=${{matrix.v}} \
41+
YS_TESTING=1 \
42+
YS_PARSER=${{matrix.ysparser}} \
43+
RAPIDYAML_BUILD_TYPE=${{matrix.bt}}
44+
- name: run ys/test-run
45+
run: |
46+
. .profile
47+
make -C ys test-run \
48+
v=${{matrix.v}} \
49+
YS_PARSER=${{matrix.ysparser}} \
50+
RAPIDYAML_BUILD_TYPE=${{matrix.bt}}
51+
- name: run test-ys
52+
run: |
53+
. .profile
54+
make test-ys \
55+
v=${{matrix.v}} \
56+
YS_PARSER=${{matrix.ysparser}} \
57+
RAPIDYAML_BUILD_TYPE=${{matrix.bt}}
58+
- name: run all tests
59+
run: |
60+
. .profile
61+
make test \
62+
v=${{matrix.v}} \
63+
YS_TESTING=1 \
64+
YS_PARSER=${{matrix.ysparser}} \
65+
RAPIDYAML_BUILD_TYPE=${{matrix.bt}}

0 commit comments

Comments
 (0)