-
Notifications
You must be signed in to change notification settings - Fork 0
487 lines (475 loc) · 24 KB
/
benchmarks.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
name: Benchmarks
on:
push:
branches:
- develop
- master
- release/*
pull_request:
workflow_dispatch:
schedule:
- cron: '37 3 * * 6'
jobs:
# gcc ########################################################################
gcc:
runs-on: ubuntu-22.04
steps:
- name: Checkout cxon
uses: actions/checkout@v4
- name: Checkout Boost
uses: actions/checkout@v4
with:
repository: boostorg/boost
ref: boost-1.85.0
path: .dep/boost
- name: Checkout RapidJSON
uses: actions/checkout@v4
with:
repository: tencent/rapidjson
ref: master
path: .dep/rapidjson
- name: Checkout nlohmann/json
uses: actions/checkout@v4
with:
repository: nlohmann/json
ref: master
path: .dep/nlohmann
- name: Compiler setup
run: |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
sudo apt-get update -y
sudo apt-get install g++-13
- name: Boost setup
run: |
cd .dep/boost
git submodule update --init tools/build
git submodule update --init tools/boostdep
git submodule update --init libs/config
git submodule update --init libs/charconv
git submodule update --init libs/json
python tools/boostdep/depinst/depinst.py charconv
python tools/boostdep/depinst/depinst.py json
./bootstrap.sh
./b2
- name: Time setup
run: |
mkdir -v test/.time
mkdir -v test/time
ls -Rla test
- name: Time JSON (default)
env:
CXX: g++-13
CXXFLAGS: -std=c++20 -DCXON_TIME_ONLY -I ../.dep/boost -DCXON_TIME_BOOST_JSON -I ../.dep/rapidjson/include -DCXON_TIME_RAPIDJSON -DRAPIDJSON_SSE2 -I ../.dep/nlohmann/single_include -DCXON_TIME_NLOHMANN
LDFLAGS: -L ../.dep/boost/stage/lib -l boost_json
LD_LIBRARY_PATH: ../../.dep/boost/stage/lib:$LD_LIBRARY_PATH
run: |
COMPILER_VERSION=`$CXX -dumpversion`
make clean && make -j build-json-node
# S1
echo "# `date -u --iso-8601=seconds` / g++-$COMPILER_VERSION (`uname -sm`) / node (default)" > test/.time/g++.head.default.json.node-s1.data
make -s time-json-node-s1 | tee -a test/.time/g++.head.default.json.node-s1.data
echo "# `date -u --iso-8601=seconds` / g++-$COMPILER_VERSION (`uname -sm`) / native (default)" > test/.time/g++.head.default.json.native-s1.data
make -s time-json-native-s1 | tee -a test/.time/g++.head.default.json.native-s1.data
# S2
echo "# `date -u --iso-8601=seconds` / g++-$COMPILER_VERSION (`uname -sm`) / node (default)" > test/.time/g++.head.default.json.node-s2.data
make -s time-json-node-s2 | tee -a test/.time/g++.head.default.json.node-s2.data
echo "# `date -u --iso-8601=seconds` / g++-$COMPILER_VERSION (`uname -sm`) / native (default)" > test/.time/g++.head.default.json.native-s2.data
make -s time-json-native-s2 | tee -a test/.time/g++.head.default.json.native-s2.data
- name: Time JSON (boost::charconv)
env:
CXX: g++-13
CXXFLAGS: -std=c++20 -DCXON_TIME_ONLY -I ../.dep/boost -DCXON_USE_BOOST_CHARCONV -DCXON_TIME_BOOST_JSON -I ../.dep/rapidjson/include -DCXON_TIME_RAPIDJSON -DRAPIDJSON_SSE2 -I ../.dep/nlohmann/single_include -DCXON_TIME_NLOHMANN
LDFLAGS: -L ../.dep/boost/stage/lib -l boost_json -l boost_charconv
LD_LIBRARY_PATH: ../../.dep/boost/stage/lib:$LD_LIBRARY_PATH
run: |
COMPILER_VERSION=`$CXX -dumpversion`
make clean && make -j build-json-node
# S1
echo "# `date -u --iso-8601=seconds` / g++-$COMPILER_VERSION (`uname -sm`) / node (boost::charconv)" > test/.time/g++.head.boost-charconv.json.node-s1.data
make -s time-json-node-s1 | tee -a test/.time/g++.head.boost-charconv.json.node-s1.data
echo "# `date -u --iso-8601=seconds` / g++-$COMPILER_VERSION (`uname -sm`) / native (boost::charconv)" > test/.time/g++.head.boost-charconv.json.native-s1.data
make -s time-json-native-s1 | tee -a test/.time/g++.head.boost-charconv.json.native-s1.data
# S2
echo "# `date -u --iso-8601=seconds` / g++-$COMPILER_VERSION (`uname -sm`) / node (boost::charconv)" > test/.time/g++.head.boost-charconv.json.node-s2.data
make -s time-json-node-s2 | tee -a test/.time/g++.head.boost-charconv.json.node-s2.data
echo "# `date -u --iso-8601=seconds` / g++-$COMPILER_VERSION (`uname -sm`) / native (boost::charconv)" > test/.time/g++.head.boost-charconv.json.native-s2.data
make -s time-json-native-s2 | tee -a test/.time/g++.head.boost-charconv.json.native-s2.data
- name: Time CBOR (default)
env:
CXX: g++-13
CXXFLAGS: -std=c++20 -DCXON_TIME_ONLY
run: |
COMPILER_VERSION=`$CXX -dumpversion`
make clean && make -j build-cbor-node
echo "# `date -u --iso-8601=seconds` / g++-$COMPILER_VERSION (`uname -sm`)" > test/.time/g++.head.cbor.data
make -s time-cbor | tee -a test/.time/g++.head.cbor.data
- name: Space setup
run: |
chmod +x test/benchmark-space.sh
mkdir -v test/.space
mkdir -v test/space
ls -Rla test
- name: Space JSON (default)
env:
CXX: g++-13
CPPFLAGS: -I ../.dep/boost -I ../.dep/rapidjson/include -I ../.dep/nlohmann/single_include
CXXFLAGS: -std=c++20 -O2 -s -DNDEBUG
LDFLAGS: -L ../.dep/boost/stage/lib -l boost_json
LD_LIBRARY_PATH: ../../.dep/boost/stage/lib:$LD_LIBRARY_PATH
run: |
COMPILER_VERSION=`$CXX -dumpversion`
cd test
echo "# `date -u --iso-8601=seconds` / g++-$COMPILER_VERSION $CXXFLAGS (`uname -sm`)" > .space/g++.head.default.json.data
./benchmark-space.sh | tee -a .space/g++.head.default.json.data
- name: DEBUG
run: ls -Rla test
- name: Upload Artifacts (Time)
uses: actions/upload-artifact@v4
with:
name: benchmark-data-time-gcc
path: test/.time/*.data
- name: Upload Artifacts (Space)
uses: actions/upload-artifact@v4
with:
name: benchmark-data-space-gcc
path: test/.space/*.data
# clang ######################################################################
clang:
runs-on: ubuntu-22.04
steps:
- name: Checkout cxon
uses: actions/checkout@v4
- name: Checkout Boost
uses: actions/checkout@v4
with:
repository: boostorg/boost
ref: boost-1.85.0
path: .dep/boost
- name: Checkout RapidJSON
uses: actions/checkout@v4
with:
repository: tencent/rapidjson
ref: master
path: .dep/rapidjson
- name: Checkout nlohmann/json
uses: actions/checkout@v4
with:
repository: nlohmann/json
ref: master
path: .dep/nlohmann
- name: Compiler setup
run: |
sudo apt-get update
sudo apt-get install clang-15
- name: Boost setup
run: |
cd .dep/boost
git submodule update --init tools/build
git submodule update --init tools/boostdep
git submodule update --init libs/config
git submodule update --init libs/charconv
git submodule update --init libs/json
python tools/boostdep/depinst/depinst.py charconv
python tools/boostdep/depinst/depinst.py json
./bootstrap.sh
./b2
- name: Time setup
run: mkdir test/.time
- name: Time JSON (default)
env:
CXX: clang++-15
CXXFLAGS: -std=c++20 -DCXON_TIME_ONLY -I ../.dep/boost -DCXON_TIME_BOOST_JSON -I ../.dep/rapidjson/include -DCXON_TIME_RAPIDJSON -DRAPIDJSON_SSE2 -I ../.dep/nlohmann/single_include -DCXON_TIME_NLOHMANN
LDFLAGS: -L ../.dep/boost/stage/lib -l boost_json
LD_LIBRARY_PATH: ../../.dep/boost/stage/lib:$LD_LIBRARY_PATH
run: |
COMPILER_VERSION=`$CXX -dumpversion`
make clean && make -j build-json-node
# S1
echo "# `date -u --iso-8601=seconds` / clang++-$COMPILER_VERSION (`uname -sm`) / node (default)" > test/.time/clang++.head.default.json.node-s1.data
make -s time-json-node-s1 | tee -a test/.time/clang++.head.default.json.node-s1.data
echo "# `date -u --iso-8601=seconds` / clang++-$COMPILER_VERSION (`uname -sm`) / native (default)" > test/.time/clang++.head.default.json.native-s1.data
make -s time-json-native-s1 | tee -a test/.time/clang++.head.default.json.native-s1.data
# S2
echo "# `date -u --iso-8601=seconds` / clang++-$COMPILER_VERSION (`uname -sm`) / node (default)" > test/.time/clang++.head.default.json.node-s2.data
make -s time-json-node-s2 | tee -a test/.time/clang++.head.default.json.node-s2.data
echo "# `date -u --iso-8601=seconds` / clang++-$COMPILER_VERSION (`uname -sm`) / native (default)" > test/.time/clang++.head.default.json.native-s2.data
make -s time-json-native-s2 | tee -a test/.time/clang++.head.default.json.native-s2.data
- name: Time JSON (boost::cahrconv)
env:
CXX: clang++-15
CXXFLAGS: -std=c++20 -DCXON_TIME_ONLY -I ../.dep/boost -DCXON_USE_BOOST_CHARCONV -DCXON_TIME_BOOST_JSON -I ../.dep/rapidjson/include -DCXON_TIME_RAPIDJSON -DRAPIDJSON_SSE2 -I ../.dep/nlohmann/single_include -DCXON_TIME_NLOHMANN
LDFLAGS: -L ../.dep/boost/stage/lib -l boost_json -l boost_charconv
LD_LIBRARY_PATH: ../../.dep/boost/stage/lib:$LD_LIBRARY_PATH
run: |
COMPILER_VERSION=`$CXX -dumpversion`
make clean && make -j build-json-node
# S1
echo "# `date -u --iso-8601=seconds` / clang++-$COMPILER_VERSION (`uname -sm`) / node (boost::charconv)" > test/.time/clang++.head.boost-charconv.json.node-s1.data
make -s time-json-node-s1 | tee -a test/.time/clang++.head.boost-charconv.json.node-s1.data
echo "# `date -u --iso-8601=seconds` / clang++-$COMPILER_VERSION (`uname -sm`) / native (boost::charconv)" > test/.time/clang++.head.boost-charconv.json.native-s1.data
make -s time-json-native-s1 | tee -a test/.time/clang++.head.boost-charconv.json.native-s1.data
# S2
echo "# `date -u --iso-8601=seconds` / clang++-$COMPILER_VERSION (`uname -sm`) / node (boost::charconv)" > test/.time/clang++.head.boost-charconv.json.node-s2.data
make -s time-json-node-s2 | tee -a test/.time/clang++.head.boost-charconv.json.node-s2.data
echo "# `date -u --iso-8601=seconds` / clang++-$COMPILER_VERSION (`uname -sm`) / native (boost::charconv)" > test/.time/clang++.head.boost-charconv.json.native-s2.data
make -s time-json-native-s2 | tee -a test/.time/clang++.head.boost-charconv.json.native-s2.data
- name: Time CBOR (default)
env:
CXX: clang++-15
CXXFLAGS: -std=c++20 -DCXON_TIME_ONLY
run: |
COMPILER_VERSION=`$CXX -dumpversion`
make clean && make -j build-cbor-node
echo "# `date -u --iso-8601=seconds` / clang++-$COMPILER_VERSION (`uname -sm`)" > test/.time/clang++.head.cbor.data
make -s time-cbor | tee -a test/.time/clang++.head.cbor.data
- name: Space setup
run: |
chmod +x test/benchmark-space.sh
mkdir test/.space
- name: Space JSON (default)
env:
CXX: clang++-15
CPPFLAGS: -I ../.dep/boost -I ../.dep/rapidjson/include -I ../.dep/nlohmann/single_include
CXXFLAGS: -std=c++20 -O2 -s -DNDEBUG
LDFLAGS: -L ../.dep/boost/stage/lib -l boost_json
LD_LIBRARY_PATH: ../../.dep/boost/stage/lib:$LD_LIBRARY_PATH
run: |
COMPILER_VERSION=`$CXX -dumpversion`
cd test
echo "# `date -u --iso-8601=seconds` / clang++-$COMPILER_VERSION $CXXFLAGS (`uname -sm`)" > .space/clang++.head.default.json.data
./benchmark-space.sh | tee -a .space/clang++.head.default.json.data
- name: Upload Artifacts (Time)
uses: actions/upload-artifact@v4
with:
name: benchmark-data-time-clang
path: test/.time/*.data
- name: Upload Artifacts (Space)
uses: actions/upload-artifact@v4
with:
name: benchmark-data-space-clang
path: test/.space/*.data
# msvc ######################################################################
msvc:
runs-on: windows-latest
steps:
- name: Checkout cxon
uses: actions/checkout@v4
- name: Checkout Boost
uses: actions/checkout@v4
with:
repository: boostorg/boost
ref: boost-1.85.0
path: .dep/boost
- name: Checkout RapidJSON
uses: actions/checkout@v4
with:
repository: tencent/rapidjson
ref: master
path: .dep/rapidjson
- name: Checkout nlohmann/json
uses: actions/checkout@v4
with:
repository: nlohmann/json
ref: master
path: .dep/nlohmann
- name: Boost setup
shell: cmd
run: |
cd .dep/boost
git submodule update --init tools/build
git submodule update --init tools/boostdep
git submodule update --init libs/config
git submodule update --init libs/charconv
git submodule update --init libs/json
python tools/boostdep/depinst/depinst.py charconv
python tools/boostdep/depinst/depinst.py json
- name: Boost build
shell: cmd
run: |
cd .dep/boost
cmd /c bootstrap
b2 -d0 headers
b2 -j3 runtime-link=shared address-model=64 variant=release
- name: Time setup
shell: bash
run: mkdir test/.time
- name: Time JSON (default)
shell: bash
env:
CXXFLAGS: -EHsc -Oi -Ot -GR- -GS- -GL -D CXON_TIME_ONLY -I ../../.dep/boost -D CXON_TIME_BOOST_JSON -I ../../.dep/rapidjson/include -D CXON_TIME_RAPIDJSON -DRAPIDJSON_SSE2 -I ../../.dep/nlohmann/single_include -D CXON_TIME_NLOHMANN
LDFLAGS: -LTCG /LIBPATH:../../.dep/boost/stage/lib
run: |
cd test
#cmake --build .bld --target clean
cmake -S . -B .bld -D CMAKE_CXX_STANDARD=20 -D CMAKE_CXX_FLAGS="$CXXFLAGS" -DCMAKE_EXE_LINKER_FLAGS="$LDFLAGS"
cmake --build .bld --config Release --target cxon-json-node --parallel
COMPILER_VERSION=`grep -Erho 'CMAKE_CXX_COMPILER_VERSION ".*"' .bld | sed -E 's/.*"(.*)"/\1/' | head -n1`
cd .out
# S1
echo "# `date -u --iso-8601=seconds` / msvc++-$COMPILER_VERSION (`uname -sm`) / node (default)" > ../.time/msvc++.head.default.json.node-s1.data
./cxon-json-node ../data/json/tests.cf time-node-s1 | tee -a ../.time/msvc++.head.default.json.node-s1.data
echo "# `date -u --iso-8601=seconds` / msvc++-$COMPILER_VERSION (`uname -sm`) / native (default)" > ../.time/msvc++.head.default.json.native-s1.data
./cxon-json-node ../data/json/tests.cf time-native-s1 | tee -a ../.time/msvc++.head.default.json.native-s1.data
# S2
echo "# `date -u --iso-8601=seconds` / msvc++-$COMPILER_VERSION (`uname -sm`) / node (default)" > ../.time/msvc++.head.default.json.node-s2.data
./cxon-json-node ../data/json/tests.cf time-node-s2 | tee -a ../.time/msvc++.head.default.json.node-s2.data
echo "# `date -u --iso-8601=seconds` / msvc++-$COMPILER_VERSION (`uname -sm`) / native (default)" > ../.time/msvc++.head.default.json.native-s2.data
./cxon-json-node ../data/json/tests.cf time-native-s2 | tee -a ../.time/msvc++.head.default.json.native-s2.data
- name: Time JSON (boost::charconv)
shell: bash
env:
CXXFLAGS: -EHsc -Oi -Ot -GR- -GS- -GL -D CXON_TIME_ONLY -I ../../.dep/boost -D CXON_USE_BOOST_CHARCONV -D CXON_TIME_BOOST_JSON -I ../../.dep/rapidjson/include -D CXON_TIME_RAPIDJSON -DRAPIDJSON_SSE2 -I ../../.dep/nlohmann/single_include -D CXON_TIME_NLOHMANN
LDFLAGS: -LTCG /LIBPATH:../../.dep/boost/stage/lib
run: |
cd test
cmake --build .bld --target clean
cmake -S . -B .bld -D CMAKE_CXX_STANDARD=20 -D CMAKE_CXX_FLAGS="$CXXFLAGS" -D CMAKE_EXE_LINKER_FLAGS="$LDFLAGS"
cmake --build .bld --config Release --target cxon-json-node --parallel
COMPILER_VERSION=`grep -Erho 'CMAKE_CXX_COMPILER_VERSION ".*"' .bld | sed -E 's/.*"(.*)"/\1/' | head -n1`
cd .out
# S1
echo "# `date -u --iso-8601=seconds` / msvc++-$COMPILER_VERSION (`uname -sm`) / node (boost::charconv)" > ../.time/msvc++.head.boost-charconv.json.node-s1.data
./cxon-json-node ../data/json/tests.cf time-node-s1 | tee -a ../.time/msvc++.head.boost-charconv.json.node-s1.data
echo "# `date -u --iso-8601=seconds` / msvc++-$COMPILER_VERSION (`uname -sm`) / native (boost::charconv)" > ../.time/msvc++.head.boost-charconv.json.native-s1.data
./cxon-json-node ../data/json/tests.cf time-native-s1 | tee -a ../.time/msvc++.head.boost-charconv.json.native-s1.data
# S2
echo "# `date -u --iso-8601=seconds` / msvc++-$COMPILER_VERSION (`uname -sm`) / node (boost::charconv)" > ../.time/msvc++.head.boost-charconv.json.node-s2.data
./cxon-json-node ../data/json/tests.cf time-node-s2 | tee -a ../.time/msvc++.head.boost-charconv.json.node-s2.data
echo "# `date -u --iso-8601=seconds` / msvc++-$COMPILER_VERSION (`uname -sm`) / native (boost::charconv)" > ../.time/msvc++.head.boost-charconv.json.native-s2.data
./cxon-json-node ../data/json/tests.cf time-native-s2 | tee -a ../.time/msvc++.head.boost-charconv.json.native-s2.data
- name: Upload Artifacts (Time)
uses: actions/upload-artifact@v4
with:
name: benchmark-data-time-msvc
path: test/.time/*.data
# xcode ######################################################################
xcode:
runs-on: macos-latest
steps:
- name: Checkout cxon
uses: actions/checkout@v4
- name: Checkout Boost
uses: actions/checkout@v4
with:
repository: boostorg/boost
ref: boost-1.85.0
path: .dep/boost
- name: Checkout RapidJSON
uses: actions/checkout@v4
with:
repository: tencent/rapidjson
ref: master
path: .dep/rapidjson
- name: Checkout nlohmann/json
uses: actions/checkout@v4
with:
repository: nlohmann/json
ref: master
path: .dep/nlohmann
- name: Boost setup
run: |
cd .dep/boost
git submodule update --init tools/build
git submodule update --init tools/boostdep
git submodule update --init libs/config
git submodule update --init libs/charconv
git submodule update --init libs/json
python tools/boostdep/depinst/depinst.py charconv
python tools/boostdep/depinst/depinst.py json
./bootstrap.sh
./b2
- name: Time setup
run: mkdir test/.time
- name: Time JSON (default)
env:
CXXFLAGS: -DCXON_TIME_ONLY -DCXON_TIME_BOOST_JSON -DCXON_TIME_RAPIDJSON -DRAPIDJSON_NEON -DCXON_TIME_NLOHMANN
LDFLAGS: -l boost_json
run: |
DEP=$GITHUB_WORKSPACE/.dep
export CXXFLAGS="-I $DEP/boost -I $DEP/rapidjson/include -I $DEP/nlohmann/single_include $CXXFLAGS"
export LDFLAGS="-L $DEP/boost/stage/lib $LDFLAGS"
export DYLD_LIBRARY_PATH=$DEP/boost/stage/lib:$DYLD_LIBRARY_PATH
cd test
#cmake --build .bld --target clean
cmake -S . -B .bld -D CMAKE_BUILD_TYPE=Release -D CMAKE_CXX_STANDARD=20 -D CMAKE_CXX_FLAGS="$CXXFLAGS" -D CMAKE_EXE_LINKER_FLAGS="$LDFLAGS"
cmake --build .bld --target cxon-json-node --parallel
COMPILER_VERSION=`grep -Erho 'CMAKE_CXX_COMPILER_VERSION ".*"' .bld | sed -E 's/.*"(.*)"/\1/' | head -n1`
cd .out
# S1
echo "# `date -u +'%Y-%m-%dT%H:%M:%S+00:00'` / clang++-$COMPILER_VERSION (`uname -sm`) / node (default)" > ../.time/xcode.head.default.json.node-s1.data
./cxon-json-node ../data/json/tests.cf time-node-s1 | tee -a ../.time/xcode.head.default.json.node-s1.data
echo "# `date -u +'%Y-%m-%dT%H:%M:%S+00:00'` / clang++-$COMPILER_VERSION (`uname -sm`) / native (default)" > ../.time/xcode.head.default.json.native-s1.data
./cxon-json-node ../data/json/tests.cf time-native-s1 | tee -a ../.time/xcode.head.default.json.native-s1.data
# S2
echo "# `date -u +'%Y-%m-%dT%H:%M:%S+00:00'` / clang++-$COMPILER_VERSION (`uname -sm`) / node (default)" > ../.time/xcode.head.default.json.node-s2.data
./cxon-json-node ../data/json/tests.cf time-node-s2 | tee -a ../.time/xcode.head.default.json.node-s2.data
echo "# `date -u +'%Y-%m-%dT%H:%M:%S+00:00'` / clang++-$COMPILER_VERSION (`uname -sm`) / native (default)" > ../.time/xcode.head.default.json.native-s2.data
./cxon-json-node ../data/json/tests.cf time-native-s2 | tee -a ../.time/xcode.head.default.json.native-s2.data
- name: Time JSON (boost::charconv)
env:
CXXFLAGS: -DCXON_USE_BOOST_CHARCONV -DCXON_TIME_ONLY -DCXON_TIME_BOOST_JSON -DCXON_TIME_RAPIDJSON -DRAPIDJSON_NEON -DCXON_TIME_NLOHMANN
LDFLAGS: -l boost_json -l boost_charconv
run: |
DEP=$GITHUB_WORKSPACE/.dep
export CXXFLAGS="-I $DEP/boost -I $DEP/rapidjson/include -I $DEP/nlohmann/single_include $CXXFLAGS"
export LDFLAGS="-L $DEP/boost/stage/lib $LDFLAGS"
export DYLD_LIBRARY_PATH=$DEP/boost/stage/lib:$DYLD_LIBRARY_PATH
cd test
cmake --build .bld --target clean
cmake -S . -B .bld -D CMAKE_BUILD_TYPE=Release -D CMAKE_CXX_STANDARD=20 -D CMAKE_CXX_FLAGS="$CXXFLAGS" -D CMAKE_EXE_LINKER_FLAGS="$LDFLAGS"
cmake --build .bld --target cxon-json-node --parallel
COMPILER_VERSION=`grep -Erho 'CMAKE_CXX_COMPILER_VERSION ".*"' .bld | sed -E 's/.*"(.*)"/\1/' | head -n1`
cd .out
# S1
echo "# `date -u +'%Y-%m-%dT%H:%M:%S+00:00'` / clang++-$COMPILER_VERSION (`uname -sm`) / node (boost::charconv)" > ../.time/xcode.head.boost-charconv.json.node-s1.data
./cxon-json-node ../data/json/tests.cf time-node-s1 | tee -a ../.time/xcode.head.boost-charconv.json.node-s1.data
echo "# `date -u +'%Y-%m-%dT%H:%M:%S+00:00'` / clang++-$COMPILER_VERSION (`uname -sm`) / native (boost::charconv)" > ../.time/xcode.head.boost-charconv.json.native-s1.data
./cxon-json-node ../data/json/tests.cf time-native-s1 | tee -a ../.time/xcode.head.boost-charconv.json.native-s1.data
# S2
echo "# `date -u +'%Y-%m-%dT%H:%M:%S+00:00'` / clang++-$COMPILER_VERSION (`uname -sm`) / node (boost::charconv)" > ../.time/xcode.head.boost-charconv.json.node-s2.data
./cxon-json-node ../data/json/tests.cf time-node-s2 | tee -a ../.time/xcode.head.boost-charconv.json.node-s2.data
echo "# `date -u +'%Y-%m-%dT%H:%M:%S+00:00'` / clang++-$COMPILER_VERSION (`uname -sm`) / native (boost::charconv)" > ../.time/xcode.head.boost-charconv.json.native-s2.data
./cxon-json-node ../data/json/tests.cf time-native-s2 | tee -a ../.time/xcode.head.boost-charconv.json.native-s2.data
- name: Upload Artifacts (Time)
uses: actions/upload-artifact@v4
with:
name: benchmark-data-time-xcode
path: test/.time/*.data
# commit #####################################################################
commit:
needs: [gcc, clang, msvc, xcode]
runs-on: ubuntu-latest
steps:
- name: Checkout cxon
uses: actions/checkout@v4
- name: Checkout workflows-data
uses: actions/checkout@v4
with:
repository: oknenavin/workflows-data
token: ${{ secrets.WORKFLOWS_DATA_TOKEN }}
ref: develop # branch-links
path: .dep/workflows-data
- name: Download Artifacts
uses: actions/download-artifact@v4
with:
pattern: benchmark-data-*
merge-multiple: true
path: test/.data
- name: Commit
run: |
data=.dep/workflows-data/cxon/benchmarks/data
for i in test/.data/.time/*.data; do
name=`basename $i`
cp -f $i $data/time/$name
cat $data/time/${name/head/tail} >> $i && mv -f $i $data/time/${name/head/tail}
done
for i in test/.data/.space/*.data; do
name=`basename $i`
cp -f $i $data/space/$name
cat $data/space/${name/head/tail} >> $i && mv -f $i $data/space/${name/head/tail}
done
cd $data
git config user.name "oknenavin" && git config user.email ${{ secrets.CXON_MAIL }}
git pull
git add . && git commit -a -m "<${{ github.event.head_commit.message }}" -m "<- `date -u --iso-8601=seconds` / `git rev-parse --short $GITHUB_SHA`"
git push