From be620586969996d7b99950a67ddce0b955b6d215 Mon Sep 17 00:00:00 2001 From: Daniel Lemire Date: Tue, 21 Jul 2020 10:37:52 -0400 Subject: [PATCH] Adds some C++20 tests (only headers). (#1053) * Adds some C++20 tests (only headers). * Tweaking. --- .circleci/config.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index edc8912f..17ed2896 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -101,6 +101,10 @@ commands: - run: cd build && make install - run: echo -e '#include \nint main(int argc,char**argv) {simdjson::dom::parser parser;simdjson::dom::element tweets = parser.load(argv[1]); }' > tmp.cpp && c++ -Ibuild/destination/include -Lbuild/destination/lib -std=c++17 -Wl,-rpath,build/destination/lib -o linkandrun tmp.cpp -lsimdjson && ./linkandrun jsonexamples/twitter.json + cmake_installed_test_cxx20: # assuming that it was installed, this tries to build using C++20 + steps: + - run: echo -e '#include \nint main(int argc,char**argv) {simdjson::dom::parser parser;simdjson::dom::element tweets = parser.load(argv[1]); }' > tmp.cpp && c++ -Ibuild/destination/include -Lbuild/destination/lib -std=c++20 -Wl,-rpath,build/destination/lib -o linkandrun tmp.cpp -lsimdjson && ./linkandrun jsonexamples/twitter.json + jobs: # static @@ -108,12 +112,12 @@ jobs: description: Build just the library, install it and do a basic test executor: gcc10 environment: { CMAKE_FLAGS: -DSIMDJSON_JUST_LIBRARY=ON } - steps: [ cmake_build, cmake_install_test ] + steps: [ cmake_build, cmake_install_test, cmake_installed_test_cxx20 ] gcc10: description: Build and run tests on GCC 10 and AVX 2 with a cmake static build, this test performance regression executor: gcc10 environment: { CMAKE_FLAGS: -DSIMDJSON_GOOGLE_BENCHMARKS=ON -DSIMDJSON_BUILD_STATIC=ON } - steps: [ cmake_test_all, cmake_install_test ] + steps: [ cmake_test_all, 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 @@ -123,13 +127,13 @@ jobs: description: Build and run tests on clang 10 and AVX 2 with a cmake static build executor: clang10 environment: { CMAKE_FLAGS: -DSIMDJSON_GOOGLE_BENCHMARKS=ON -DSIMDJSON_BUILD_STATIC=ON } - steps: [ cmake_test, cmake_install_test ] + steps: [ cmake_test, cmake_install_test, cmake_installed_test_cxx20 ] # libcpp libcpp-clang10: description: Build and run tests on clang 10 and AVX 2 with a cmake static build and libc++ executor: clang10 environment: { CMAKE_FLAGS: -DSIMDJSON_USE_LIBCPP=ON -DSIMDJSON_BUILD_STATIC=ON } - steps: [ cmake_test, cmake_install_test ] + steps: [ cmake_test, cmake_install_test, cmake_installed_test_cxx20 ] # sanitize sanitize-gcc10: description: Build and run tests on GCC 10 and AVX 2 with a cmake sanitize build