2019-08-15 04:19:55 +08:00
|
|
|
version: 2.1
|
2019-08-16 08:43:21 +08:00
|
|
|
|
2019-08-15 06:47:20 +08:00
|
|
|
# Reusable image / compiler definitions
|
2019-08-15 04:19:55 +08:00
|
|
|
executors:
|
2020-03-27 00:03:49 +08:00
|
|
|
gcc8:
|
|
|
|
docker:
|
2020-05-01 05:13:51 +08:00
|
|
|
- image: conanio/gcc8
|
2020-03-27 00:03:49 +08:00
|
|
|
environment:
|
2020-05-01 05:13:51 +08:00
|
|
|
CXX: g++-8
|
|
|
|
CC: gcc-8
|
2020-04-20 01:02:47 +08:00
|
|
|
BUILD_FLAGS: -j
|
2020-04-19 05:45:47 +08:00
|
|
|
CTEST_FLAGS: -j4 --output-on-failure
|
2020-04-17 08:49:54 +08:00
|
|
|
|
2020-03-26 23:44:26 +08:00
|
|
|
gcc9:
|
|
|
|
docker:
|
2020-05-01 05:13:51 +08:00
|
|
|
- image: conanio/gcc9
|
2020-03-26 23:44:26 +08:00
|
|
|
environment:
|
2020-05-01 05:13:51 +08:00
|
|
|
CXX: g++-9
|
|
|
|
CC: gcc-9
|
2020-04-20 01:02:47 +08:00
|
|
|
BUILD_FLAGS: -j
|
2020-04-19 05:45:47 +08:00
|
|
|
CTEST_FLAGS: -j4 --output-on-failure
|
2020-05-01 05:13:51 +08:00
|
|
|
|
2020-06-13 05:58:53 +08:00
|
|
|
gcc10:
|
|
|
|
docker:
|
|
|
|
- image: conanio/gcc10
|
|
|
|
environment:
|
|
|
|
CXX: g++-10
|
|
|
|
CC: gcc-10
|
|
|
|
BUILD_FLAGS: -j
|
|
|
|
CTEST_FLAGS: -j4 --output-on-failure
|
|
|
|
|
|
|
|
clang10:
|
|
|
|
docker:
|
|
|
|
- image: conanio/clang10
|
|
|
|
environment:
|
|
|
|
CXX: clang++-10
|
|
|
|
CC: clang-10
|
|
|
|
BUILD_FLAGS: -j
|
|
|
|
CTEST_FLAGS: -j4 --output-on-failure
|
|
|
|
|
2020-04-23 09:24:42 +08:00
|
|
|
clang9:
|
|
|
|
docker:
|
|
|
|
- image: conanio/clang9
|
|
|
|
environment:
|
|
|
|
CXX: clang++-9
|
2020-05-01 05:13:51 +08:00
|
|
|
CC: clang-9
|
2020-04-23 09:24:42 +08:00
|
|
|
BUILD_FLAGS: -j
|
|
|
|
CTEST_FLAGS: -j4 --output-on-failure
|
2020-04-17 08:49:54 +08:00
|
|
|
|
2019-08-15 04:19:55 +08:00
|
|
|
clang6:
|
2019-02-26 03:38:06 +08:00
|
|
|
docker:
|
2020-05-01 05:13:51 +08:00
|
|
|
- image: conanio/clang60
|
2019-02-26 03:38:06 +08:00
|
|
|
environment:
|
|
|
|
CXX: clang++-6.0
|
2020-05-01 05:13:51 +08:00
|
|
|
CC: clang-6.0
|
2020-04-20 01:02:47 +08:00
|
|
|
BUILD_FLAGS: -j
|
2020-04-19 05:45:47 +08:00
|
|
|
CTEST_FLAGS: -j4 --output-on-failure
|
2020-05-01 05:13:51 +08:00
|
|
|
|
2019-08-15 06:47:20 +08:00
|
|
|
# Reusable test commands (and initializer for clang 6)
|
2019-08-15 04:19:55 +08:00
|
|
|
commands:
|
2020-04-23 09:24:42 +08:00
|
|
|
install_cmake:
|
2019-08-15 04:19:55 +08:00
|
|
|
steps:
|
|
|
|
- run: apt-get update -qq
|
|
|
|
- run: apt-get install -y cmake
|
2020-04-23 09:24:42 +08:00
|
|
|
|
|
|
|
cmake_prep:
|
|
|
|
steps:
|
2019-08-15 04:19:55 +08:00
|
|
|
- checkout
|
2020-06-13 05:57:45 +08:00
|
|
|
- run: mkdir -p build
|
2019-08-10 05:26:05 +08:00
|
|
|
|
2020-04-19 08:10:54 +08:00
|
|
|
cmake_build:
|
2020-04-03 03:18:58 +08:00
|
|
|
steps:
|
2020-04-19 08:10:54 +08:00
|
|
|
- cmake_prep
|
2020-06-13 05:57:45 +08:00
|
|
|
- run: |
|
|
|
|
cd build &&
|
|
|
|
cmake $CMAKE_FLAGS -DCMAKE_INSTALL_PREFIX:PATH=destination .. &&
|
2020-06-22 02:20:58 +08:00
|
|
|
make $BUILD_FLAGS all
|
2020-04-03 03:18:58 +08:00
|
|
|
|
2020-04-19 08:10:54 +08:00
|
|
|
cmake_test:
|
|
|
|
steps:
|
|
|
|
- cmake_build
|
2020-06-13 05:57:45 +08:00
|
|
|
- run: |
|
2020-06-22 02:20:58 +08:00
|
|
|
cd build && tools/json2json -h &&
|
2020-06-13 05:57:45 +08:00
|
|
|
ctest $CTEST_FLAGS -L acceptance &&
|
|
|
|
ctest $CTEST_FLAGS -LE acceptance -E checkperf
|
2019-08-15 06:47:20 +08:00
|
|
|
|
2020-04-19 08:10:54 +08:00
|
|
|
cmake_test_all:
|
|
|
|
steps:
|
|
|
|
- cmake_build
|
2020-06-13 05:57:45 +08:00
|
|
|
- run: |
|
2020-06-22 02:20:58 +08:00
|
|
|
cd build && tools/json2json -h &&
|
2020-06-13 05:57:45 +08:00
|
|
|
ctest $CTEST_FLAGS -L acceptance -LE per_implementation &&
|
|
|
|
SIMDJSON_FORCE_IMPLEMENTATION=haswell ctest $CTEST_FLAGS -L per_implementation &&
|
|
|
|
SIMDJSON_FORCE_IMPLEMENTATION=westmere ctest $CTEST_FLAGS -L per_implementation &&SIMDJSON_FORCE_IMPLEMENTATION=fallback ctest $CTEST_FLAGS -L per_implementation &&
|
|
|
|
ctest $CTEST_FLAGS -LE "acceptance|per_implementation" # Everything we haven't run yet, run now.
|
2020-04-19 08:10:54 +08:00
|
|
|
|
2020-04-23 09:24:42 +08:00
|
|
|
|
2020-04-19 08:10:54 +08:00
|
|
|
# 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:
|
2020-06-13 05:57:45 +08:00
|
|
|
- run: cd build && make install
|
|
|
|
- run: echo -e '#include <simdjson.h>\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
|
2019-11-23 04:51:46 +08:00
|
|
|
|
2020-07-21 22:37:52 +08:00
|
|
|
cmake_installed_test_cxx20: # assuming that it was installed, this tries to build using C++20
|
|
|
|
steps:
|
|
|
|
- run: echo -e '#include <simdjson.h>\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
|
|
|
|
|
2020-04-19 08:10:54 +08:00
|
|
|
jobs:
|
2019-08-15 06:47:20 +08:00
|
|
|
|
2020-04-17 08:49:54 +08:00
|
|
|
# static
|
2020-06-22 02:40:38 +08:00
|
|
|
justlib-gcc10:
|
2020-06-22 02:20:58 +08:00
|
|
|
description: Build just the library, install it and do a basic test
|
|
|
|
executor: gcc10
|
2020-06-29 00:25:17 +08:00
|
|
|
environment: { CMAKE_FLAGS: -DSIMDJSON_JUST_LIBRARY=ON }
|
2020-07-21 22:37:52 +08:00
|
|
|
steps: [ cmake_build, cmake_install_test, cmake_installed_test_cxx20 ]
|
2020-06-13 05:58:53 +08:00
|
|
|
gcc10:
|
2020-06-25 03:28:28 +08:00
|
|
|
description: Build and run tests on GCC 10 and AVX 2 with a cmake static build, this test performance regression
|
2020-06-13 05:58:53 +08:00
|
|
|
executor: gcc10
|
2020-06-24 06:40:57 +08:00
|
|
|
environment: { CMAKE_FLAGS: -DSIMDJSON_GOOGLE_BENCHMARKS=ON -DSIMDJSON_BUILD_STATIC=ON }
|
2020-07-21 22:37:52 +08:00
|
|
|
steps: [ cmake_test_all, cmake_install_test, cmake_installed_test_cxx20 ]
|
2020-04-19 08:10:54 +08:00
|
|
|
clang6:
|
2020-04-17 08:49:54 +08:00
|
|
|
description: Build and run tests on clang 6 and AVX 2 with a cmake static build
|
2020-04-19 08:10:54 +08:00
|
|
|
executor: clang6
|
2020-06-24 06:40:57 +08:00
|
|
|
environment: { CMAKE_FLAGS: -DSIMDJSON_GOOGLE_BENCHMARKS=ON -DSIMDJSON_BUILD_STATIC=ON }
|
2020-06-13 05:58:53 +08:00
|
|
|
steps: [ cmake_test, cmake_install_test ]
|
|
|
|
clang10:
|
|
|
|
description: Build and run tests on clang 10 and AVX 2 with a cmake static build
|
|
|
|
executor: clang10
|
2020-06-24 06:40:57 +08:00
|
|
|
environment: { CMAKE_FLAGS: -DSIMDJSON_GOOGLE_BENCHMARKS=ON -DSIMDJSON_BUILD_STATIC=ON }
|
2020-07-21 22:37:52 +08:00
|
|
|
steps: [ cmake_test, cmake_install_test, cmake_installed_test_cxx20 ]
|
2020-04-23 09:24:42 +08:00
|
|
|
# libcpp
|
2020-06-13 05:58:53 +08:00
|
|
|
libcpp-clang10:
|
|
|
|
description: Build and run tests on clang 10 and AVX 2 with a cmake static build and libc++
|
|
|
|
executor: clang10
|
2020-06-24 06:40:57 +08:00
|
|
|
environment: { CMAKE_FLAGS: -DSIMDJSON_USE_LIBCPP=ON -DSIMDJSON_BUILD_STATIC=ON }
|
2020-07-21 22:37:52 +08:00
|
|
|
steps: [ cmake_test, cmake_install_test, cmake_installed_test_cxx20 ]
|
2020-04-17 08:49:54 +08:00
|
|
|
# sanitize
|
2020-06-13 05:58:53 +08:00
|
|
|
sanitize-gcc10:
|
|
|
|
description: Build and run tests on GCC 10 and AVX 2 with a cmake sanitize build
|
|
|
|
executor: gcc10
|
2020-04-17 09:49:10 +08:00
|
|
|
environment: { CMAKE_FLAGS: -DSIMDJSON_BUILD_STATIC=OFF -DSIMDJSON_SANITIZE=ON, BUILD_FLAGS: "", CTEST_FLAGS: -j4 --output-on-failure -E checkperf }
|
2020-06-13 05:58:53 +08:00
|
|
|
steps: [ cmake_test ]
|
|
|
|
sanitize-clang10:
|
|
|
|
description: Build and run tests on clang 10 and AVX 2 with a cmake sanitize build
|
|
|
|
executor: clang10
|
2020-04-21 02:22:15 +08:00
|
|
|
environment: { CMAKE_FLAGS: -DSIMDJSON_BUILD_STATIC=OFF -DSIMDJSON_SANITIZE=ON, CTEST_FLAGS: -j4 --output-on-failure -E checkperf }
|
2020-06-13 05:58:53 +08:00
|
|
|
steps: [ cmake_test ]
|
2020-06-24 06:40:57 +08:00
|
|
|
|
2020-04-17 08:49:54 +08:00
|
|
|
# dynamic
|
2020-06-13 05:58:53 +08:00
|
|
|
dynamic-gcc10:
|
|
|
|
description: Build and run tests on GCC 10 and AVX 2 with a cmake dynamic build
|
|
|
|
executor: gcc10
|
2020-04-17 08:49:54 +08:00
|
|
|
environment: { CMAKE_FLAGS: -DSIMDJSON_BUILD_STATIC=OFF }
|
2020-05-01 05:13:51 +08:00
|
|
|
steps: [ cmake_test, cmake_install_test ]
|
2020-06-13 05:58:53 +08:00
|
|
|
dynamic-clang10:
|
|
|
|
description: Build and run tests on clang 10 and AVX 2 with a cmake dynamic build
|
|
|
|
executor: clang10
|
2020-04-17 08:49:54 +08:00
|
|
|
environment: { CMAKE_FLAGS: -DSIMDJSON_BUILD_STATIC=OFF }
|
2020-05-01 05:13:51 +08:00
|
|
|
steps: [ cmake_test, cmake_install_test ]
|
2020-06-24 06:40:57 +08:00
|
|
|
|
2020-04-17 08:49:54 +08:00
|
|
|
# unthreaded
|
2020-06-13 05:58:53 +08:00
|
|
|
unthreaded-gcc10:
|
|
|
|
description: Build and run tests on GCC 10 and AVX 2 *without* threads
|
|
|
|
executor: gcc10
|
2020-04-17 08:49:54 +08:00
|
|
|
environment: { CMAKE_FLAGS: -DSIMDJSON_ENABLE_THREADS=OFF }
|
2020-05-01 05:13:51 +08:00
|
|
|
steps: [ cmake_test, cmake_install_test ]
|
2020-06-13 05:58:53 +08:00
|
|
|
unthreaded-clang10:
|
|
|
|
description: Build and run tests on Clang 10 and AVX 2 *without* threads
|
|
|
|
executor: clang10
|
2020-04-17 08:49:54 +08:00
|
|
|
environment: { CMAKE_FLAGS: -DSIMDJSON_ENABLE_THREADS=OFF }
|
2020-05-01 05:13:51 +08:00
|
|
|
steps: [ cmake_test, cmake_install_test ]
|
2020-04-17 08:49:54 +08:00
|
|
|
|
2020-04-19 08:10:54 +08:00
|
|
|
# noexcept
|
2020-06-13 05:58:53 +08:00
|
|
|
noexcept-gcc10:
|
|
|
|
description: Build and run tests on GCC 10 and AVX 2 with exceptions off
|
|
|
|
executor: gcc10
|
2020-04-19 08:10:54 +08:00
|
|
|
environment: { CMAKE_FLAGS: -DSIMDJSON_EXCEPTIONS=OFF }
|
2020-05-01 05:13:51 +08:00
|
|
|
steps: [ cmake_test, cmake_install_test ]
|
2020-06-13 05:58:53 +08:00
|
|
|
noexcept-clang10:
|
|
|
|
description: Build and run tests on Clang 10 and AVX 2 with exceptions off
|
|
|
|
executor: clang10
|
2020-04-19 08:10:54 +08:00
|
|
|
environment: { CMAKE_FLAGS: -DSIMDJSON_EXCEPTIONS=OFF }
|
2020-05-01 05:13:51 +08:00
|
|
|
steps: [ cmake_test, cmake_install_test ]
|
2020-04-17 08:49:54 +08:00
|
|
|
|
|
|
|
#
|
2020-04-19 08:10:54 +08:00
|
|
|
# Misc.
|
2020-04-17 08:49:54 +08:00
|
|
|
#
|
2019-08-15 06:47:20 +08:00
|
|
|
|
2020-04-19 08:10:54 +08:00
|
|
|
# make (test and checkperf)
|
2020-06-13 05:58:53 +08:00
|
|
|
arch-haswell-gcc10:
|
2020-04-19 08:10:54 +08:00
|
|
|
description: Build, run tests and check performance on GCC 7 with -march=haswell
|
2020-06-13 05:58:53 +08:00
|
|
|
executor: gcc10
|
2020-04-24 07:09:44 +08:00
|
|
|
environment: { CXXFLAGS: -march=haswell }
|
2020-05-01 05:13:51 +08:00
|
|
|
steps: [ cmake_test ]
|
2020-06-13 05:58:53 +08:00
|
|
|
arch-nehalem-gcc10:
|
2020-04-19 08:10:54 +08:00
|
|
|
description: Build, run tests and check performance on GCC 7 with -march=nehalem
|
2020-06-13 05:58:53 +08:00
|
|
|
executor: gcc10
|
2020-04-24 07:09:44 +08:00
|
|
|
environment: { CXXFLAGS: -march=nehalem }
|
2020-05-01 05:13:51 +08:00
|
|
|
steps: [ cmake_test ]
|
2020-06-13 05:58:53 +08:00
|
|
|
no-computed-goto-gcc10:
|
2020-04-19 08:10:54 +08:00
|
|
|
description: Build, run tests and check performance on GCC 7 with -DSIMDJSON_NO_COMPUTED_GOTO=true
|
2020-06-13 05:58:53 +08:00
|
|
|
executor: gcc10
|
2020-04-24 07:09:44 +08:00
|
|
|
environment: { CXXFLAGS: -DSIMDJSON_NO_COMPUTED_GOTO=true }
|
2020-05-01 05:13:51 +08:00
|
|
|
steps: [ cmake_test ]
|
2019-08-15 06:47:20 +08:00
|
|
|
|
2019-02-26 03:38:06 +08:00
|
|
|
workflows:
|
2019-08-15 04:19:55 +08:00
|
|
|
version: 2.1
|
2019-02-26 03:38:06 +08:00
|
|
|
build_and_test:
|
|
|
|
jobs:
|
2020-04-19 08:10:54 +08:00
|
|
|
# full multi-implementation tests
|
2020-07-21 05:49:55 +08:00
|
|
|
#- gcc7 tested on GitHub actions
|
2020-06-25 03:28:28 +08:00
|
|
|
- gcc10 # do not delete this as it tests our performance
|
2020-04-17 08:49:54 +08:00
|
|
|
- clang6
|
2020-06-13 05:58:53 +08:00
|
|
|
#- clang10 # this gets tested a lot below
|
2020-06-24 06:40:57 +08:00
|
|
|
|
2020-04-23 09:24:42 +08:00
|
|
|
# libc++
|
2020-06-13 05:58:53 +08:00
|
|
|
- libcpp-clang10
|
2020-06-24 06:40:57 +08:00
|
|
|
|
2020-04-19 08:10:54 +08:00
|
|
|
# full single-implementation tests
|
2020-06-13 05:58:53 +08:00
|
|
|
- sanitize-gcc10
|
|
|
|
- sanitize-clang10
|
|
|
|
- dynamic-gcc10
|
|
|
|
- dynamic-clang10
|
|
|
|
- unthreaded-gcc10
|
|
|
|
- unthreaded-clang10
|
|
|
|
|
|
|
|
# no exceptions
|
|
|
|
- noexcept-gcc10
|
|
|
|
- noexcept-clang10
|
2020-04-17 08:49:54 +08:00
|
|
|
|
2020-04-19 08:10:54 +08:00
|
|
|
# quicker make single-implementation tests
|
2020-06-13 05:58:53 +08:00
|
|
|
- arch-haswell-gcc10
|
|
|
|
- arch-nehalem-gcc10
|
|
|
|
- no-computed-goto-gcc10
|
2020-06-22 02:40:38 +08:00
|
|
|
|
|
|
|
# testing "just the library"
|
|
|
|
- justlib-gcc10
|
2019-08-15 04:19:55 +08:00
|
|
|
|
2020-06-24 06:40:57 +08:00
|
|
|
# TODO add windows: https://circleci.com/docs/2.0/configuration-reference/#windows
|