diff --git a/.circleci/config.yml b/.circleci/config.yml index bbbbb9470..6998cca66 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -100,6 +100,14 @@ commands: ctest $CTEST_FLAGS -LE "acceptance|per_implementation" # Everything we haven't run yet, run now. + cmake_perftest: + steps: + - cmake_build_cache + - run: | + cmake --build build --target checkperf && + cd build && + ctest --output-on-failure -R checkperf + # we not only want cmake to build and run tests, but we want also a successful installation from which we can build, link and run programs cmake_install_test: # this version builds, install, test and then verify from the installation steps: @@ -118,11 +126,16 @@ jobs: executor: gcc10 environment: { CMAKE_FLAGS: -DSIMDJSON_JUST_LIBRARY=ON } steps: [ cmake_build, cmake_install_test, cmake_installed_test_cxx20 ] + gcc10-perftest: + description: Build and run performance tests on GCC 10 and AVX 2 with a cmake static build, this test performance regression + executor: gcc10 + environment: { CMAKE_FLAGS: -DSIMDJSON_GOOGLE_BENCHMARKS=OFF -DSIMDJSON_BUILD_STATIC=ON } + steps: [ cmake_perftest ] gcc10: - description: Build and run tests on GCC 10 and AVX 2 with a cmake static build, this test performance regression + description: Build and run tests on GCC 10 and AVX 2 with a cmake static build executor: gcc10 environment: { CMAKE_FLAGS: -DSIMDJSON_GOOGLE_BENCHMARKS=ON -DSIMDJSON_BUILD_STATIC=ON } - steps: [ cmake_test_all, cmake_install_test, cmake_installed_test_cxx20 ] + steps: [ cmake_test, cmake_install_test, cmake_installed_test_cxx20 ] clang6: description: Build and run tests on clang 6 and AVX 2 with a cmake static build executor: clang6 diff --git a/.github/workflows/ubuntu18-checkperf.yml b/.github/workflows/ubuntu18-checkperf.yml new file mode 100644 index 000000000..83fe2918d --- /dev/null +++ b/.github/workflows/ubuntu18-checkperf.yml @@ -0,0 +1,21 @@ +name: Performance check on Ubuntu 18.04 CI (GCC 7) + +on: [push, pull_request] + +jobs: + ubuntu-build: + runs-on: ubuntu-18.04 + steps: + - uses: actions/checkout@v2 + - name: Setup cmake + uses: jwlawson/actions-setup-cmake@v1.0 + with: + cmake-version: '3.9.x' + - name: Use cmake + run: | + mkdir build && + cd build && + cmake -DSIMDJSON_GOOGLE_BENCHMARKS=ON -DSIMDJSON_BUILD_STATIC=ON -DCMAKE_INSTALL_PREFIX:PATH=destination .. && + cmake --build . --target checkperf && + ctest --output-on-failure -R checkperf ubuntu18-checkperf.yml + diff --git a/.github/workflows/ubuntu18.yml b/.github/workflows/ubuntu18.yml index ed0329136..44cedfc05 100644 --- a/.github/workflows/ubuntu18.yml +++ b/.github/workflows/ubuntu18.yml @@ -17,6 +17,6 @@ jobs: cd build && cmake -DSIMDJSON_GOOGLE_BENCHMARKS=ON -DSIMDJSON_BUILD_STATIC=ON -DCMAKE_INSTALL_PREFIX:PATH=destination .. && cmake --build . && - ctest -j --output-on-failure && + ctest -j --output-on-failure -E checkperf && make install && echo -e '#include \nint main(int argc,char**argv) {simdjson::dom::parser parser;simdjson::dom::element tweets = parser.load(argv[1]); }' > tmp.cpp && c++ -Idestination/include -Ldestination/lib -std=c++17 -Wl,-rpath,destination/lib -o linkandrun tmp.cpp -lsimdjson && ./linkandrun jsonexamples/twitter.json diff --git a/.github/workflows/ubuntu20-checkperf.yml b/.github/workflows/ubuntu20-checkperf.yml new file mode 100644 index 000000000..86e99b67a --- /dev/null +++ b/.github/workflows/ubuntu20-checkperf.yml @@ -0,0 +1,20 @@ +name: Performance check on Ubuntu 20.04 CI (GCC 9) + +on: [push, pull_request] + +jobs: + ubuntu-build: + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v2 + - name: Setup cmake + uses: jwlawson/actions-setup-cmake@v1.0 + with: + cmake-version: '3.9.x' + - name: Use cmake + run: | + mkdir build && + cd build && + cmake -DSIMDJSON_GOOGLE_BENCHMARKS=ON -DSIMDJSON_BUILD_STATIC=ON -DCMAKE_INSTALL_PREFIX:PATH=destination .. && + cmake --build . --target checkperf && + ctest --output-on-failure -R checkperf diff --git a/.github/workflows/ubuntu20.yml b/.github/workflows/ubuntu20.yml index 271eb9350..adbddd825 100644 --- a/.github/workflows/ubuntu20.yml +++ b/.github/workflows/ubuntu20.yml @@ -17,6 +17,6 @@ jobs: cd build && cmake -DSIMDJSON_GOOGLE_BENCHMARKS=ON -DSIMDJSON_BUILD_STATIC=ON -DCMAKE_INSTALL_PREFIX:PATH=destination .. && cmake --build . && - ctest -j --output-on-failure && + ctest -j --output-on-failure -E checkperf && make install && echo -e '#include \nint main(int argc,char**argv) {simdjson::dom::parser parser;simdjson::dom::element tweets = parser.load(argv[1]); }' > tmp.cpp && c++ -Idestination/include -Ldestination/lib -std=c++17 -Wl,-rpath,destination/lib -o linkandrun tmp.cpp -lsimdjson && ./linkandrun jsonexamples/twitter.json