11version : 2.1
22
3+ # Reusable image / compiler definitions
34executors :
45 gcc7 :
56 docker :
@@ -12,90 +13,132 @@ executors:
1213 environment :
1314 CXX : clang++-6.0
1415
16+ # Reusable test commands (and initializer for clang 6)
1517commands :
16- init_gcc7 :
17- steps :
18- - run : echo true
1918 init_clang6 :
2019 steps :
20+ - run : apt-get update -qq
2121 - run : apt-get install -y clang build-essential git
22-
23- jobs :
24-
25- # Parameterized job to run all tests with "make"
2622 make_test :
27- description : Build, run tests and check performance
28- parameters :
29- compiler :
30- description : Compiler
31- type : string
32- archflags :
33- description : Architecture flags (ARCHFLAGS)
34- default : " "
35- type : string
36-
37- executor : << parameters.compiler >>
38-
39- environment :
40- ARCHFLAGS : << parameters.archflags >>
41-
4223 steps :
4324 - checkout
44- - run : apt-get update -qq
45- - init_<< parameters.compiler >>
4625 - run : make
4726 - run : make amalgamate
4827 - run : make test
4928 - run : make checkperf
50-
51- # Parameterized job to run all tests with "cmake"
5229 cmake_test :
53- description : Build, run tests and check performance
54-
55- parameters :
56- compiler :
57- description : Compiler
58- type : string
59- flags :
60- description : flags to pass to cmake
61- default : " "
62- type : string
63-
64- executor : << parameters.compiler >>
65-
6630 steps :
6731 - run : apt-get update -qq
68- - init_<< parameters.compiler >>
6932 - run : apt-get install -y cmake
7033 - checkout
71- - run : cmake << parameters.flags >>
34+ - run : cmake $CMAKE_TEST_FLAGS
7235 - run : make
7336 - run : make test
7437
38+ jobs :
39+
40+ gcc-avx :
41+ description : Build, run tests and check performance on GCC 7 and AVX 2
42+ executor : gcc7
43+ steps : [ make_test ]
44+ gcc-avx-dynamic :
45+ description : Build, run tests and check performance on GCC 7 and AVX 2 with a cmake dynamic build
46+ executor : gcc7
47+ environment : { CMAKE_TEST_FLAGS: -DSIMDJSON_BUILD_STATIC=OFF }
48+ steps : [ cmake_test ]
49+ gcc-avx-static :
50+ description : Build, run tests and check performance on GCC 7 and AVX 2 with a cmake static build
51+ executor : gcc7
52+ environment : { CMAKE_TEST_FLAGS: -DSIMDJSON_BUILD_STATIC=ON }
53+ steps : [ cmake_test ]
54+ gcc-avx-sanitize :
55+ description : Build, run tests and check performance on GCC 7 and AVX 2 with a cmake sanitize build
56+ executor : gcc7
57+ environment : { CMAKE_TEST_FLAGS: -DSIMDJSON_BUILD_STATIC=OFF -DSIMDJSON_SANITIZE=ON }
58+ steps : [ cmake_test ]
59+
60+ gcc-sse :
61+ description : Build, run tests and check performance on GCC 7 and SSE 4.2
62+ executor : gcc7
63+ environment : { ARCHFLAGS: -march=nehalem }
64+ steps : [ make_test ]
65+ gcc-sse-dynamic :
66+ description : Build, run tests and check performance on GCC 7 and SSE 4.2 with a cmake dynamic build
67+ executor : gcc7
68+ environment : { CMAKE_TEST_FLAGS: -DSIMDJSON_BUILD_STATIC=OFF }
69+ steps : [ cmake_test ]
70+ gcc-sse-static :
71+ description : Build, run tests and check performance on GCC 7 and SSE 4.2 with a cmake static build
72+ executor : gcc7
73+ environment : { CMAKE_TEST_FLAGS: -DSIMDJSON_BUILD_STATIC=ON }
74+ steps : [ cmake_test ]
75+ gcc-sse-sanitize :
76+ description : Build, run tests and check performance on GCC 7 and SSE 4.2 with a cmake sanitize build
77+ executor : gcc7
78+ environment : { CMAKE_TEST_FLAGS: -DSIMDJSON_BUILD_STATIC=OFF -DSIMDJSON_SANITIZE=ON }
79+ steps : [ cmake_test ]
80+
81+ clang-avx :
82+ description : Build, run tests and check performance on clang 6 and AVX 2
83+ executor : clang6
84+ steps : [ init_clang6, make_test ]
85+ clang-avx-dynamic :
86+ description : Build, run tests and check performance on clang 6 and AVX 2 with a cmake dynamic build
87+ executor : clang6
88+ environment : { CMAKE_TEST_FLAGS: -DSIMDJSON_BUILD_STATIC=OFF }
89+ steps : [ init_clang6, cmake_test ]
90+ clang-avx-static :
91+ description : Build, run tests and check performance on clang 6 and AVX 2 with a cmake static build
92+ executor : clang6
93+ environment : { CMAKE_TEST_FLAGS: -DSIMDJSON_BUILD_STATIC=ON }
94+ steps : [ init_clang6, cmake_test ]
95+ clang-avx-sanitize :
96+ description : Build, run tests and check performance on clang 6 and AVX 2 with a cmake sanitize build
97+ executor : clang6
98+ environment : { CMAKE_TEST_FLAGS: -DSIMDJSON_BUILD_STATIC=OFF -DSIMDJSON_SANITIZE=ON }
99+ steps : [ init_clang6, cmake_test ]
100+
101+ clang-sse :
102+ description : Build, run tests and check performance on GCC 7 and SSE 4.2
103+ executor : clang6
104+ environment : { ARCHFLAGS: -march=nehalem }
105+ steps : [ init_clang6, make_test ]
106+ clang-sse-dynamic :
107+ description : Build, run tests and check performance on GCC 7 and SSE 4.2 with a cmake dynamic build
108+ executor : clang6
109+ environment : { CMAKE_TEST_FLAGS: -DSIMDJSON_BUILD_STATIC=OFF }
110+ steps : [ init_clang6, cmake_test ]
111+ clang-sse-static :
112+ description : Build, run tests and check performance on GCC 7 and SSE 4.2 with a cmake static build
113+ executor : clang6
114+ environment : { CMAKE_TEST_FLAGS: -DSIMDJSON_BUILD_STATIC=ON }
115+ steps : [ init_clang6, cmake_test ]
116+ clang-sse-sanitize :
117+ description : Build, run tests and check performance on GCC 7 and SSE 4.2 with a cmake sanitize build
118+ executor : clang6
119+ environment : { CMAKE_TEST_FLAGS: -DSIMDJSON_BUILD_STATIC=OFF -DSIMDJSON_SANITIZE=ON }
120+ steps : [ init_clang6, cmake_test ]
121+
75122workflows :
76123 version : 2.1
77124 build_and_test :
78125 jobs :
79- # gcc7
80- - make_test : { compiler: gcc7 }
81- - cmake_test : { compiler: gcc7, flags: -DSIMDJSON_BUILD_STATIC=ON }
82- - cmake_test : { compiler: gcc7, flags: -DSIMDJSON_BUILD_STATIC=ON }
83- - cmake_test : { compiler: gcc7, flags: -DSIMDJSON_BUILD_STATIC=OFF -DSIMDJSON_SANITIZE=ON }
84- # gcc7 - no AVX
85- - make_test : { compiler: gcc7, archflags: -march=nehalem }
86- - cmake_test : { compiler: gcc7, flags: -DSIMDJSON_DISABLE_AVX=ON -DSIMDJSON_BUILD_STATIC=ON }
87- - cmake_test : { compiler: gcc7, flags: -DSIMDJSON_DISABLE_AVX=ON -DSIMDJSON_BUILD_STATIC=ON }
88- - cmake_test : { compiler: gcc7, flags: -DSIMDJSON_DISABLE_AVX=ON -DSIMDJSON_BUILD_STATIC=OFF -DSIMDJSON_SANITIZE=ON }
89- # clang6
90- - make_test : { compiler: clang6 }
91- - cmake_test : { compiler: clang6, flags: -DSIMDJSON_BUILD_STATIC=ON }
92- - cmake_test : { compiler: clang6, flags: -DSIMDJSON_BUILD_STATIC=ON }
93- - cmake_test : { compiler: clang6, flags: -DSIMDJSON_BUILD_STATIC=OFF -DSIMDJSON_SANITIZE=ON }
94- # clang6 - no AVX
95- - make_test : { compiler: clang6, archflags: -march=nehalem }
96- - cmake_test : { compiler: clang6, flags: -DSIMDJSON_DISABLE_AVX=ON -DSIMDJSON_BUILD_STATIC=ON }
97- - cmake_test : { compiler: clang6, flags: -DSIMDJSON_DISABLE_AVX=ON -DSIMDJSON_BUILD_STATIC=ON }
98- - cmake_test : { compiler: clang6, flags: -DSIMDJSON_DISABLE_AVX=ON -DSIMDJSON_BUILD_STATIC=OFF -DSIMDJSON_SANITIZE=ON }
126+ - gcc-avx
127+ - gcc-avx-dynamic
128+ - gcc-avx-static
129+ - gcc-avx-sanitize
130+ - gcc-sse
131+ - gcc-sse-dynamic
132+ - gcc-sse-static
133+ - gcc-sse-sanitize
134+ - clang-avx
135+ - clang-avx-dynamic
136+ - clang-avx-static
137+ - clang-avx-sanitize
138+ - clang-sse
139+ - clang-sse-dynamic
140+ - clang-sse-static
141+ - clang-sse-sanitize
99142
100143 # TODO add windows: https://circleci.com/docs/2.0/configuration-reference/#windows
101144
0 commit comments