diff options
| author | Stefan Boberg <[email protected]> | 2025-11-07 14:49:13 +0100 |
|---|---|---|
| committer | GitHub Enterprise <[email protected]> | 2025-11-07 14:49:13 +0100 |
| commit | 24e43a913f29ac3b314354e8ce5175f135bcc64f (patch) | |
| tree | ca442937ceeb63461012b33a4576e9835099f106 /thirdparty/ryml/.github/workflows/benchmarks.yml | |
| parent | get oplog attachments (#622) (diff) | |
| download | zen-24e43a913f29ac3b314354e8ce5175f135bcc64f.tar.xz zen-24e43a913f29ac3b314354e8ce5175f135bcc64f.zip | |
switch to xmake for package management (#611)
This change removes our dependency on vcpkg for package management, in favour of bringing some code in-tree in the `thirdparty` folder as well as using the xmake build-in package management feature. For the latter, all the package definitions are maintained in the zen repo itself, in the `repo` folder.
It should now also be easier to build the project as it will no longer depend on having the right version of vcpkg installed, which has been a common problem for new people coming in to the codebase. Now you should only need xmake to build.
* Bumps xmake requirement on github runners to 2.9.9 to resolve an issue where xmake on Windows invokes cmake with `v144` toolchain which does not exist
* BLAKE3 is now in-tree at `thirdparty/blake3`
* cpr is now in-tree at `thirdparty/cpr`
* cxxopts is now in-tree at `thirdparty/cxxopts`
* fmt is now in-tree at `thirdparty/fmt`
* robin-map is now in-tree at `thirdparty/robin-map`
* ryml is now in-tree at `thirdparty/ryml`
* sol2 is now in-tree at `thirdparty/sol2`
* spdlog is now in-tree at `thirdparty/spdlog`
* utfcpp is now in-tree at `thirdparty/utfcpp`
* xmake package repo definitions is in `repo`
* implemented support for sanitizers. ASAN is supported on windows, TSAN, UBSAN, MSAN etc are supported on Linux/MacOS though I have not yet tested it extensively on MacOS
* the zencore encryption implementation also now supports using mbedTLS which is used on MacOS, though for now we still use openssl on Linux
* crashpad
* bumps libcurl to 8.11.0 (from 8.8.0) which should address a rare build upload bug
Diffstat (limited to 'thirdparty/ryml/.github/workflows/benchmarks.yml')
| -rw-r--r-- | thirdparty/ryml/.github/workflows/benchmarks.yml | 147 |
1 files changed, 147 insertions, 0 deletions
diff --git a/thirdparty/ryml/.github/workflows/benchmarks.yml b/thirdparty/ryml/.github/workflows/benchmarks.yml new file mode 100644 index 000000000..61654643f --- /dev/null +++ b/thirdparty/ryml/.github/workflows/benchmarks.yml @@ -0,0 +1,147 @@ +name: benchmarks + +defaults: + run: + # Use a bash shell so we can use the same syntax for environment variable + # access regardless of the host operating system + shell: bash -e -x {0} + +on: + # https://github.community/t/how-to-trigger-an-action-on-push-or-pull-request-but-not-both/16662 + workflow_dispatch: + push: + branches: + - master + pull_request: + branches: + - master + +env: + PROJ_PFX_TARGET: ryml- + PROJ_PFX_CMAKE: RYML_ + CMAKE_FLAGS: -DRYML_TEST_SUITE=ON + NUM_JOBS_BUILD: # 4 + + +jobs: + + gettag: + runs-on: ubuntu-latest + steps: + # use fetch-depth to ensure all tags are fetched + - {name: checkout, uses: actions/checkout@v3, with: {submodules: recursive, fetch-depth: 0}} + - name: Variables (from tag) + if: contains(github.ref, 'tags/v') + run: | + # https://github.community/t/how-to-get-just-the-tag-name/16241/11 + SRC_TAG=${GITHUB_REF#refs/tags/} + SRC_VERSION=${GITHUB_REF#refs/tags/v} + cat <<EOF > vars.sh + export SRC_TAG=$SRC_TAG + export SRC_VERSION=$SRC_VERSION + EOF + - name: Variables (from commit, no tag) + if: ${{ !contains(github.ref, 'tags/v') }} + run: | + set -x + branch_name=${GITHUB_REF#refs/heads/} + # builds triggered from PRs have the branch_name like this: refs/pull/150/merge + # so filter to eg pr0150_merge + branch_name=`echo $branch_name | sed "s:refs/pull/\([0-9]*\)/\(.*\):pr0\1_\2:"` + # sanitize the branch name; eg merge/foo-bar -> merge_foo_bar + branch_name=`echo $branch_name | sed 's:[/.-]:_:g'` + git config --global --add safe.directory $(pwd) + SRC_TAG=$(git describe || git rev-parse --short HEAD) # eg v0.2.0-110-gda837e0 + SRC_VERSION="${branch_name}-${SRC_TAG}" + cat <<EOF > vars.sh + export SRC_TAG=$SRC_TAG + export SRC_VERSION=$SRC_VERSION + EOF + - name: Verify vars.sh + run: cat vars.sh ; source vars.sh ; echo $SRC_TAG ; echo $SRC_VERSION + - name: Save vars.sh + uses: actions/upload-artifact@v3 + with: {name: vars.sh, path: ./vars.sh} + + benchmarks: + name: bm/c++${{matrix.std}}/${{matrix.cxx}}/${{matrix.bt}} + needs: gettag + if: | + (!contains(github.event.head_commit.message, 'skip all')) || + (!contains(github.event.head_commit.message, 'skip benchmarks')) || + contains(github.event.head_commit.message, 'only benchmarks') + continue-on-error: true + runs-on: ${{matrix.os}} + strategy: + fail-fast: false + matrix: + include: + - {std: 11, cxx: g++-10, bt: Release, os: ubuntu-20.04, bitlinks: static64 static32} + - {std: 17, cxx: g++-10, bt: Release, os: ubuntu-20.04, bitlinks: static64 static32} + - {std: 20, cxx: g++-10, bt: Release, os: ubuntu-20.04, bitlinks: static64 static32} + # + - {std: 17, cxx: vs2019, bt: Release, os: windows-2019, bitlinks: static64 static32} + - {std: 20, cxx: vs2019, bt: Release, os: windows-2019, bitlinks: static64 static32} + - {std: 17, cxx: vs2022, bt: Release, os: windows-2022, bitlinks: static64 static32} + - {std: 20, cxx: vs2022, bt: Release, os: windows-2022, bitlinks: static64 static32} + # + - {std: 17, cxx: xcode, xcver: 13, bt: Release, os: macos-11, bitlinks: static64} + env: {BM: ON, STD: "${{matrix.std}}", CXX_: "${{matrix.cxx}}", BT: "${{matrix.bt}}", BITLINKS: "${{matrix.bitlinks}}", VG: "${{matrix.vg}}", SAN: "${{matrix.san}}", LINT: "${{matrix.lint}}", OS: "${{matrix.os}}"} + steps: + # use fetch-depth to ensure all tags are fetched + - {name: checkout, uses: actions/checkout@v3, with: {submodules: recursive, fetch-depth: 0}} + - {name: install requirements, run: source .github/reqs.sh && c4_install_test_requirements $OS} + - name: Download vars.sh + uses: actions/download-artifact@v3 + with: {name: vars.sh, path: ./} + - {name: show info, run: source .github/setenv.sh && c4_show_info} + - name: Install python 3.10 for plotting + uses: actions/setup-python@v4 + with: { python-version: '3.10' } + - name: install benchmark plotting dependencies + run: | + which python + which pip + python --version + pip --version + pip install -v -r ext/c4core/cmake/bm-xp/requirements.txt + python -c 'import munch ; print("ok!") ; exit(0)' + echo $? + - name: shared64-configure--------------------------------------------------- + run: export CMAKE_FLAGS="-DPython_EXECUTABLE=$(which python)" && source .github/setenv.sh && c4_cfg_test shared64 + - {name: shared64-build, run: source .github/setenv.sh && c4_build_target shared64 ryml-bm-build} + - {name: shared64-run, run: export NUM_JOBS_BUILD=1 && source .github/setenv.sh && c4_run_target shared64 ryml-bm-run} + - {name: shared64-plot, run: export NUM_JOBS_BUILD=1 && source .github/setenv.sh && c4_run_target shared64 ryml-bm-plot} + - name: static64-configure--------------------------------------------------- + run: export CMAKE_FLAGS="-DPython_EXECUTABLE=$(which python)" && source .github/setenv.sh && c4_cfg_test static64 + - {name: static64-build, run: source .github/setenv.sh && c4_build_target static64 ryml-bm-build} + - {name: static64-run, run: export NUM_JOBS_BUILD=1 && source .github/setenv.sh && c4_run_target static64 ryml-bm-run} + - {name: static64-plot, run: export NUM_JOBS_BUILD=1 && source .github/setenv.sh && c4_run_target static64 ryml-bm-plot} + - name: static32-configure--------------------------------------------------- + run: export CMAKE_FLAGS="-DPython_EXECUTABLE=$(which python)" && source .github/setenv.sh && c4_cfg_test static32 + - {name: static32-build, run: source .github/setenv.sh && c4_build_target static32 ryml-bm-build} + - {name: static32-run, run: export NUM_JOBS_BUILD=1 && source .github/setenv.sh && c4_run_target static32 ryml-bm-run} + - {name: static32-plot, run: export NUM_JOBS_BUILD=1 && source .github/setenv.sh && c4_run_target static32 ryml-bm-plot} + - name: shared32-configure--------------------------------------------------- + run: export CMAKE_FLAGS="-DPython_EXECUTABLE=$(which python)" && source .github/setenv.sh && c4_cfg_test shared32 + - {name: shared32-build, run: source .github/setenv.sh && c4_build_target shared32 ryml-bm-build} + - {name: shared32-run, run: export NUM_JOBS_BUILD=1 && source .github/setenv.sh && c4_run_target shared32 ryml-bm-run} + - {name: shared32-plot, run: export NUM_JOBS_BUILD=1 && source .github/setenv.sh && c4_run_target shared32 ryml-bm-plot} + - name: gather benchmark results + run: | + set -x + source vars.sh + echo SRC_TAG=$SRC_TAG + echo SRC_VERSION=$SRC_VERSION + desc=$SRC_TAG + for bl in ${{matrix.bitlinks}} ; do + dst=$(echo ryml-benchmark_results/$desc/x86_64/${{matrix.cxx}}-${{matrix.bt}}-c++${{matrix.std}}-$bl | sed 's:++-:xx:g' | sed 's:+:x:g') + mkdir -p $dst + find build -name bm-results + mv -vf build/$bl/bm/bm-results/* $dst/. + done + - name: upload benchmark result artifacts + uses: actions/upload-artifact@v3 + with: + name: ryml-benchmark_results + path: ryml-benchmark_results/ |