From af5c8175b4b126cc1ce72d0afe273abcc20aac4e Mon Sep 17 00:00:00 2001 From: Daniel Lemire Date: Sat, 15 May 2021 15:28:59 -0400 Subject: [PATCH] =?UTF-8?q?By=20default,=20we=20should=20not=20do=20the=20?= =?UTF-8?q?DOM=20checkperf=E2=80=A6=20(#1571)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * By default, we should not do the DOM checkperf. These targets assume that main branch remains compatible, an assumption that will break over time. --- .circleci/config.yml | 2 +- .github/workflows/msys2-clang.yml | 8 ++++---- .github/workflows/ubuntu18-checkperf.yml | 2 +- .github/workflows/ubuntu20-checkperf.yml | 2 +- benchmark/dom/checkperf.cmake | 5 ++++- 5 files changed, 11 insertions(+), 8 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 6aa0749f..c571aabd 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -129,7 +129,7 @@ commands: steps: - cmake_build_cache - run: | - cmake --build build --target checkperf && + cmake -DSIMDJSON_ENABLE_DOM_CHECKPERF=ON --build build --target checkperf && cd build && ctest --output-on-failure -R checkperf diff --git a/.github/workflows/msys2-clang.yml b/.github/workflows/msys2-clang.yml index 4a9f9e40..4281433d 100644 --- a/.github/workflows/msys2-clang.yml +++ b/.github/workflows/msys2-clang.yml @@ -20,16 +20,16 @@ jobs: matrix: include: - msystem: "MINGW64" - install: mingw-w64-x86_64-cmake mingw-w64-x86_64-ninja mingw-w64-x86_64-clang + install: mingw-w64-x86_64-libxml2 mingw-w64-x86_64-cmake mingw-w64-x86_64-ninja mingw-w64-x86_64-clang type: Release - msystem: "MINGW32" - install: mingw-w64-i686-cmake mingw-w64-i686-ninja mingw-w64-i686-clang + install: mingw-w64-i686-libxml2 mingw-w64-i686-cmake mingw-w64-i686-ninja mingw-w64-i686-clang type: Release - msystem: "MINGW64" - install: mingw-w64-x86_64-cmake mingw-w64-x86_64-ninja mingw-w64-x86_64-clang + install: mingw-w64-x86_64-libxml2 mingw-w64-x86_64-cmake mingw-w64-x86_64-ninja mingw-w64-x86_64-clang type: Debug - msystem: "MINGW32" - install: mingw-w64-i686-cmake mingw-w64-i686-ninja mingw-w64-i686-clang + install: mingw-w64-i686-libxml2 mingw-w64-i686-cmake mingw-w64-i686-ninja mingw-w64-i686-clang type: Debug env: CMAKE_GENERATOR: Ninja diff --git a/.github/workflows/ubuntu18-checkperf.yml b/.github/workflows/ubuntu18-checkperf.yml index 7836065a..89ec1a5c 100644 --- a/.github/workflows/ubuntu18-checkperf.yml +++ b/.github/workflows/ubuntu18-checkperf.yml @@ -24,6 +24,6 @@ jobs: run: | mkdir build && cd build && - cmake -DSIMDJSON_GOOGLE_BENCHMARKS=ON -DBUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_PREFIX:PATH=destination .. && + cmake -DSIMDJSON_ENABLE_DOM_CHECKPERF=ON -DSIMDJSON_GOOGLE_BENCHMARKS=ON -DBUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_PREFIX:PATH=destination .. && cmake --build . --target checkperf && ctest --output-on-failure -R checkperf ubuntu18-checkperf.yml diff --git a/.github/workflows/ubuntu20-checkperf.yml b/.github/workflows/ubuntu20-checkperf.yml index bb17ac03..24f1190b 100644 --- a/.github/workflows/ubuntu20-checkperf.yml +++ b/.github/workflows/ubuntu20-checkperf.yml @@ -24,6 +24,6 @@ jobs: run: | mkdir build && cd build && - cmake -DCMAKE_CXX_FLAGS="-Werror=old-style-cast -pedantic -Wpedantic" -DSIMDJSON_GOOGLE_BENCHMARKS=ON -DBUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_PREFIX:PATH=destination .. && + cmake -DSIMDJSON_ENABLE_DOM_CHECKPERF=ON -DCMAKE_CXX_FLAGS="-Werror=old-style-cast -pedantic -Wpedantic" -DSIMDJSON_GOOGLE_BENCHMARKS=ON -DBUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_PREFIX:PATH=destination .. && cmake --build . --target checkperf && ctest --output-on-failure -R checkperf diff --git a/benchmark/dom/checkperf.cmake b/benchmark/dom/checkperf.cmake index f599789b..e77cbb75 100644 --- a/benchmark/dom/checkperf.cmake +++ b/benchmark/dom/checkperf.cmake @@ -5,9 +5,12 @@ # checkperf-repo: initialize and sync reference repository (first time only) # TEST checkperf: runs the actual checkperf test +option(SIMDJSON_ENABLE_DOM_CHECKPERF "Enable DOM performance comparison with main branch" OFF) + + # Clone the repository if it's not there find_package(Git QUIET) -if (Git_FOUND AND (GIT_VERSION_STRING VERSION_GREATER "2.1.4") AND (NOT CMAKE_GENERATOR MATCHES Ninja) AND (NOT MSVC) ) # We use "-C" which requires a recent git +if (SIMDJSON_ENABLE_DOM_CHECKPERF AND Git_FOUND AND (GIT_VERSION_STRING VERSION_GREATER "2.1.4") AND (NOT CMAKE_GENERATOR MATCHES Ninja) AND (NOT MSVC) ) # We use "-C" which requires a recent git message(STATUS "Git is available and it is recent. We are enabling checkperf targets.") # sync_git_repository(myrepo ...) creates two targets: # myrepo - if the repo does not exist, creates and syncs it against the origin branch