version: 2.1 # Reusable image / compiler definitions executors: gcc7: docker: - image: gcc:7 environment: CXX: g++ clang6: docker: - image: ubuntu:18.04 environment: CXX: clang++-6.0 # Reusable test commands (and initializer for clang 6) commands: init_clang6: steps: - run: apt-get update -qq - run: apt-get install -y clang build-essential git make_test: steps: - checkout - run: make - run: make amalgamate - run: ARCHFLAGS=-march=haswell make amalgamate # some users do this: https://github.com/lemire/simdjson/issues/444 - run: make test - run: make checkperf - run: make clean - run: ARCHFLAGS=-march=haswell make test # this breaks runtime dispatch, but see https://github.com/lemire/simdjson/issues/444... this is a code robustness test - run: make clean - run: EXTRAFLAGS=-DSIMDJSON_NO_COMPUTED_GOTO=true make test # this should run tests with computed gotos disabled cmake_test: steps: - run: apt-get update -qq - run: apt-get install -y cmake - checkout - run: cmake $CMAKE_TEST_FLAGS - run: make - run: make test jobs: gcc-avx-unthreaded: description: Build, run tests and check performance on GCC 7 and AVX 2 *without* threads executor: gcc7 environment: { CMAKE_TEST_FLAGS: -DSIMDJSON_ENABLE_THREADS=OFF } steps: [ cmake_test ] gcc-avx-threaded: description: Build, run tests and check performance on GCC 7 and AVX 2 with threads executor: gcc7 environment: { CMAKE_TEST_FLAGS: -DSIMDJSON_ENABLE_THREADS=ON } steps: [ cmake_test ] clang-avx-unthreaded: description: Build, run tests and check performance on Clang 6 and AVX 2 *without* threads executor: clang6 environment: { CMAKE_TEST_FLAGS: -DSIMDJSON_ENABLE_THREADS=OFF } steps: [ init_clang6, cmake_test ] clang-avx-threaded: description: Build, run tests and check performance on Clang 6 and AVX 2 with threads executor: clang6 environment: { CMAKE_TEST_FLAGS: -DSIMDJSON_ENABLE_THREADS=ON } steps: [ init_clang6, cmake_test ] gcc-avx: description: Build, run tests and check performance on GCC 7 and AVX 2 executor: gcc7 steps: [ make_test ] gcc-avx-dynamic: description: Build, run tests and check performance on GCC 7 and AVX 2 with a cmake dynamic build executor: gcc7 environment: { CMAKE_TEST_FLAGS: -DSIMDJSON_BUILD_STATIC=OFF } steps: [ cmake_test ] gcc-avx-static: description: Build, run tests and check performance on GCC 7 and AVX 2 with a cmake static build executor: gcc7 environment: { CMAKE_TEST_FLAGS: -DSIMDJSON_BUILD_STATIC=ON } steps: [ cmake_test ] gcc-avx-sanitize: description: Build, run tests and check performance on GCC 7 and AVX 2 with a cmake sanitize build executor: gcc7 environment: { CMAKE_TEST_FLAGS: -DSIMDJSON_BUILD_STATIC=OFF -DSIMDJSON_SANITIZE=ON } steps: [ cmake_test ] gcc-sse: description: Build, run tests and check performance on GCC 7 and SSE 4.2 executor: gcc7 environment: { ARCHFLAGS: -march=nehalem } steps: [ make_test ] gcc-sse-dynamic: description: Build, run tests and check performance on GCC 7 and SSE 4.2 with a cmake dynamic build executor: gcc7 environment: { CMAKE_TEST_FLAGS: -DSIMDJSON_BUILD_STATIC=OFF } steps: [ cmake_test ] gcc-sse-static: description: Build, run tests and check performance on GCC 7 and SSE 4.2 with a cmake static build executor: gcc7 environment: { CMAKE_TEST_FLAGS: -DSIMDJSON_BUILD_STATIC=ON } steps: [ cmake_test ] gcc-sse-sanitize: description: Build, run tests and check performance on GCC 7 and SSE 4.2 with a cmake sanitize build executor: gcc7 environment: { CMAKE_TEST_FLAGS: -DSIMDJSON_BUILD_STATIC=OFF -DSIMDJSON_SANITIZE=ON } steps: [ cmake_test ] clang-avx: description: Build, run tests and check performance on clang 6 and AVX 2 executor: clang6 steps: [ init_clang6, make_test ] clang-avx-dynamic: description: Build, run tests and check performance on clang 6 and AVX 2 with a cmake dynamic build executor: clang6 environment: { CMAKE_TEST_FLAGS: -DSIMDJSON_BUILD_STATIC=OFF } steps: [ init_clang6, cmake_test ] clang-avx-static: description: Build, run tests and check performance on clang 6 and AVX 2 with a cmake static build executor: clang6 environment: { CMAKE_TEST_FLAGS: -DSIMDJSON_BUILD_STATIC=ON } steps: [ init_clang6, cmake_test ] clang-avx-sanitize: description: Build, run tests and check performance on clang 6 and AVX 2 with a cmake sanitize build executor: clang6 environment: { CMAKE_TEST_FLAGS: -DSIMDJSON_BUILD_STATIC=OFF -DSIMDJSON_SANITIZE=ON } steps: [ init_clang6, cmake_test ] clang-sse: description: Build, run tests and check performance on Clang 6 and SSE 4.2 executor: clang6 environment: { ARCHFLAGS: -march=nehalem } steps: [ init_clang6, make_test ] clang-sse-dynamic: description: Build, run tests and check performance on Clang 6 and SSE 4.2 with a cmake dynamic build executor: clang6 environment: { CMAKE_TEST_FLAGS: -DSIMDJSON_BUILD_STATIC=OFF } steps: [ init_clang6, cmake_test ] clang-sse-static: description: Build, run tests and check performance on Clang 6 and SSE 4.2 with a cmake static build executor: clang6 environment: { CMAKE_TEST_FLAGS: -DSIMDJSON_BUILD_STATIC=ON } steps: [ init_clang6, cmake_test ] clang-sse-sanitize: description: Build, run tests and check performance on Clang 6 and SSE 4.2 with a cmake sanitize build executor: clang6 environment: { CMAKE_TEST_FLAGS: -DSIMDJSON_BUILD_STATIC=OFF -DSIMDJSON_SANITIZE=ON } steps: [ init_clang6, cmake_test ] workflows: version: 2.1 build_and_test: jobs: - gcc-avx - gcc-avx-dynamic - gcc-avx-static - gcc-avx-sanitize - gcc-sse - gcc-sse-dynamic - gcc-sse-static - gcc-sse-sanitize - clang-avx - clang-avx-dynamic - clang-avx-static - clang-avx-sanitize - clang-sse - clang-sse-dynamic - clang-sse-static - clang-sse-sanitize - gcc-avx-threaded - gcc-avx-unthreaded - clang-avx-threaded - clang-avx-unthreaded # TODO add windows: https://circleci.com/docs/2.0/configuration-reference/#windows