summaryrefslogtreecommitdiff
path: root/etc/evergreen_yml_components/variants/compile_static_analysis.yml
blob: aa9977f2dae4dfa0f29465d367c2a574b9002445 (plain)
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
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
### Build variants for Evergreen compile task groups and static analysis tasks that are shared across 2 or more
###   variants. These are placed in a standalone file to better track compile volume.

variables:
- &generic_linux_compile_params  # Essential set of compile parameters used for Linux dev variants.
  run_on:
  - rhel80-xlarge
  activate: true  # These compile variants run on every commit to reduce latency of the auto-reverter.
  tasks:
  - name: compile_test_and_package_parallel_core_stream_TG
  - name: compile_test_and_package_parallel_unittest_stream_TG
  - name: compile_test_and_package_parallel_dbtest_stream_TG
  - name: generate_buildid_to_debug_symbols_mapping

- &generic_linux_compile_expansions  # The most commonly used compile expansions.
  scons_cache_scope: shared
  scons_cache_mode: all
  has_packages: false

- &linux-x86-dynamic-compile-params  # Essential set of compile parameters used for Linux dev variants.
  run_on:
  - rhel80-xlarge
  activate: true  # These compile variants run on every commit to reduce latency of the auto-reverter.
  modules:
    - enterprise
  stepback: false

- &linux-x86-dynamic-compile-expansions
  scons_cache_scope: shared
  scons_cache_mode: all
  has_packages: false
  compile_flags: >-
    --ssl
    MONGO_DISTMOD=rhel80
    -j$(grep -c ^processor /proc/cpuinfo)
    --variables-files=etc/scons/mongodbtoolchain_stable_gcc.vars
    --link-model=dynamic

- &linux-arm64-dynamic-compile-params  # Essential set of compile parameters used for Linux dev variants.
  run_on:
  - amazon2-arm64-large
  activate: true  # These compile variants run on every commit to reduce latency of the auto-reverter.
  modules:
    - enterprise
  stepback: false

- &linux-arm64-dynamic-compile-expansions
  scons_cache_scope: shared
  scons_cache_mode: all
  has_packages: false
  compile_flags: >-
    --ssl
    MONGO_DISTMOD=amazon2
    -j$(grep -c ^processor /proc/cpuinfo)
    --variables-files=etc/scons/mongodbtoolchain_stable_gcc.vars
    --link-model=dynamic

# If you add anything to san_options, make sure the appropriate changes are
# also made to SConstruct.
# and also to the san_options in evergreen.yml
- aubsan_options: &aubsan_options
  >-
    UBSAN_OPTIONS="print_stacktrace=1:external_symbolizer_path=/opt/mongodbtoolchain/v4/bin/llvm-symbolizer"
    LSAN_OPTIONS="suppressions=etc/lsan.suppressions:report_objects=1"
    ASAN_OPTIONS="detect_leaks=1:check_initialization_order=true:strict_init_order=true:abort_on_error=1:disable_coredump=0:handle_abort=1:strict_string_checks=true:detect_invalid_pointer_pairs=1:external_symbolizer_path=/opt/mongodbtoolchain/v4/bin/llvm-symbolizer"


buildvariants:
- <<: *linux-x86-dynamic-compile-params
  name: &linux-x86-dynamic-compile linux-x86-dynamic-compile
  display_name: "* Linux x86 Shared Library"
  expansions:
    <<: *linux-x86-dynamic-compile-expansions
    compile_variant: *linux-x86-dynamic-compile
  tasks:
    - name: compile_ninja_quick_TG
    - name: compile_test_and_package_parallel_unittest_stream_TG
    - name: compile_test_and_package_parallel_core_stream_TG
    - name: compile_test_and_package_parallel_dbtest_stream_TG
    - name: compile_integration_and_test_parallel_stream_TG
    - name: generate_buildid_to_debug_symbols_mapping
    - name: server_discovery_and_monitoring_json_test_TG
      distros:
      - rhel80-large
    - name: server_selection_json_test_TG
      distros:
      - rhel80-large

- <<: *generic_linux_compile_params
  name: &linux-x86-dynamic-debug-compile-required linux-x86-dynamic-debug-compile-required  # TODO: replace with Sanitizer.
  display_name: "! Linux x86 Shared Library DEBUG Compile"
  stepback: false
  expansions: &linux_debug_compile_expansions
    <<: *generic_linux_compile_expansions
    compile_flags: >-
      --dbg=on
      --opt=on
      -j$(grep -c ^processor /proc/cpuinfo)
      --variables-files=etc/scons/mongodbtoolchain_stable_gcc.vars
      --enable-free-mon=on
      --enable-http-client=on
      --link-model=dynamic
    num_scons_link_jobs_available: 0.99
    compile_variant: *linux-x86-dynamic-debug-compile-required
  tasks:
  - name: compile_test_and_package_parallel_core_stream_TG
  - name: compile_test_and_package_parallel_unittest_stream_TG
  - name: compile_test_and_package_parallel_dbtest_stream_TG
  - name: generate_buildid_to_debug_symbols_mapping

- <<: *generic_linux_compile_params
  name: &linux-x86-dynamic-debug-wtdevelop-compile linux-x86-dynamic-debug-wtdevelop-compile
  display_name: "~ Linux WiredTiger develop DEBUG Compile"
  activate: false
  modules:
  - wtdevelop
  expansions:
    <<: *linux_debug_compile_expansions
    use_wt_develop: true
    compile_variant: *linux-x86-dynamic-debug-wtdevelop-compile

- <<: *generic_linux_compile_params
  name: &linux-debug-aubsan-compile-required linux-debug-aubsan-compile-required
  display_name: "! Linux x86 Shared Library {A,UB}SAN Enterprise Compile"
  modules:
  - enterprise
  expansions:
    <<: *generic_linux_compile_expansions
    separate_debug: off
    san_options: *aubsan_options
    compile_flags: >-
      --variables-files=etc/scons/mongodbtoolchain_stable_clang.vars
      --dbg=on
      --opt=on
      --allocator=system
      --sanitize=undefined,address
      --ssl
      --ocsp-stapling=off
      -j$(grep -c ^processor /proc/cpuinfo)
      --link-model=dynamic
      --enable-free-mon=on
    compile_variant: *linux-debug-aubsan-compile-required

- <<: *linux-x86-dynamic-compile-params
  name: &linux-stitch-compile-suggested linux-stitch-compile-suggested
  display_name: "* Linux x86 Stitch Enterprise Compile"
  expansions:
    <<: *linux-x86-dynamic-compile-expansions
    compile_variant: *linux-stitch-compile-suggested
  tasks:
    - name: .stitch

- <<: *linux-x86-dynamic-compile-params
  name: &linux-crypt-compile linux-crypt-compile
  display_name: "* Linux x86 Crypt Enterprise Compile"
  expansions:
    <<: *linux-x86-dynamic-compile-expansions
    crypt_task_compile_flags: >-
      SHLINKFLAGS_EXTRA="-Wl,-Bsymbolic
      -Wl,--no-gnu-unique"
      CCFLAGS="-fno-gnu-unique"
    compile_variant: *linux-crypt-compile
  tasks:
    - name: .crypt
    - name: crypt_build_debug_and_test

- name: &windows-compile-required windows-compile-required
  display_name: "! Windows Compile"
  run_on:
  - windows-vsCurrent-xlarge
  modules:
  - enterprise
  activate: true  # These compile variants run on every commit to reduce latency of the auto-reverter.
  expansions:
    exe: ".exe"
    ext: zip
    additional_package_targets: >-
      archive-mongocryptd
      archive-mongocryptd-debug
      msi
      archive-mh
      archive-mh-debug
    content_type: application/zip
    compile_flags: >-
      --ssl
      MONGO_DISTMOD=windows
      CPPPATH="c:/sasl/include"
      LIBPATH="c:/sasl/lib"
      -j$(bc <<< "$(grep -c '^processor' /proc/cpuinfo) / 1.8")
      --win-version-min=win10
    num_scons_link_jobs_available: 0.2
    python: '/cygdrive/c/python/python37/python.exe'
    scons_cache_scope: shared
    compile_variant: *windows-compile-required
  tasks:
  - name: compile_ninja_quick_TG
  - name: compile_test_and_package_parallel_core_stream_TG
  - name: compile_test_and_package_parallel_unittest_stream_TG
  - name: compile_test_and_package_parallel_dbtest_stream_TG
  - name: compile_build_tools_next_TG
  - name: server_discovery_and_monitoring_json_test_TG
  - name: server_selection_json_test_TG
  - name: .crypt

- <<: *linux-arm64-dynamic-compile-params
  name: &amazon-linux2-arm64-compile amazon-linux2-arm64-compile
  display_name: "! Amazon Linux 2 arm64 Shared Library Compile & Static Analysis"
  expansions:
    <<: *linux-arm64-dynamic-compile-expansions
    clang_tidy_toolchain: v4
    compile_variant: *amazon-linux2-arm64-compile
  tasks:
    - name: clang_tidy_TG
      distros:
        - amazon2-arm64-xlarge
    - name: compile_ninja_quick_TG
    - name: compile_test_and_package_parallel_unittest_stream_TG
    - name: compile_test_and_package_parallel_core_stream_TG
    - name: compile_test_and_package_parallel_dbtest_stream_TG
    - name: compile_integration_and_test_parallel_stream_TG
    - name: generate_buildid_to_debug_symbols_mapping
    - name: .lint
    - name: resmoke_validation_tests
    - name: server_discovery_and_monitoring_json_test_TG
    - name: server_selection_json_test_TG

- <<: *linux-arm64-dynamic-compile-params
  name: &amazon-linux2-arm64-crypt-compile amazon-linux2-arm64-crypt-compile
  display_name: "! Amazon Linux 2 arm64 Crypt Compile"
  expansions:
    <<: *linux-arm64-dynamic-compile-expansions
    compile_variant: *amazon-linux2-arm64-crypt-compile
  tasks:
    - name: .crypt
    - name: crypt_build_debug_and_test

- <<: *linux-arm64-dynamic-compile-params
  name: &amazon-linux2-arm64-stitch-compile amazon-linux2-arm64-stitch-compile
  display_name: "* Amazon Linux 2 arm64 Stitch Compile"
  expansions:
    <<: *linux-arm64-dynamic-compile-expansions
    compile_variant: *amazon-linux2-arm64-stitch-compile
  tasks:
    - name: .stitch

- <<: *generic_linux_compile_params
  name: &linux-x86-dynamic-grpc-suggested linux-x86-dynamic-grpc-suggested
  display_name: "* Linux x86 Shared Library with GRPC"
  modules:
    - enterprise
  stepback: false
  expansions:
    <<: *generic_linux_compile_expansions
    compile_flags: >-
      --ssl
      MONGO_DISTMOD=rhel80
      -j$(grep -c ^processor /proc/cpuinfo)
      --variables-files=etc/scons/mongodbtoolchain_stable_gcc.vars
      --link-model=dynamic
      ENABLE_GRPC_BUILD=1
    compile_variant: *linux-x86-dynamic-grpc-suggested
    clang_tidy_toolchain: v4
  tasks:
    - name: compile_ninja_quick_TG
    - name: compile_test_and_package_parallel_unittest_stream_TG
    - name: compile_test_and_package_parallel_core_stream_TG
    - name: compile_test_and_package_parallel_dbtest_stream_TG
    - name: generate_buildid_to_debug_symbols_mapping
    - name: .lint
    - name: libdeps_graph_linting_TG
      distros:
      - rhel80-large
    - name: clang_tidy_TG
      distros:
      - rhel80-xxlarge