Debian Codegraph @

coin/instructions/prepare_building_env.yaml

raw
1 # Prepares environment for building Qt module. It sets all important environment variables in particular
2 # configures the right compiler and cmake generator
3 type: Group
4 instructions:
5
6 # Set default cmake generator, it may be overwritten later
7 - type: EnvironmentVariable
8 variableName: CMAKE_GENERATOR
9 variableValue: Ninja
10
11 # Set path separator based on host platform.
12 # \ on Windows (double \\ for escaping the backslash)
13 # / on UNIX
14 - type: EnvironmentVariable
15 variableName: CI_PATH_SEP
16 variableValue: "\\"
17 enable_if:
18 condition: property
19 property: host.os
20 equals_value: Windows
21 - type: EnvironmentVariable
22 variableName: CI_PATH_SEP
23 variableValue: "/"
24 disable_if:
25 condition: property
26 property: host.os
27 equals_value: Windows
28
29 # Enable Axivion_analysis for Qt
30 - type: EnvironmentVariable
31 variableName: AXIVION_ANALYSIS
32 variableValue: "1"
33 enable_if:
34 condition: property
35 property: features
36 contains_value: Axivion
37
38
39 # Export ICC specific env. variables
40 - type: Group
41 instructions:
42 - type: EnvironmentVariable
43 variableName: LD_LIBRARY_PATH
44 variableValue: "{{.Env.ICC64_18_LDLP}}"
45 - type: PrependToEnvironmentVariable
46 variableName: PATH
47 variableValue: "{{.Env.ICC64_18_PATH}}"
48 enable_if:
49 condition: property
50 property: host.compiler
51 equals_value: ICC_18
52
53
54 # Set CMAKE_C[XX]_COMPILER otherwise cmake may prioritize a wrong compiler
55 - type: Group
56 instructions:
57 - type: PrependToEnvironmentVariable
58 variableName: COMMON_CMAKE_ARGS
59 variableValue: "-DCMAKE_C_COMPILER=icc -DCMAKE_CXX_COMPILER=icpc "
60 enable_if:
61 condition: property
62 property: host.compiler
63 contains_value: ICC
64 - type: PrependToEnvironmentVariable
65 variableName: COMMON_CMAKE_ARGS
66 variableValue: "-DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ "
67 enable_if:
68 condition: or
69 conditions:
70 - condition: property
71 property: host.compiler
72 contains_value: GCC
73 - condition: property
74 property: host.compiler
75 contains_value: Mingw
76 - type: PrependToEnvironmentVariable
77 variableName: COMMON_CMAKE_ARGS
78 variableValue: "-DCMAKE_C_COMPILER=cl.exe -DCMAKE_CXX_COMPILER=cl.exe "
79 enable_if:
80 condition: property
81 property: host.compiler
82 contains_value: MSVC
83 - type: PrependToEnvironmentVariable
84 variableName: COMMON_CMAKE_ARGS
85 variableValue: "-DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ "
86 enable_if:
87 condition: property
88 property: host.compiler
89 contains_value: Clang
90 disable_if:
91 condition: and
92 conditions:
93 - condition: runtime
94 env_var: COMMON_CMAKE_ARGS
95 contains_value: "-DCMAKE_C_COMPILER="
96 - condition: runtime
97 env_var: COMMON_CMAKE_ARGS
98 contains_value: "-DCMAKE_CXX_COMPILER="
99
100
101 # Export TARGET_ARCHITECTURE and WINDOWS_SDK_VERSION for MSVC cross compilation
102 - type: Group
103 enable_if:
104 condition: and
105 conditions:
106 - condition: property
107 property: host.os
108 equals_value: Windows
109 - condition: property
110 property: host.compiler
111 not_contains_value: Mingw
112 instructions:
113 - type: EnvironmentVariable
114 variableName: TARGET_ARCHITECTURE
115 variableValue: amd64 # TODO add something like "{{toLower .Config host.arch}}"
116 disable_if:
117 condition: property
118 property: host.arch
119 not_equals_property: target.arch
120 - type: EnvironmentVariable
121 variableName: TARGET_ARCHITECTURE
122 variableValue: amd64_x86
123 enable_if:
124 condition: and
125 conditions:
126 - condition: property
127 property: target.arch
128 equals_property: X86
129 - condition: property
130 property: host.arch
131 equals_property: X86_64
132 - type: EnvironmentVariable
133 variableName: TARGET_ARCHITECTURE
134 variableValue: x64_arm64
135 enable_if:
136 condition: and
137 conditions:
138 - condition: property
139 property: target.arch
140 equals_value: ARM64
141 - condition: property
142 property: host.arch
143 equals_value: X86_64
144 - type: EnvironmentVariable
145 variableName: TARGET_ARCHITECTURE
146 variableValue: arm64
147 enable_if:
148 condition: and
149 conditions:
150 - condition: property
151 property: target.arch
152 in_values: ["AARCH64", "ARM64"]
153 - condition: property
154 property: host.arch
155 in_values: ["AARCH64", "ARM64"]
156 - type: EnvironmentVariable
157 # HACK. Overwrite TARGET_ARCHITECTURE as we do not use standard MSVC cross
158 # compilation targets here. The target architecture will be detected by Qt.
159 variableName: TARGET_ARCHITECTURE
160 variableValue: x86
161 enable_if:
162 condition: property
163 property: target.os
164 in_values: ["WinRT", "WinPhone", "WinCE"]
165 - type: EnvironmentVariable
166 variableName: WINDOWS_SDK_VERSION
167 variableValue: "10.0.14393.0"
168 enable_if:
169 condition: property
170 property: target.os
171 equals_value: "WinRT"
172 - type: EnvironmentVariable
173 variableName: WINDOWS_SDK_VERSION
174 variableValue: ""
175 disable_if:
176 condition: property
177 property: host.os
178 equals_value: "WinRT" # TODO set windows sdk version for desktop windows as well
179
180
181 # MSVC is installed in somehow arbitrary places. To reduce amount of combinations we need to make a variable.
182 # This seems inverted, but on 64 bit hosts VS is installed into the x86 path, otherwise the regular one
183 # TODO cleanup, that step could be removed if we have same installation paths or we read the path from registry
184 # or we use compiler specific generator (probably superior solution as it allows to get rid of ENV_PREFIX).
185 - type: Group
186 enable_if:
187 condition: and
188 conditions:
189 - condition: property
190 property: host.os
191 equals_value: Windows
192 - condition: property
193 property: host.compiler
194 contains_value: MSVC
195 instructions:
196 # Try to pick one of many coexistent MSVC installation to use
197 # TODO cleanup, that could be much simpler if all tools are installed to similar paths, so it would
198 # be enough to substitute compiler name.
199 - type: EnvironmentVariable
200 variableName: VC_SCRIPT
201 variableValue: "%VS90COMNTOOLS%\\vsvars32.bat"
202 enable_if:
203 condition: property
204 property: host.compiler
205 equals_value: MSVC2008
206 - type: EnvironmentVariable
207 variableName: VC_SCRIPT
208 variableValue: "%VS100COMNTOOLS%\\vsvars32.bat"
209 enable_if:
210 condition: property
211 property: host.compiler
212 equals_value: MSVC2010
213 - type: EnvironmentVariable
214 variableName: VC_SCRIPT
215 variableValue: "%ProgramFiles(x86)%\\Microsoft Visual Studio 11.0\\VC\\vcvarsall.bat"
216 enable_if:
217 condition: property
218 property: host.compiler
219 equals_value: MSVC2012
220 - type: EnvironmentVariable
221 variableName: VC_SCRIPT
222 variableValue: "%ProgramFiles(x86)%\\Microsoft Visual Studio 12.0\\VC\\vcvarsall.bat"
223 enable_if:
224 condition: property
225 property: host.compiler
226 equals_value: MSVC2013
227 - type: EnvironmentVariable
228 variableName: VC_SCRIPT
229 variableValue: "%ProgramFiles(x86)%\\Microsoft Visual Studio 14.0\\VC\\vcvarsall.bat"
230 enable_if:
231 condition: property
232 property: host.compiler
233 equals_value: MSVC2015
234 - type: EnvironmentVariable
235 variableName: VC_SCRIPT
236 variableValue: "%ProgramFiles(x86)%\\Microsoft Visual Studio\\2017\\Professional\\VC\\Auxiliary\\Build\\vcvarsall.bat"
237 enable_if:
238 condition: property
239 property: host.compiler
240 equals_value: MSVC2017
241 - type: EnvironmentVariable
242 variableName: VC_SCRIPT
243 variableValue: "%ProgramFiles(x86)%\\Microsoft Visual Studio\\2019\\Professional\\VC\\Auxiliary\\Build\\vcvarsall.bat"
244 enable_if:
245 condition: property
246 property: host.compiler
247 equals_value: MSVC2019
248 - type: EnvironmentVariable
249 variableName: VC_SCRIPT
250 variableValue: "%ProgramFiles%\\Microsoft Visual Studio\\2022\\Preview\\VC\\Auxiliary\\Build\\vcvarsall.bat"
251 enable_if:
252 condition: property
253 property: host.compiler
254 equals_value: MSVC2022_PREVIEW
255 - type: EnvironmentVariable
256 variableName: VC_SCRIPT
257 variableValue: "%ProgramFiles%\\Microsoft Visual Studio\\2022\\Professional\\VC\\Auxiliary\\Build\\vcvarsall.bat"
258 enable_if:
259 condition: property
260 property: host.compiler
261 equals_value: MSVC2022
262
263
264 # With MSVC we need setup the environment before every subprocess call, the group below creates a script that
265 # does it. It is enough to prepand it to every call (it is safe to add it even on other OSes)
266 - type: Group
267 instructions:
268 - type: WriteFile
269 fileContents: "call \"{{.Env.VC_SCRIPT}}\" {{.Env.TARGET_ARCHITECTURE}} {{.Env.WINDOWS_SDK_VERSION}}\r\ncmd /c %*"
270 filename: c:\\users\\qt\\prefix.bat
271 fileMode: 420
272 maxTimeInSeconds: 20
273 maxTimeBetweenOutput: 20
274 enable_if:
275 condition: and
276 conditions:
277 - condition: property
278 property: host.os
279 equals_value: Windows
280 - condition: property
281 property: host.compiler
282 contains_value: MSVC
283 - type: EnvironmentVariable
284 variableName: ENV_PREFIX
285 variableValue: "c:\\users\\qt\\prefix.bat"
286 enable_if:
287 condition: and
288 conditions:
289 - condition: property
290 property: host.os
291 equals_value: Windows
292 - condition: property
293 property: host.compiler
294 contains_value: MSVC
295 - type: EnvironmentVariable
296 variableName: ENV_PREFIX
297 variableValue: ""
298 disable_if:
299 condition: and
300 conditions:
301 - condition: property
302 property: host.os
303 equals_value: Windows
304 - condition: property
305 property: host.compiler
306 contains_value: MSVC
307
308 - type: Group
309 instructions:
310 # Need to unset QMAKESPEC, so that the pre-installed boot2qt mkspec is not picked up.
311 - type: WriteFile
312 fileContents: "#!/bin/bash\nunset LD_LIBRARY_PATH\n. {{.Env.QT_YOCTO_ENVSETUP}}\nexport PATH={{.Env.QT_CMAKE_DIR}}:$PATH;\nunset QMAKESPEC\n\"$@\""
313 filename: "{{.Env.HOME}}/prefix.sh"
314 fileMode: 493
315 maxTimeInSeconds: 20
316 maxTimeBetweenOutput: 20
317 enable_if:
318 condition: property
319 property: target.osVersion
320 equals_value: QEMU
321 - type: EnvironmentVariable
322 variableName: TARGET_ENV_PREFIX
323 variableValue: "{{.Env.HOME}}/prefix.sh"
324 enable_if:
325 condition: property
326 property: target.osVersion
327 in_values: [QEMU]
328 - type: EnvironmentVariable
329 variableName: TARGET_ENV_PREFIX
330 variableValue: ""
331 disable_if:
332 condition: property
333 property: target.osVersion
334 in_values: [QEMU]
335 # This fixes an issue where binfmts is sometimes disabled on the test VMs
336 - type: ExecuteCommand
337 command: sudo update-binfmts --enable
338 userMessageOnFailure: "Failed to enable binfmts"
339 enable_if:
340 condition: property
341 property: target.osVersion
342 equals_value: QEMU
343
344 # Windows on Arm, cross-compilation with MSVC
345 - type: Group
346 enable_if:
347 condition: and
348 conditions:
349 - condition: property
350 property: host.os
351 equals_value: Windows
352 - condition: property
353 property: host.compiler
354 contains_value: MSVC
355 instructions:
356 - type: EnvironmentVariable
357 variableName: TARGET_ENV_PREFIX
358 variableValue: "c:\\users\\qt\\prefix.bat"
359
360 # VxWorks
361 - type: Group
362 enable_if:
363 condition: property
364 property: target.osVersion
365 equals_value: VxWorks
366 instructions:
367 - type: EnvironmentVariable
368 variableName: TARGET_ENV_PREFIX
369 variableValue: "{{.Env.VXWORKS_HOME}}/wrenv.linux"
370
371 # QNX variables
372 - type: EnvironmentVariable
373 variableName: QNX_ACTIVE
374 variableValue: "{{.Env.QNX_710}}"
375 enable_if:
376 condition: property
377 property: target.osVersion
378 equals_value: QNX_710
379
380 - type: EnvironmentVariable
381 variableName: QNX_ACTIVE
382 variableValue: "{{.Env.QNX_800}}"
383 enable_if:
384 condition: property
385 property: target.osVersion
386 equals_value: QNX_800
387
388 - type: Group
389 enable_if:
390 condition: and
391 conditions:
392 - condition: property
393 property: host.os
394 equals_value: Linux
395 - condition: property
396 property: target.os
397 equals_value: QNX
398 instructions:
399 - type: EnvironmentVariable
400 variableName: QNX_CONFIGURATION_EXCLUSIVE
401 variableValue: "{{.Env.HOME}}/.qnx"
402 - type: EnvironmentVariable
403 variableName: QNX_CONFIGURATION
404 variableValue: "{{.Env.HOME}}/.qnx"
405 - type: PrependToEnvironmentVariable
406 variableName: PATH
407 variableValue: "{{.Env.HOME}}/.qnx:"
408 - type: AppendToEnvironmentVariable
409 variableName: PATH
410 variableValue: ":{{.Env.QEMUARMV7_TOOLCHAIN_SYSROOT}}/../x86_64-pokysdk-linux/usr/bin:"
411 - type: EnvironmentVariable
412 variableName: QNX_TARGET
413 variableValue: "{{.Env.QNX_ACTIVE}}/target/qnx7"
414 - type: PrependToEnvironmentVariable
415 variableName: PATH
416 variableValue: "{{.Env.QNX_ACTIVE}}/host/linux/x86_64/usr/bin:"
417 - type: PrependToEnvironmentVariable
418 variableName: PATH
419 variableValue: "{{.Env.QNX_ACTIVE}}/host/common/bin:"
420 - type: EnvironmentVariable
421 variableName: QNX_HOST
422 variableValue: "{{.Env.QNX_ACTIVE}}/host/linux/x86_64"
423
424 - type: SetEnvironmentFromScript
425 command: "{{.Env.QNX_ACTIVE}}\\qnxsdp-env.bat"
426 userMessageOnFailure: "Failed to set QNX environment"
427 maxTimeInSeconds: 60
428 maxTimeBetweenOutput: 60
429 enable_if:
430 condition: and
431 conditions:
432 - condition: property
433 property: target.osVersion
434 contains_value: QNX
435 - condition: property
436 property: host.os
437 contains_value: Windows
438
439 # Enable warnings are errors
440 - type: Group
441 instructions:
442 - type: AppendToEnvironmentVariable
443 variableName: COMMON_CMAKE_ARGS
444 variableValue: " -DWARNINGS_ARE_ERRORS=ON"
445 - type: AppendToEnvironmentVariable
446 variableName: COMMON_TARGET_CMAKE_ARGS
447 variableValue: " -DWARNINGS_ARE_ERRORS=ON"
448 enable_if:
449 condition: property
450 property: features
451 contains_value: WarningsAreErrors
452
453 - type: Group
454 enable_if:
455 condition: property
456 property: features
457 contains_value: UseAddressSanitizer
458 instructions:
459 - type: AppendToEnvironmentVariable
460 variableName: COMMON_CMAKE_ARGS
461 variableValue: " -DFEATURE_sanitize_address=ON"
462 disable_if:
463 condition: property
464 property: features
465 contains_value: UseConfigure
466 - type: AppendToEnvironmentVariable
467 variableName: CONFIGURE_ARGS
468 variableValue: " -sanitize address"
469 enable_if:
470 condition: property
471 property: features
472 contains_value: UseConfigure
473
474 # Packaging
475 - type: Group
476 enable_if:
477 condition: property
478 property: features
479 contains_value: Packaging
480 instructions:
481 - type: AppendToEnvironmentVariable
482 variableName: COMMON_CMAKE_ARGS
483 variableValue: " -DQT_INSTALL_CONFIG_INFO_FILES=ON"
484 - type: AppendToEnvironmentVariable
485 variableName: COMMON_NON_QTBASE_CMAKE_ARGS
486 variableValue: " -DQT_INSTALL_CONFIG_INFO_FILES=ON"
487 - type: AppendToEnvironmentVariable
488 variableName: COMMON_TARGET_CMAKE_ARGS
489 variableValue: " -DQT_INSTALL_CONFIG_INFO_FILES=ON"
490 - type: AppendToEnvironmentVariable
491 variableName: COMMON_NON_QTBASE_TARGET_CMAKE_ARGS
492 variableValue: " -DQT_INSTALL_CONFIG_INFO_FILES=ON"
493
494 # SBOM
495 - type: Group
496 enable_if:
497 condition: property
498 property: features
499 contains_value: GenerateSBOM
500 instructions:
501 - type: EnvironmentVariable
502 variableName: SBOM_COMMON_ARGS
503 variableValue: >-
504 -DQT_GENERATE_SBOM=ON
505 -DQT_GENERATE_SOURCE_SBOM=ON
506 -DQT_SBOM_REQUIRE_GENERATE_CYDX_V1_6=ON
507 -DQT_SBOM_VERIFY_CYDX_V1_6=ON
508 - type: AppendToEnvironmentVariable
509 variableName: COMMON_CMAKE_ARGS
510 variableValue: " {{.Env.SBOM_COMMON_ARGS}} "
511 - type: AppendToEnvironmentVariable
512 variableName: COMMON_NON_QTBASE_CMAKE_ARGS
513 variableValue: " {{.Env.SBOM_COMMON_ARGS}} "
514 - type: AppendToEnvironmentVariable
515 variableName: COMMON_TARGET_CMAKE_ARGS
516 variableValue: " {{.Env.SBOM_COMMON_ARGS}} "
517 - type: AppendToEnvironmentVariable
518 variableName: COMMON_NON_QTBASE_TARGET_CMAKE_ARGS
519 variableValue: " {{.Env.SBOM_COMMON_ARGS}} "
520
521 # SBOM Python apps path. On Windows python-installed apps are
522 # in the same directory where pip is, aka Scripts sub-directory.
523 - type: EnvironmentVariable
524 variableName: SBOM_PYTHON_APPS_PATH
525 variableValue: "{{.Env.PIP3_PATH}}"
526 enable_if:
527 condition: and
528 conditions:
529 - condition: property
530 property: host.os
531 equals_value: Windows
532 - condition: runtime
533 env_var: SBOM_PYTHON_APPS_PATH
534 equals_value: null
535 - type: EnvironmentVariable
536 variableName: SBOM_PYTHON_APPS_PATH
537 variableValue: "{{.Env.PYTHON3_PATH}}"
538 enable_if:
539 condition: and
540 conditions:
541 - condition: property
542 property: host.os
543 not_equals_value: Windows
544 - condition: runtime
545 env_var: SBOM_PYTHON_APPS_PATH
546 equals_value: null
547
548 # Always pass the location of the python intrepreter meant to be used for SBOM generation,
549 # because the Qt default has changed to always generate an SBOM.
550 # Don't forget to adjust tests/auto/cmake/RunCMake/Sbom/RunCMakeTest.cmake
551 # in case of changing / removing these args.
552 - type: EnvironmentVariable
553 variableName: SBOM_PYTHON_ARGS
554 variableValue: >-
555 -DQT_SBOM_PYTHON_INTERP={{.Env.PYTHON3_PATH}}
556 -DQT_SBOM_PYTHON_APPS_PATH={{.Env.SBOM_PYTHON_APPS_PATH}}
557 - type: AppendToEnvironmentVariable
558 variableName: COMMON_CMAKE_ARGS
559 variableValue: " {{.Env.SBOM_PYTHON_ARGS}} "
560 - type: AppendToEnvironmentVariable
561 variableName: COMMON_NON_QTBASE_CMAKE_ARGS
562 variableValue: " {{.Env.SBOM_PYTHON_ARGS}} "
563 - type: AppendToEnvironmentVariable
564 variableName: COMMON_TARGET_CMAKE_ARGS
565 variableValue: " {{.Env.SBOM_PYTHON_ARGS}} "
566 - type: AppendToEnvironmentVariable
567 variableName: COMMON_NON_QTBASE_TARGET_CMAKE_ARGS
568 variableValue: " {{.Env.SBOM_PYTHON_ARGS}} "
569
570 # SBOM verification and auditing
571 - type: Group
572 enable_if:
573 condition: property
574 property: features
575 contains_value: VerifySBOM
576 instructions:
577 - type: EnvironmentVariable
578 variableName: SBOM_COMMON_ARGS
579 variableValue: >-
580 -DQT_LINT_SOURCE_SBOM=ON
581 -DQT_INTERNAL_SBOM_DEFAULT_CHECKS=ON
582 -DQT_INTERNAL_SBOM_AUDIT=ON
583 -DQT_INTERNAL_SBOM_AUDIT_NO_ERROR=ON
584 - type: AppendToEnvironmentVariable
585 variableName: COMMON_CMAKE_ARGS
586 variableValue: " {{.Env.SBOM_COMMON_ARGS}} "
587 - type: AppendToEnvironmentVariable
588 variableName: COMMON_NON_QTBASE_CMAKE_ARGS
589 variableValue: " {{.Env.SBOM_COMMON_ARGS}} "
590 - type: AppendToEnvironmentVariable
591 variableName: COMMON_TARGET_CMAKE_ARGS
592 variableValue: " {{.Env.SBOM_COMMON_ARGS}} "
593 - type: AppendToEnvironmentVariable
594 variableName: COMMON_NON_QTBASE_TARGET_CMAKE_ARGS
595 variableValue: " {{.Env.SBOM_COMMON_ARGS}} "
596
597 - type: Group
598 instructions:
599 - type: AppendToEnvironmentVariable
600 variableName: COMMON_CMAKE_ARGS
601 variableValue: " -DQT_BUILD_TESTS=OFF -DCMAKE_AUTOGEN_VERBOSE=ON -DCMAKE_MESSAGE_LOG_LEVEL=STATUS"
602 - type: AppendToEnvironmentVariable
603 variableName: COMMON_NON_QTBASE_CMAKE_ARGS
604 variableValue: " -DQT_BUILD_TESTS=OFF -DCMAKE_AUTOGEN_VERBOSE=ON -DCMAKE_MESSAGE_LOG_LEVEL=STATUS"
605 - type: AppendToEnvironmentVariable
606 variableName: COMMON_TEST_CMAKE_ARGS
607 variableValue: " -DCMAKE_AUTOGEN_VERBOSE=ON -DCMAKE_MESSAGE_LOG_LEVEL=STATUS"
608 - type: AppendToEnvironmentVariable
609 variableName: COMMON_EXAMPLES_CMAKE_ARGS
610 variableValue: " -DCMAKE_AUTOGEN_VERBOSE=ON -DCMAKE_MESSAGE_LOG_LEVEL=STATUS"
611
612 - type: AppendToEnvironmentVariable
613 variableName: COMMON_TARGET_CMAKE_ARGS
614 variableValue: " -DQT_BUILD_TESTS=OFF -DCMAKE_AUTOGEN_VERBOSE=ON -DCMAKE_MESSAGE_LOG_LEVEL=STATUS"
615 - type: AppendToEnvironmentVariable
616 variableName: COMMON_NON_QTBASE_TARGET_CMAKE_ARGS
617 variableValue: " -DQT_BUILD_TESTS=OFF -DCMAKE_AUTOGEN_VERBOSE=ON -DCMAKE_MESSAGE_LOG_LEVEL=STATUS"
618 - type: AppendToEnvironmentVariable
619 variableName: COMMON_TARGET_TEST_CMAKE_ARGS
620 variableValue: " -DCMAKE_AUTOGEN_VERBOSE=ON -DCMAKE_MESSAGE_LOG_LEVEL=STATUS"
621 - type: AppendToEnvironmentVariable
622 variableName: COMMON_TARGET_EXAMPLES_CMAKE_ARGS
623 variableValue: " -DCMAKE_AUTOGEN_VERBOSE=ON -DCMAKE_MESSAGE_LOG_LEVEL=STATUS"
624
625 # Sccache
626 - type: Group
627 instructions:
628 - type: AppendToEnvironmentVariable
629 variableName: COMMON_CMAKE_ARGS
630 variableValue: " -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache"
631 - type: AppendToEnvironmentVariable
632 variableName: COMMON_NON_QTBASE_CMAKE_ARGS
633 variableValue: " -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache"
634 - type: AppendToEnvironmentVariable
635 variableName: COMMON_TEST_CMAKE_ARGS
636 variableValue: " -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache"
637 - type: AppendToEnvironmentVariable
638 variableName: COMMON_EXAMPLES_CMAKE_ARGS
639 variableValue: " -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache"
640
641 - type: AppendToEnvironmentVariable
642 variableName: COMMON_TARGET_CMAKE_ARGS
643 variableValue: " -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache"
644 - type: AppendToEnvironmentVariable
645 variableName: COMMON_NON_QTBASE_TARGET_CMAKE_ARGS
646 variableValue: " -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache"
647 - type: AppendToEnvironmentVariable
648 variableName: COMMON_TARGET_TEST_CMAKE_ARGS
649 variableValue: " -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache"
650 - type: AppendToEnvironmentVariable
651 variableName: COMMON_TARGET_EXAMPLES_CMAKE_ARGS
652 variableValue: " -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache"
653 enable_if:
654 condition: property
655 property: features
656 contains_value: Sccache
657
658 # Specify a custom examples installation directory, so that the built example binaries are not
659 # packaged into the artifact archive together with the Qt libraries.
660 # Also specify that during examples deployment, only a subset of examples should be deployed, to
661 # save time and space.
662 - type: Group
663 instructions:
664 - type: AppendToEnvironmentVariable
665 variableName: COMMON_CMAKE_ARGS
666 variableValue: " -DQT_INTERNAL_EXAMPLES_INSTALL_PREFIX={{unixPathSeparators .BuildDir}}/installed_examples"
667 - type: AppendToEnvironmentVariable
668 variableName: COMMON_TARGET_CMAKE_ARGS
669 variableValue: " -DQT_INTERNAL_EXAMPLES_INSTALL_PREFIX={{unixPathSeparators .BuildDir}}/installed_examples"
670 - type: AppendToEnvironmentVariable
671 variableName: COMMON_CMAKE_ARGS
672 variableValue: " -DQT_DEPLOY_MINIMAL_EXAMPLES=ON"
673 - type: AppendToEnvironmentVariable
674 variableName: COMMON_TARGET_CMAKE_ARGS
675 variableValue: " -DQT_DEPLOY_MINIMAL_EXAMPLES=ON"
676 - type: Group
677 instructions:
678 - type: AppendToEnvironmentVariable
679 variableName: COMMON_CMAKE_ARGS
680 variableValue: " -DQT_INTERNAL_CI_NO_BUILD_IN_TREE_EXAMPLES=ON"
681 - type: AppendToEnvironmentVariable
682 variableName: COMMON_TARGET_CMAKE_ARGS
683 variableValue: " -DQT_INTERNAL_CI_NO_BUILD_IN_TREE_EXAMPLES=ON"
684 enable_if:
685 condition: property
686 property: features
687 contains_value: StandaloneExamples
688 enable_if:
689 # Only set the custom installation dir if examples are built.
690 condition: or
691 conditions:
692 # qtbase host case
693 - condition: runtime
694 env_var: CONFIGURE_ARGS
695 contains_value: "QT_BUILD_EXAMPLES=ON"
696 # qtbase target case
697 - condition: runtime
698 env_var: TARGET_CONFIGURE_ARGS
699 contains_value: "QT_BUILD_EXAMPLES=ON"
700 # non-qtbase host case
701 - condition: runtime
702 env_var: NON_QTBASE_CONFIGURE_ARGS
703 contains_value: "QT_BUILD_EXAMPLES=ON"
704 # non-qtbase target case
705 - condition: runtime
706 env_var: NON_QTBASE_TARGET_CONFIGURE_ARGS
707 contains_value: "QT_BUILD_EXAMPLES=ON"
708 # Same as above, but for configurations marked with UseConfigure
709 # qtbase host case
710 - condition: runtime
711 env_var: CONFIGURE_ARGS
712 contains_value: "-make examples"
713 # qtbase target case
714 - condition: runtime
715 env_var: TARGET_CONFIGURE_ARGS
716 contains_value: "-make examples"
717 # non-qtbase host case
718 - condition: runtime
719 env_var: NON_QTBASE_CONFIGURE_ARGS
720 contains_value: "-make examples"
721 # non-qtbase target case
722 - condition: runtime
723 env_var: NON_QTBASE_TARGET_CONFIGURE_ARGS
724 contains_value: "-make examples"
725
726 - type: SetEnvironmentFromScript
727 command: [C:\Utils\emsdk\emsdk_env.bat]
728 userMessageOnFailure: "Failed to set emscripten environment"
729 maxTimeInSeconds: 60
730 maxTimeBetweenOutput: 60
731 enable_if:
732 condition: and
733 conditions:
734 - condition: property
735 property: target.osVersion
736 contains_value: WebAssembly
737 - condition: property
738 property: host.os
739 contains_value: Windows
740
741 - type: EnvironmentVariable
742 variableName: HOST_INSTALL_DIR
743 variableValue: "{{$android_host_artifact_path := index .Env \"QT_CI_ARTIFACT_ID_PATH_Android-host\" }}{{index .Env $android_host_artifact_path}}/install"
744 enable_if:
745 condition: and
746 conditions:
747 - condition: property
748 property: target.osVersion
749 equals_value: Android_ANY
750 - condition: property
751 property: target.arch
752 equals_value: Multi
753
754 - type: EnvironmentVariable
755 variableName: HOST_INSTALL_DIR
756 variableValue: "{{.InstallDir}}"
757 disable_if:
758 condition: and
759 conditions:
760 - condition: property
761 property: target.osVersion
762 equals_value: Android_ANY
763 - condition: property
764 property: target.arch
765 equals_value: Multi
766
767 - type: EnvironmentVariable
768 variableName: LIBEXEC_INSTALL_DIR
769 variableValue: "{{.Env.HOST_INSTALL_DIR}}\\bin\\"
770 enable_if:
771 condition: property
772 property: host.os
773 equals_value: Windows
774 - type: EnvironmentVariable
775 variableName: LIBEXEC_INSTALL_DIR
776 variableValue: "{{.Env.HOST_INSTALL_DIR}}/libexec/"
777 disable_if:
778 condition: property
779 property: host.os
780 equals_value: Windows