simdjson/.circleci/config.yml

307 lines
11 KiB
YAML
Raw Normal View History

2019-08-15 04:19:55 +08:00
version: 2.1
2019-08-15 06:47:20 +08:00
# Reusable image / compiler definitions
2019-08-15 04:19:55 +08:00
executors:
gcc7:
docker:
2019-08-15 04:19:55 +08:00
- image: gcc:7
environment:
2019-08-15 04:19:55 +08:00
CXX: g++
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
gcc8:
docker:
- image: gcc:8
environment:
CXX: g++
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++
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:
docker:
- image: ubuntu:18.04
environment:
CXX: clang++-6.0
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
2019-08-15 04:19:55 +08:00
make_test:
steps:
- checkout
- run: make
- run: make amalgamate
- run: make test
- run: make checkperf
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
- run: cmake $CMAKE_FLAGS $CMAKE_IMPLEMENTATION_FLAGS
- run: make all
- run: ctest --output-on-failure
cmake_test: # this version builds, install, test and then verify from the installation
steps:
- run: apt-get update -qq
- run: apt-get install -y cmake
- checkout
- run: cmake $CMAKE_FLAGS $CMAKE_IMPLEMENTATION_FLAGS -DCMAKE_INSTALL_PREFIX:PATH=destination
- run: make all install
- run: ctest --output-on-failure
- 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:
#
# Generic
#
# make (test and checkperf)
gcc9:
description: Build, run tests and check performance on GCC 7
executor: gcc9
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
environment: { ARCHFLAGS: -march=haswell }
2019-08-15 06:47:20 +08:00
steps: [ make_test ]
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
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
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
executor: gcc7
environment: { CMAKE_FLAGS: -DSIMDJSON_EXCEPTIONS=OFF }
steps: [ cmake_test ]
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
# 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 ]
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 ]
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 }
steps: [ cmake_simple_test ]
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 ]
# 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 ]
#
# 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 }
steps: [ init_clang6, cmake_test ]
# 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 }
steps: [ init_clang6, cmake_simple_test ]
#
# Fallback
#
2019-08-15 06:47:20 +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 ]
# 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 }
steps: [ init_clang6, cmake_simple_test ]
2019-08-15 06:47:20 +08:00
workflows:
2019-08-15 04:19:55 +08:00
version: 2.1
build_and_test:
jobs:
- 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