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 :
gcc7 :
2019-07-05 05:58:45 +08:00
docker :
2019-08-15 04:19:55 +08:00
- image : gcc:7
2019-07-05 05:58:45 +08:00
environment :
2019-08-15 04:19:55 +08:00
CXX : g++
2020-04-17 08:49:54 +08:00
haswell-gcc7 :
docker :
- image : gcc:7
environment :
CXX : g++
CMAKE_IMPLEMENTATION_FLAGS : -DSIMDJSON_IMPLEMENTATION_HASWELL=ON -DSIMDJSON_IMPLEMENTATION_WESTMERE=OFF -DSIMDJSON_IMPLEMENTATION_FALLBACK=OFF -DSIMDJSON_IMPLEMENTATION_ARM64=OFF
westmere-gcc7 :
docker :
- image : gcc:7
environment :
CXX : g++
CMAKE_IMPLEMENTATION_FLAGS : -DSIMDJSON_IMPLEMENTATION_HASWELL=OFF -DSIMDJSON_IMPLEMENTATION_WESTMERE=ON -DSIMDJSON_IMPLEMENTATION_FALLBACK=OFF -DSIMDJSON_IMPLEMENTATION_ARM64=OFF
fallback-gcc7 :
docker :
- image : gcc:7
environment :
CXX : g++
CMAKE_IMPLEMENTATION_FLAGS : -DSIMDJSON_IMPLEMENTATION_HASWELL=OFF -DSIMDJSON_IMPLEMENTATION_WESTMERE=OFF -DSIMDJSON_IMPLEMENTATION_FALLBACK=ON -DSIMDJSON_IMPLEMENTATION_ARM64=OFF
2020-03-27 00:03:49 +08:00
gcc8 :
docker :
- image : gcc:8
environment :
CXX : g++
2020-04-17 08:49:54 +08:00
haswell-gcc8 :
docker :
- image : gcc:8
environment :
CXX : g++
CMAKE_IMPLEMENTATION_FLAGS : -DSIMDJSON_IMPLEMENTATION_HASWELL=ON -DSIMDJSON_IMPLEMENTATION_WESTMERE=OFF -DSIMDJSON_IMPLEMENTATION_FALLBACK=OFF -DSIMDJSON_IMPLEMENTATION_ARM64=OFF
2020-03-26 23:44:26 +08:00
gcc9 :
docker :
- image : gcc:9
environment :
CXX : g++
2020-04-17 08:49:54 +08:00
haswell-gcc9 :
docker :
- image : gcc:9
environment :
CXX : g++
CMAKE_IMPLEMENTATION_FLAGS : -DSIMDJSON_IMPLEMENTATION_HASWELL=ON -DSIMDJSON_IMPLEMENTATION_WESTMERE=OFF -DSIMDJSON_IMPLEMENTATION_FALLBACK=OFF -DSIMDJSON_IMPLEMENTATION_ARM64=OFF
2019-08-15 04:19:55 +08:00
clang6 :
2019-02-26 03:38:06 +08:00
docker :
- image : ubuntu:18.04
environment :
CXX : clang++-6.0
2020-04-17 08:49:54 +08:00
haswell-clang6 :
docker :
- image : ubuntu:18.04
environment :
CXX : clang++-6.0
CMAKE_IMPLEMENTATION_FLAGS : -DSIMDJSON_IMPLEMENTATION_HASWELL=ON -DSIMDJSON_IMPLEMENTATION_WESTMERE=OFF -DSIMDJSON_IMPLEMENTATION_FALLBACK=OFF -DSIMDJSON_IMPLEMENTATION_ARM64=OFF
westmere-clang6 :
docker :
- image : ubuntu:18.04
environment :
CXX : clang++-6.0
CMAKE_IMPLEMENTATION_FLAGS : -DSIMDJSON_IMPLEMENTATION_HASWELL=OFF -DSIMDJSON_IMPLEMENTATION_WESTMERE=ON -DSIMDJSON_IMPLEMENTATION_FALLBACK=OFF -DSIMDJSON_IMPLEMENTATION_ARM64=OFF
fallback-clang6 :
docker :
- image : ubuntu:18.04
environment :
CXX : clang++-6.0
CMAKE_IMPLEMENTATION_FLAGS : -DSIMDJSON_IMPLEMENTATION_HASWELL=OFF -DSIMDJSON_IMPLEMENTATION_WESTMERE=OFF -DSIMDJSON_IMPLEMENTATION_FALLBACK=ON -DSIMDJSON_IMPLEMENTATION_ARM64=OFF
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 :
init_clang6 :
steps :
2019-08-15 06:47:20 +08:00
- run : apt-get update -qq
2019-08-15 04:19:55 +08:00
- run : apt-get install -y clang build-essential git
2020-04-17 08:49:54 +08:00
2019-08-15 04:19:55 +08:00
make_test :
2020-03-27 00:03:49 +08:00
steps :
- checkout
- run : make
- run : make amalgamate
- run : make test
- run : make checkperf
2020-01-28 00:25:23 +08:00
2020-04-03 03:18:58 +08:00
cmake_simple_test : # this version just builds and test
2019-08-15 04:19:55 +08:00
steps :
- run : apt-get update -qq
- run : apt-get install -y cmake
- checkout
2020-04-17 08:49:54 +08:00
- run : cmake $CMAKE_FLAGS $CMAKE_IMPLEMENTATION_FLAGS
2020-04-03 03:18:58 +08:00
- run : make all
2020-04-17 08:49:54 +08:00
- run : ctest --output-on-failure
2019-08-10 05:26:05 +08:00
2020-04-06 07:43:37 +08:00
cmake_test : # this version builds, install, test and then verify from the installation
2020-04-03 03:18:58 +08:00
steps :
- run : apt-get update -qq
- run : apt-get install -y cmake
- checkout
2020-04-17 08:49:54 +08:00
- run : cmake $CMAKE_FLAGS $CMAKE_IMPLEMENTATION_FLAGS -DCMAKE_INSTALL_PREFIX:PATH=destination
2020-04-03 03:18:58 +08:00
- run : make all install
2020-04-17 08:49:54 +08:00
- run : ctest --output-on-failure
2020-04-03 03:18:58 +08:00
- 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++ -Idestination/include -Ldestination/lib -std=c++17 -Wl,-rpath,destination/lib -o linkandrun tmp.cpp -lsimdjson && ./linkandrun jsonexamples/twitter.json # we not only want cmake to build and run tests, but we want also a succesful installation from which we can build, link and run programs
2019-08-15 06:47:20 +08:00
jobs :
2020-04-17 08:49:54 +08:00
#
# Generic
#
2019-11-23 04:51:46 +08:00
2020-04-17 08:49:54 +08:00
# make (test and checkperf)
gcc9 :
description : Build, run tests and check performance on GCC 7
2020-03-27 00:03:49 +08:00
executor : gcc9
2020-04-17 08:49:54 +08:00
environment : { EXTRAFLAGS : -Werror }
steps : [ make_test ]
clang6 :
description : Build, run tests and check performance on clang 6 and AVX 2
executor : clang6
environment : { EXTRAFLAGS : -Werror }
steps : [ init_clang6, make_test ]
arch-haswell-gcc7 :
description : Build, run tests and check performance on GCC 7 with -march=haswell
2019-08-15 06:47:20 +08:00
executor : gcc7
2020-04-17 08:49:54 +08:00
environment : { ARCHFLAGS : -march=haswell }
2019-08-15 06:47:20 +08:00
steps : [ make_test ]
2020-04-17 08:49:54 +08:00
arch-nehalem-gcc7 :
description : Build, run tests and check performance on GCC 7 with -march=nehalem
2019-08-15 06:47:20 +08:00
executor : gcc7
2020-04-17 08:49:54 +08:00
environment : { ARCHFLAGS : -march=nehalem }
steps : [ make_test ]
no-computed-goto-gcc7 :
description : Build, run tests and check performance on GCC 7 with -DSIMDJSON_NO_COMPUTED_GOTO=true
2019-08-15 06:47:20 +08:00
executor : gcc7
2020-04-17 08:49:54 +08:00
environment : { EXTRAFLAGS : -DSIMDJSON_NO_COMPUTED_GOTO=true }
steps : [ make_test ]
noexcept-gcc7 :
description : Build and run tests on GCC 7 and AVX 2 with exceptions off
2020-03-13 05:48:30 +08:00
executor : gcc7
2020-04-17 08:49:54 +08:00
environment : { CMAKE_FLAGS : -DSIMDJSON_EXCEPTIONS=OFF }
2020-03-13 05:48:30 +08:00
steps : [ cmake_test ]
2020-04-17 08:49:54 +08:00
noexcept-clang6 :
description : Build and run tests on GCC 7 and AVX 2 with exceptions off
executor : clang6
environment : { CMAKE_FLAGS : -DSIMDJSON_EXCEPTIONS=OFF }
steps : [ init_clang6, cmake_test ]
#
# Haswell
#
2019-08-15 06:47:20 +08:00
2020-04-17 08:49:54 +08:00
# static
haswell-gcc7 :
description : Build and run tests on GCC 7 and AVX 2 with a cmake static build
executor : haswell-gcc7
environment : { CMAKE_FLAGS : -DSIMDJSON_GOOGLE_BENCHMARKS=ON }
2019-08-15 06:47:20 +08:00
steps : [ cmake_test ]
2020-04-17 08:49:54 +08:00
haswell-clang6 :
description : Build and run tests on clang 6 and AVX 2 with a cmake static build
executor : haswell-clang6
environment : { CMAKE_FLAGS : -DSIMDJSON_GOOGLE_BENCHMARKS=ON }
steps : [ init_clang6, cmake_test ]
haswell-gcc8 :
description : Build and run tests on GCC 8 and AVX 2
executor : haswell-gcc8
environment : { CMAKE_FLAGS : -DSIMDJSON_GOOGLE_BENCHMARKS=ON }
2019-08-15 06:47:20 +08:00
steps : [ cmake_test ]
2020-04-17 08:49:54 +08:00
haswell-gcc9 :
description : Build and run tests on GCC 9 and AVX 2
executor : haswell-gcc9
environment : { EXTRAFLAGS : -DSIMDJSON_GOOGLE_BENCHMARKS=ON }
steps : [ cmake_test ]
# sanitize
haswell-sanitize-gcc7 :
description : Build and run tests on GCC 7 and AVX 2 with a cmake sanitize build
executor : haswell-gcc7
environment : { CMAKE_FLAGS : -DSIMDJSON_BUILD_STATIC=OFF -DSIMDJSON_SANITIZE=ON }
2020-04-03 03:18:58 +08:00
steps : [ cmake_simple_test ]
2020-04-17 08:49:54 +08:00
haswell-sanitize-clang6 :
description : Build and run tests on clang 6 and AVX 2 with a cmake sanitize build
executor : haswell-clang6
environment : { CMAKE_FLAGS : -DSIMDJSON_BUILD_STATIC=OFF -DSIMDJSON_SANITIZE=ON }
steps : [ init_clang6, cmake_simple_test ]
# dynamic
haswell-dynamic-gcc7 :
description : Build and run tests on GCC 7 and AVX 2 with a cmake dynamic build
executor : haswell-gcc7
environment : { CMAKE_FLAGS : -DSIMDJSON_BUILD_STATIC=OFF }
steps : [ cmake_test ]
haswell-dynamic-clang6 :
description : Build and run tests on clang 6 and AVX 2 with a cmake dynamic build
executor : haswell-clang6
environment : { CMAKE_FLAGS : -DSIMDJSON_BUILD_STATIC=OFF }
2019-08-15 06:47:20 +08:00
steps : [ init_clang6, cmake_test ]
2020-04-17 08:49:54 +08:00
# unthreaded
haswell-unthreaded-gcc7 :
description : Build and run tests on GCC 7 and AVX 2 *without* threads
executor : haswell-gcc7
environment : { CMAKE_FLAGS : -DSIMDJSON_ENABLE_THREADS=OFF }
steps : [ cmake_test ]
haswell-unthreaded-clang6 :
description : Build and run tests on Clang 6 and AVX 2 *without* threads
executor : haswell-clang6
environment : { CMAKE_FLAGS : -DSIMDJSON_ENABLE_THREADS=OFF }
2019-08-15 06:47:20 +08:00
steps : [ init_clang6, cmake_test ]
2020-04-17 08:49:54 +08:00
#
# Westmere
#
# static
westmere-gcc7 :
description : Build and run tests on GCC 7 and SSE 4.2 with a cmake static build
executor : westmere-gcc7
environment : { CMAKE_FLAGS : -DSIMDJSON_GOOGLE_BENCHMARKS=ON }
steps : [ cmake_test ]
westmere-clang6 :
description : Build and run tests on Clang 6 and SSE 4.2 with a cmake static build
executor : westmere-clang6
environment : { CMAKE_FLAGS : -DSIMDJSON_GOOGLE_BENCHMARKS=ON }
2020-03-13 05:48:30 +08:00
steps : [ init_clang6, cmake_test ]
2020-04-17 08:49:54 +08:00
# sanitize
westmere-sanitize-gcc7 :
description : Build and run tests on GCC 7 and SSE 4.2 with a cmake sanitize build
executor : westmere-gcc7
environment : { CMAKE_FLAGS : -DSIMDJSON_BUILD_STATIC=OFF -DSIMDJSON_SANITIZE=ON }
steps : [ cmake_simple_test ]
westmere-sanitize-clang6 :
description : Build and run tests on Clang 6 and SSE 4.2 with a cmake sanitize build
executor : westmere-clang6
environment : { CMAKE_FLAGS : -DSIMDJSON_BUILD_STATIC=OFF -DSIMDJSON_SANITIZE=ON }
2020-04-03 03:18:58 +08:00
steps : [ init_clang6, cmake_simple_test ]
2020-04-17 08:49:54 +08:00
#
# Fallback
#
2019-08-15 06:47:20 +08:00
2020-04-17 08:49:54 +08:00
# static
fallback-gcc7 :
description : Build and run tests on GCC 7 and fallback implementation with a cmake static build
executor : fallback-gcc7
steps : [ cmake_test ]
fallback-clang6 :
description : Build and run tests on Clang 6 and fallback implementation with a cmake static build
executor : fallback-clang6
environment : { CMAKE_FLAGS : -DSIMDJSON_GOOGLE_BENCHMARKS=ON }
2019-08-15 06:47:20 +08:00
steps : [ init_clang6, cmake_test ]
2020-04-17 08:49:54 +08:00
# sanitize
fallback-sanitize-gcc7 :
description : Build and run tests on GCC 7 and fallback implementation with a cmake sanitize build
executor : fallback-gcc7
environment : { CMAKE_FLAGS : -DSIMDJSON_BUILD_STATIC=OFF -DSIMDJSON_SANITIZE=ON }
steps : [ cmake_simple_test ]
fallback-sanitize-clang6 :
description : Build and run tests on Clang 6 and fallback implementation with a cmake sanitize build
executor : fallback-clang6
environment : { CMAKE_FLAGS : -DSIMDJSON_BUILD_STATIC=OFF -DSIMDJSON_SANITIZE=ON }
2020-04-03 03:18:58 +08:00
steps : [ init_clang6, cmake_simple_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-17 08:49:54 +08:00
- gcc9
- haswell-gcc7
- westmere-gcc7
- fallback-gcc7
- clang6
- haswell-clang6
- westmere-clang6
- fallback-clang6
- haswell-dynamic-gcc7
- haswell-dynamic-clang6
- haswell-unthreaded-gcc7
- haswell-unthreaded-clang6
- haswell-sanitize-gcc7
- haswell-sanitize-clang6
- westmere-sanitize-gcc7
- westmere-sanitize-clang6
- fallback-sanitize-gcc7
- fallback-sanitize-clang6
- noexcept-gcc7
- noexcept-clang6
- haswell-gcc8
- haswell-gcc9
- arch-haswell-gcc7
- arch-nehalem-gcc7
- no -computed-goto-gcc7
2019-08-15 04:19:55 +08:00
# TODO add windows: https://circleci.com/docs/2.0/configuration-reference/#windows