forked from simdjson/simdjson
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.yml
More file actions
203 lines (178 loc) · 6.6 KB
/
config.yml
File metadata and controls
203 lines (178 loc) · 6.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
version: 2.1
# Reusable image / compiler definitions
executors:
gcc7:
docker:
- image: gcc:7
environment:
CXX: g++
CC: gcc
BUILD_FLAGS: -j
CTEST_FLAGS: -j4 --output-on-failure
gcc8:
docker:
- image: conanio/gcc8
environment:
CXX: g++-8
CC: gcc-8
BUILD_FLAGS: -j
CTEST_FLAGS: -j4 --output-on-failure
gcc9:
docker:
- image: conanio/gcc9
environment:
CXX: g++-9
CC: gcc-9
BUILD_FLAGS: -j
CTEST_FLAGS: -j4 --output-on-failure
clang9:
docker:
- image: conanio/clang9
environment:
CXX: clang++-9
CC: clang-9
BUILD_FLAGS: -j
CTEST_FLAGS: -j4 --output-on-failure
clang6:
docker:
- image: conanio/clang60
environment:
CXX: clang++-6.0
CC: clang-6.0
BUILD_FLAGS: -j
CTEST_FLAGS: -j4 --output-on-failure
# Reusable test commands (and initializer for clang 6)
commands:
install_cmake:
steps:
- run: apt-get update -qq
- run: apt-get install -y cmake
cmake_prep:
steps:
- checkout
cmake_build:
steps:
- cmake_prep
- run: cmake $CMAKE_FLAGS -DCMAKE_INSTALL_PREFIX:PATH=destination .
- run: make $BUILD_FLAGS all
- run: tools/json2json -h # Print out the implementation we're using on this hardware
cmake_test:
steps:
- cmake_build
- run: ctest $CTEST_FLAGS -L acceptance
- run: ctest $CTEST_FLAGS -LE acceptance -E checkperf
cmake_test_all:
steps:
- cmake_build
- run: ctest $CTEST_FLAGS -L acceptance -LE per_implementation
- run: SIMDJSON_FORCE_IMPLEMENTATION=haswell ctest $CTEST_FLAGS -L per_implementation
- run: SIMDJSON_FORCE_IMPLEMENTATION=westmere ctest $CTEST_FLAGS -L per_implementation
- run: SIMDJSON_FORCE_IMPLEMENTATION=fallback ctest $CTEST_FLAGS -L per_implementation
- run: ctest $CTEST_FLAGS -LE "acceptance|per_implementation" # Everything we haven't run yet, run now.
# 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:
- run: 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++ -Idestination/include -Ldestination/lib -std=c++17 -Wl,-rpath,destination/lib -o linkandrun tmp.cpp -lsimdjson && ./linkandrun jsonexamples/twitter.json
jobs:
# static
gcc7:
description: Build and run tests on GCC 7 and AVX 2 with a cmake static build
executor: gcc7
environment: { CMAKE_FLAGS: -DSIMDJSON_GOOGLE_BENCHMARKS=ON }
steps: [ install_cmake, cmake_test, cmake_install_test ]
clang6:
description: Build and run tests on clang 6 and AVX 2 with a cmake static build
executor: clang6
environment: { CMAKE_FLAGS: -DSIMDJSON_GOOGLE_BENCHMARKS=ON }
steps: [ cmake_test, cmake_install_test ]
# libcpp
libcpp-clang9:
description: Build and run tests on clang 6 and AVX 2 with a cmake static build and libc++
executor: clang9
environment: { CMAKE_FLAGS: -DSIMDJSON_USE_LIBCPP=ON }
steps: [ cmake_test_all, cmake_install_test ]
# sanitize
sanitize-gcc9:
description: Build and run tests on GCC 9 and AVX 2 with a cmake sanitize build
executor: gcc9
environment: { CMAKE_FLAGS: -DSIMDJSON_BUILD_STATIC=OFF -DSIMDJSON_SANITIZE=ON, BUILD_FLAGS: "", CTEST_FLAGS: -j4 --output-on-failure -E checkperf }
steps: [ cmake_test_all ]
sanitize-clang9:
description: Build and run tests on clang 6 and AVX 2 with a cmake sanitize build
executor: clang9
environment: { CMAKE_FLAGS: -DSIMDJSON_BUILD_STATIC=OFF -DSIMDJSON_SANITIZE=ON, CTEST_FLAGS: -j4 --output-on-failure -E checkperf }
steps: [ cmake_test_all ]
# dynamic
dynamic-gcc9:
description: Build and run tests on GCC 7 and AVX 2 with a cmake dynamic build
executor: gcc9
environment: { CMAKE_FLAGS: -DSIMDJSON_BUILD_STATIC=OFF }
steps: [ cmake_test, cmake_install_test ]
dynamic-clang9:
description: Build and run tests on clang 6 and AVX 2 with a cmake dynamic build
executor: clang9
environment: { CMAKE_FLAGS: -DSIMDJSON_BUILD_STATIC=OFF }
steps: [ cmake_test, cmake_install_test ]
# unthreaded
unthreaded-gcc9:
description: Build and run tests on GCC 7 and AVX 2 *without* threads
executor: gcc9
environment: { CMAKE_FLAGS: -DSIMDJSON_ENABLE_THREADS=OFF }
steps: [ cmake_test, cmake_install_test ]
unthreaded-clang9:
description: Build and run tests on Clang 6 and AVX 2 *without* threads
executor: clang9
environment: { CMAKE_FLAGS: -DSIMDJSON_ENABLE_THREADS=OFF }
steps: [ cmake_test, cmake_install_test ]
# noexcept
noexcept-gcc9:
description: Build and run tests on GCC 7 and AVX 2 with exceptions off
executor: gcc9
environment: { CMAKE_FLAGS: -DSIMDJSON_EXCEPTIONS=OFF }
steps: [ cmake_test, cmake_install_test ]
noexcept-clang9:
description: Build and run tests on GCC 7 and AVX 2 with exceptions off
executor: clang9
environment: { CMAKE_FLAGS: -DSIMDJSON_EXCEPTIONS=OFF }
steps: [ cmake_test, cmake_install_test ]
#
# Misc.
#
# make (test and checkperf)
arch-haswell-gcc9:
description: Build, run tests and check performance on GCC 7 with -march=haswell
executor: gcc9
environment: { CXXFLAGS: -march=haswell }
steps: [ cmake_test ]
arch-nehalem-gcc9:
description: Build, run tests and check performance on GCC 7 with -march=nehalem
executor: gcc9
environment: { CXXFLAGS: -march=nehalem }
steps: [ cmake_test ]
no-computed-goto-gcc9:
description: Build, run tests and check performance on GCC 7 with -DSIMDJSON_NO_COMPUTED_GOTO=true
executor: gcc9
environment: { CXXFLAGS: -DSIMDJSON_NO_COMPUTED_GOTO=true }
steps: [ cmake_test ]
workflows:
version: 2.1
build_and_test:
jobs:
# full multi-implementation tests
- gcc7
- clang6
# libc++
# - libcpp-clang9 # disabled due to too many errors
# full single-implementation tests
- sanitize-gcc9
- sanitize-clang9
- dynamic-gcc9
- dynamic-clang9
- unthreaded-gcc9
- unthreaded-clang9
# quicker make single-implementation tests
- arch-haswell-gcc9
- arch-nehalem-gcc9
- no-computed-goto-gcc9
# TODO add windows: https://circleci.com/docs/2.0/configuration-reference/#windows