- cxon: explicit operator bool #515
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 test/.time | |
- 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 -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 -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 test/.space | |
- 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: Upload Artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: benchmark-data-gcc | |
path: | | |
test/.time/*.data | |
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 -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 -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 | |
uses: actions/upload-artifact@v4 | |
with: | |
name: benchmark-data-clang | |
path: | | |
test/.time/*.data | |
test/.space/*.data | |
# msvc ###################################################################### | |
msvc: | |
runs-on: windows-2019 | |
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 | |
echo > test/.root | |
- 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 -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 -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 | |
uses: actions/upload-artifact@v4 | |
with: | |
name: benchmark-data-msvc | |
path: | | |
test/.root | |
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 | |
echo > test/.root | |
- name: Time JSON (default) | |
env: | |
CXXFLAGS: -DCXON_TIME_ONLY -DCXON_TIME_BOOST_JSON -DCXON_TIME_RAPIDJSON -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 -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 | |
uses: actions/upload-artifact@v4 | |
with: | |
name: benchmark-data-xcode | |
path: | | |
test/.root | |
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 |