summaryrefslogtreecommitdiffstats
path: root/coin/instructions/prepare_building_env.yaml
blob: a3ac5c3f0b830406787e2458fe9e833164df68d4 (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
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
# Prepares environment for building Qt module. It sets all important environment variables in particular
# configures the right compiler and cmake generator
type: Group
instructions:

  # Set default cmake generator, it may be overwritten later
  - type: EnvironmentVariable
    variableName: CMAKE_GENERATOR
    variableValue: Ninja

  # Set path separator based on host platform.
  # \ on Windows (double \\ for escaping the backslash)
  # / on UNIX
  - type: EnvironmentVariable
    variableName: CI_PATH_SEP
    variableValue: "\\"
    enable_if:
      condition: property
      property: host.os
      equals_value: Windows
  - type: EnvironmentVariable
    variableName: CI_PATH_SEP
    variableValue: "/"
    disable_if:
      condition: property
      property: host.os
      equals_value: Windows

  # Enable Axivion_analysis for Qt
  - type: EnvironmentVariable
    variableName: AXIVION_ANALYSIS
    variableValue: "1"
    enable_if:
      condition: property
      property: features
      contains_value: Axivion


  # Export ICC specific env. variables
  - type: Group
    instructions:
      - type: EnvironmentVariable
        variableName: LD_LIBRARY_PATH
        variableValue: "{{.Env.ICC64_18_LDLP}}"
      - type: PrependToEnvironmentVariable
        variableName: PATH
        variableValue: "{{.Env.ICC64_18_PATH}}"
    enable_if:
      condition: property
      property: host.compiler
      equals_value: ICC_18


  # Set CMAKE_C[XX]_COMPILER otherwise cmake may prioritize a wrong compiler
  - type: Group
    instructions:
      - type: PrependToEnvironmentVariable
        variableName: COMMON_CMAKE_ARGS
        variableValue: "-DCMAKE_C_COMPILER=icc -DCMAKE_CXX_COMPILER=icpc "
        enable_if:
          condition: property
          property: host.compiler
          contains_value: ICC
      - type: PrependToEnvironmentVariable
        variableName: COMMON_CMAKE_ARGS
        variableValue: "-DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ "
        enable_if:
          condition: or
          conditions:
            - condition: property
              property: host.compiler
              contains_value: GCC
            - condition: property
              property: host.compiler
              contains_value: Mingw
      - type: PrependToEnvironmentVariable
        variableName: COMMON_CMAKE_ARGS
        variableValue: "-DCMAKE_C_COMPILER=cl.exe -DCMAKE_CXX_COMPILER=cl.exe "
        enable_if:
          condition: property
          property: host.compiler
          contains_value: MSVC
      - type: PrependToEnvironmentVariable
        variableName: COMMON_CMAKE_ARGS
        variableValue: "-DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ "
        enable_if:
          condition: property
          property: host.compiler
          contains_value: Clang
    disable_if:
      condition: and
      conditions:
        - condition: runtime
          env_var: COMMON_CMAKE_ARGS
          contains_value: "-DCMAKE_C_COMPILER="
        - condition: runtime
          env_var: COMMON_CMAKE_ARGS
          contains_value: "-DCMAKE_CXX_COMPILER="


  # Export TARGET_ARCHITECTURE and WINDOWS_SDK_VERSION for MSVC cross compilation
  - type: Group
    enable_if:
      condition: and
      conditions:
        - condition: property
          property: host.os
          equals_value: Windows
        - condition: property
          property: host.compiler
          not_contains_value: Mingw
    instructions:
      - type: EnvironmentVariable
        variableName: TARGET_ARCHITECTURE
        variableValue: amd64 # TODO add something like "{{toLower .Config host.arch}}"
        disable_if:
          condition: property
          property: host.arch
          not_equals_property: target.arch
      - type: EnvironmentVariable
        variableName: TARGET_ARCHITECTURE
        variableValue: amd64_x86
        enable_if:
          condition: and
          conditions:
            - condition: property
              property: target.arch
              equals_property: X86
            - condition: property
              property: host.arch
              equals_property: X86_64
      - type: EnvironmentVariable
        variableName: TARGET_ARCHITECTURE
        variableValue: x64_arm64
        enable_if:
          condition: and
          conditions:
            - condition: property
              property: target.arch
              equals_value: ARM64
            - condition: property
              property: host.arch
              equals_value: X86_64
      - type: EnvironmentVariable
        variableName: TARGET_ARCHITECTURE
        variableValue: arm64
        enable_if:
          condition: and
          conditions:
            - condition: property
              property: target.arch
              in_values: ["AARCH64", "ARM64"]
            - condition: property
              property: host
              equals_property: target
      - type: EnvironmentVariable
        # HACK. Overwrite TARGET_ARCHITECTURE as we do not use standard MSVC cross
        # compilation targets here. The target architecture will be detected by Qt.
        variableName: TARGET_ARCHITECTURE
        variableValue: x86
        enable_if:
          condition: property
          property: target.os
          in_values: ["WinRT", "WinPhone", "WinCE"]
      - type: EnvironmentVariable
        variableName: WINDOWS_SDK_VERSION
        variableValue: "10.0.14393.0"
        enable_if:
          condition: property
          property: target.os
          equals_value: "WinRT"
      - type: EnvironmentVariable
        variableName: WINDOWS_SDK_VERSION
        variableValue: ""
        disable_if:
          condition: property
          property: host.os
          equals_value: "WinRT" # TODO set windows sdk version for desktop windows as well


  # MSVC is installed in somehow arbitrary places. To reduce amount of combinations we need to make a variable.
  # This seems inverted, but on 64 bit hosts VS is installed into the x86 path, otherwise the regular one
  # TODO cleanup, that step could be removed if we have same installation paths or we read the path from registry
  # or we use compiler specific generator (probably superior solution as it allows to get rid of ENV_PREFIX).
  - type: Group
    enable_if:
      condition: and
      conditions:
        - condition: property
          property: host.os
          equals_value: Windows
        - condition: property
          property: host.compiler
          contains_value: MSVC
    instructions:
      # Try to pick one of many coexistent MSVC installation to use
      # TODO cleanup, that could be much simpler if all tools are installed to similar paths, so it would
      # be enough to substitute compiler name.
      - type: EnvironmentVariable
        variableName: VC_SCRIPT
        variableValue: "%VS90COMNTOOLS%\\vsvars32.bat"
        enable_if:
          condition: property
          property: host.compiler
          equals_value: MSVC2008
      - type: EnvironmentVariable
        variableName: VC_SCRIPT
        variableValue: "%VS100COMNTOOLS%\\vsvars32.bat"
        enable_if:
          condition: property
          property: host.compiler
          equals_value: MSVC2010
      - type: EnvironmentVariable
        variableName: VC_SCRIPT
        variableValue: "%ProgramFiles(x86)%\\Microsoft Visual Studio 11.0\\VC\\vcvarsall.bat"
        enable_if:
          condition: property
          property: host.compiler
          equals_value: MSVC2012
      - type: EnvironmentVariable
        variableName: VC_SCRIPT
        variableValue: "%ProgramFiles(x86)%\\Microsoft Visual Studio 12.0\\VC\\vcvarsall.bat"
        enable_if:
          condition: property
          property: host.compiler
          equals_value: MSVC2013
      - type: EnvironmentVariable
        variableName: VC_SCRIPT
        variableValue: "%ProgramFiles(x86)%\\Microsoft Visual Studio 14.0\\VC\\vcvarsall.bat"
        enable_if:
          condition: property
          property: host.compiler
          equals_value: MSVC2015
      - type: EnvironmentVariable
        variableName: VC_SCRIPT
        variableValue: "%ProgramFiles(x86)%\\Microsoft Visual Studio\\2017\\Professional\\VC\\Auxiliary\\Build\\vcvarsall.bat"
        enable_if:
          condition: property
          property: host.compiler
          equals_value: MSVC2017
      - type: EnvironmentVariable
        variableName: VC_SCRIPT
        variableValue: "%ProgramFiles(x86)%\\Microsoft Visual Studio\\2019\\Professional\\VC\\Auxiliary\\Build\\vcvarsall.bat"
        enable_if:
          condition: property
          property: host.compiler
          equals_value: MSVC2019
      - type: EnvironmentVariable
        variableName: VC_SCRIPT
        variableValue: "%ProgramFiles%\\Microsoft Visual Studio\\2022\\Preview\\VC\\Auxiliary\\Build\\vcvarsall.bat"
        enable_if:
          condition: property
          property: host.compiler
          equals_value: MSVC2022_PREVIEW
      - type: EnvironmentVariable
        variableName: VC_SCRIPT
        variableValue: "%ProgramFiles%\\Microsoft Visual Studio\\2022\\Professional\\VC\\Auxiliary\\Build\\vcvarsall.bat"
        enable_if:
          condition: property
          property: host.compiler
          equals_value: MSVC2022


  # With MSVC we need setup the environment before every subprocess call, the group below creates a script that
  # does it. It is enough to prepand it to every call (it is safe to add it even on other OSes)
  - type: Group
    instructions:
    - type: WriteFile
      fileContents: "call \"{{.Env.VC_SCRIPT}}\" {{.Env.TARGET_ARCHITECTURE}} {{.Env.WINDOWS_SDK_VERSION}}\r\ncmd /c %*"
      filename: c:\\users\\qt\\prefix.bat
      fileMode: 420
      maxTimeInSeconds: 20
      maxTimeBetweenOutput: 20
      enable_if:
        condition: and
        conditions:
          - condition: property
            property: host.os
            equals_value: Windows
          - condition: property
            property: host.compiler
            contains_value: MSVC
    - type: EnvironmentVariable
      variableName: ENV_PREFIX
      variableValue: "c:\\users\\qt\\prefix.bat"
      enable_if:
        condition: and
        conditions:
          - condition: property
            property: host.os
            equals_value: Windows
          - condition: property
            property: host.compiler
            contains_value: MSVC
    - type: EnvironmentVariable
      variableName: ENV_PREFIX
      variableValue: ""
      disable_if:
        condition: and
        conditions:
          - condition: property
            property: host.os
            equals_value: Windows
          - condition: property
            property: host.compiler
            contains_value: MSVC

  - type: Group
    instructions:
    # Need to unset QMAKESPEC, so that the pre-installed boot2qt mkspec is not picked up.
    - type: WriteFile
      fileContents: "#!/bin/bash\nunset LD_LIBRARY_PATH\n. {{.Env.QT_YOCTO_ENVSETUP}}\nexport PATH={{.Env.QT_CMAKE_DIR}}:$PATH;\nunset QMAKESPEC\n\"$@\""
      filename: "{{.Env.HOME}}/prefix.sh"
      fileMode: 493
      maxTimeInSeconds: 20
      maxTimeBetweenOutput: 20
      enable_if:
        condition: property
        property: target.osVersion
        equals_value: QEMU
    - type: EnvironmentVariable
      variableName: TARGET_ENV_PREFIX
      variableValue: "{{.Env.HOME}}/prefix.sh"
      enable_if:
        condition: property
        property: target.osVersion
        in_values: [QEMU]
    - type: EnvironmentVariable
      variableName: TARGET_ENV_PREFIX
      variableValue: ""
      disable_if:
        condition: property
        property: target.osVersion
        in_values: [QEMU]
    # This fixes an issue where binfmts is sometimes disabled on the test VMs
    - type: ExecuteCommand
      command: sudo update-binfmts --enable
      userMessageOnFailure: "Failed to enable binfmts"
      enable_if:
        condition: property
        property: target.osVersion
        equals_value: QEMU

  # Windows on Arm, cross-compilation with MSVC
  - type: Group
    enable_if:
      condition: and
      conditions:
        - condition: property
          property: host.compiler
          equals_value: MSVC2019
        - condition: property
          property: target.arch
          equals_value: ARM64
    instructions:
      - type: EnvironmentVariable
        variableName: TARGET_ENV_PREFIX
        variableValue: "c:\\users\\qt\\prefix.bat"

  # VxWorks
  - type: Group
    enable_if:
      condition: property
      property: target.osVersion
      equals_value: VxWorks
    instructions:
      - type: EnvironmentVariable
        variableName: TARGET_ENV_PREFIX
        variableValue: "{{.Env.VXWORKS_HOME}}/wrenv.linux"

  # QNX variables
  - type: Group
    enable_if:
      condition: and
      conditions:
        - condition: property
          property: host.os
          equals_value: Linux
        - condition: property
          property: target.os
          equals_value: QNX
    instructions:
    - type: EnvironmentVariable
      variableName: QNX_TARGET
      variableValue: "{{.Env.QNX_710}}/target/qnx7"
    - type: EnvironmentVariable
      variableName: QNX_CONFIGURATION_EXCLUSIVE
      variableValue: "{{.Env.HOME}}/.qnx"
    - type: EnvironmentVariable
      variableName: QNX_CONFIGURATION
      variableValue: "{{.Env.HOME}}/.qnx"
    - type: PrependToEnvironmentVariable
      variableName: PATH
      variableValue: "{{.Env.QNX_710}}/host/linux/x86_64/usr/bin:"
    - type: PrependToEnvironmentVariable
      variableName: PATH
      variableValue: "{{.Env.QNX_710}}/host/common/bin:"
    - type: PrependToEnvironmentVariable
      variableName: PATH
      variableValue: "{{.Env.HOME}}/.qnx:"
    - type: EnvironmentVariable
      variableName: QNX_HOST
      variableValue: "{{.Env.QNX_710}}/host/linux/x86_64"
    - type: AppendToEnvironmentVariable
      variableName: PATH
      variableValue: ":{{.Env.QEMUARMV7_TOOLCHAIN_SYSROOT}}/../x86_64-pokysdk-linux/usr/bin:"

  - type: Group
    enable_if:
      condition: and
      conditions:
        - condition: property
          property: host.os
          equals_value: Windows
        - condition: property
          property: target.os
          equals_value: QNX
    instructions:
    - type: EnvironmentVariable
      variableName: QNX_TARGET
      variableValue: "{{.Env.QNX_710_CMAKE}}/target/qnx7"
    - type: EnvironmentVariable
      variableName: QNX_CONFIGURATION_EXCLUSIVE
      variableValue: "{{.Env.HOMEPATH}}\\.qnx"
    - type: EnvironmentVariable
      variableName: QNX_CONFIGURATION
      variableValue: "{{.Env.HOMEPATH}}\\.qnx"
    - type: PrependToEnvironmentVariable
      variableName: PATH
      variableValue: "{{.Env.QNX_710}}\\host\\win64\\x86_64\\usr\\bin;"
    - type: PrependToEnvironmentVariable
      variableName: PATH
      variableValue: "{{.Env.QNX_710}}\\host\\common\\bin;"
    - type: PrependToEnvironmentVariable
      variableName: PATH
      variableValue: "{{.Env.HOMEPATH}}\\.qnx;"
    - type: EnvironmentVariable
      variableName: QNX_HOST
      variableValue: "{{.Env.QNX_710}}\\host\\win64\\x86_64"

  # Enable warnings are errors
  - type: Group
    instructions:
      - type: AppendToEnvironmentVariable
        variableName: COMMON_CMAKE_ARGS
        variableValue: " -DWARNINGS_ARE_ERRORS=ON"
      - type: AppendToEnvironmentVariable
        variableName: COMMON_TARGET_CMAKE_ARGS
        variableValue: " -DWARNINGS_ARE_ERRORS=ON"
    enable_if:
      condition: property
      property: features
      contains_value: WarningsAreErrors

  - type: Group
    enable_if:
      condition: property
      property: features
      contains_value: UseAddressSanitizer
    instructions:
    - type: AppendToEnvironmentVariable
      variableName: COMMON_CMAKE_ARGS
      variableValue: " -DFEATURE_sanitize_address=ON"
      disable_if:
        condition: property
        property: features
        contains_value: UseConfigure
    - type: AppendToEnvironmentVariable
      variableName: CONFIGURE_ARGS
      variableValue: " -sanitize address"
      enable_if:
        condition: property
        property: features
        contains_value: UseConfigure

  - type: Group
    instructions:
      - type: AppendToEnvironmentVariable
        variableName: COMMON_CMAKE_ARGS
        variableValue: " -DQT_BUILD_TESTS=OFF -DCMAKE_AUTOGEN_VERBOSE=ON -DCMAKE_MESSAGE_LOG_LEVEL=STATUS"
      - type: AppendToEnvironmentVariable
        variableName: COMMON_NON_QTBASE_CMAKE_ARGS
        variableValue: " -DQT_BUILD_TESTS=OFF -DCMAKE_AUTOGEN_VERBOSE=ON -DCMAKE_MESSAGE_LOG_LEVEL=STATUS"
      - type: AppendToEnvironmentVariable
        variableName: COMMON_TEST_CMAKE_ARGS
        variableValue: " -DCMAKE_AUTOGEN_VERBOSE=ON -DCMAKE_MESSAGE_LOG_LEVEL=STATUS"
      - type: AppendToEnvironmentVariable
        variableName: COMMON_EXAMPLES_CMAKE_ARGS
        variableValue: " -DCMAKE_AUTOGEN_VERBOSE=ON -DCMAKE_MESSAGE_LOG_LEVEL=STATUS"

      - type: AppendToEnvironmentVariable
        variableName: COMMON_TARGET_CMAKE_ARGS
        variableValue: " -DQT_BUILD_TESTS=OFF -DCMAKE_AUTOGEN_VERBOSE=ON -DCMAKE_MESSAGE_LOG_LEVEL=STATUS"
      - type: AppendToEnvironmentVariable
        variableName: COMMON_NON_QTBASE_TARGET_CMAKE_ARGS
        variableValue: " -DQT_BUILD_TESTS=OFF -DCMAKE_AUTOGEN_VERBOSE=ON -DCMAKE_MESSAGE_LOG_LEVEL=STATUS"
      - type: AppendToEnvironmentVariable
        variableName: COMMON_TARGET_TEST_CMAKE_ARGS
        variableValue: " -DCMAKE_AUTOGEN_VERBOSE=ON -DCMAKE_MESSAGE_LOG_LEVEL=STATUS"
      - type: AppendToEnvironmentVariable
        variableName: COMMON_TARGET_EXAMPLES_CMAKE_ARGS
        variableValue: " -DCMAKE_AUTOGEN_VERBOSE=ON -DCMAKE_MESSAGE_LOG_LEVEL=STATUS"

  # Sccache
  - type: Group
    instructions:
      - type: AppendToEnvironmentVariable
        variableName: COMMON_CMAKE_ARGS
        variableValue: " -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache"
      - type: AppendToEnvironmentVariable
        variableName: COMMON_NON_QTBASE_CMAKE_ARGS
        variableValue: " -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache"
      - type: AppendToEnvironmentVariable
        variableName: COMMON_TEST_CMAKE_ARGS
        variableValue: " -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache"
      - type: AppendToEnvironmentVariable
        variableName: COMMON_EXAMPLES_CMAKE_ARGS
        variableValue: " -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache"

      - type: AppendToEnvironmentVariable
        variableName: COMMON_TARGET_CMAKE_ARGS
        variableValue: " -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache"
      - type: AppendToEnvironmentVariable
        variableName: COMMON_NON_QTBASE_TARGET_CMAKE_ARGS
        variableValue: " -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache"
      - type: AppendToEnvironmentVariable
        variableName: COMMON_TARGET_TEST_CMAKE_ARGS
        variableValue: " -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache"
      - type: AppendToEnvironmentVariable
        variableName: COMMON_TARGET_EXAMPLES_CMAKE_ARGS
        variableValue: " -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache"
    enable_if:
      condition: property
      property: features
      contains_value: Sccache

  # Specify a custom examples installation directory, so that the built example binaries are not
  # packaged into the artifact archive together with the Qt libraries.
  # Also specify that during examples deployment, only a subset of examples should be deployed, to
  # save time and space.
  - type: Group
    instructions:
      - type: AppendToEnvironmentVariable
        variableName: COMMON_CMAKE_ARGS
        variableValue: " -DQT_INTERNAL_EXAMPLES_INSTALL_PREFIX={{unixPathSeparators .BuildDir}}/installed_examples"
      - type: AppendToEnvironmentVariable
        variableName: COMMON_TARGET_CMAKE_ARGS
        variableValue: " -DQT_INTERNAL_EXAMPLES_INSTALL_PREFIX={{unixPathSeparators .BuildDir}}/installed_examples"
      - type: AppendToEnvironmentVariable
        variableName: COMMON_CMAKE_ARGS
        variableValue: " -DQT_DEPLOY_MINIMAL_EXAMPLES=ON"
      - type: AppendToEnvironmentVariable
        variableName: COMMON_TARGET_CMAKE_ARGS
        variableValue: " -DQT_DEPLOY_MINIMAL_EXAMPLES=ON"
      - type: Group
        instructions:
          - type: AppendToEnvironmentVariable
            variableName: COMMON_CMAKE_ARGS
            variableValue: " -DQT_INTERNAL_CI_NO_BUILD_IN_TREE_EXAMPLES=ON"
          - type: AppendToEnvironmentVariable
            variableName: COMMON_TARGET_CMAKE_ARGS
            variableValue: " -DQT_INTERNAL_CI_NO_BUILD_IN_TREE_EXAMPLES=ON"
        enable_if:
          condition: property
          property: features
          contains_value: StandaloneExamples
    enable_if:
      # Only set the custom installation dir if examples are built.
      condition: or
      conditions:
        # qtbase host case
        - condition: runtime
          env_var: CONFIGURE_ARGS
          contains_value: "QT_BUILD_EXAMPLES=ON"
        # qtbase target case
        - condition: runtime
          env_var: TARGET_CONFIGURE_ARGS
          contains_value: "QT_BUILD_EXAMPLES=ON"
        # non-qtbase host case
        - condition: runtime
          env_var: NON_QTBASE_CONFIGURE_ARGS
          contains_value: "QT_BUILD_EXAMPLES=ON"
        # non-qtbase target case
        - condition: runtime
          env_var: NON_QTBASE_TARGET_CONFIGURE_ARGS
          contains_value: "QT_BUILD_EXAMPLES=ON"
        # Same as above, but for configurations marked with UseConfigure
        # qtbase host case
        - condition: runtime
          env_var: CONFIGURE_ARGS
          contains_value: "-make examples"
        # qtbase target case
        - condition: runtime
          env_var: TARGET_CONFIGURE_ARGS
          contains_value: "-make examples"
        # non-qtbase host case
        - condition: runtime
          env_var: NON_QTBASE_CONFIGURE_ARGS
          contains_value: "-make examples"
        # non-qtbase target case
        - condition: runtime
          env_var: NON_QTBASE_TARGET_CONFIGURE_ARGS
          contains_value: "-make examples"

  - type: SetEnvironmentFromScript
    command: [C:\Utils\emsdk\emsdk_env.bat]
    userMessageOnFailure: "Failed to set emscripten environment"
    maxTimeInSeconds: 60
    maxTimeBetweenOutput: 60
    enable_if:
      condition: and
      conditions:
        - condition: property
          property: target.osVersion
          contains_value: WebAssembly
        - condition: property
          property: host.os
          contains_value: Windows

  - type: EnvironmentVariable
    variableName: HOST_INSTALL_DIR
    variableValue: "{{$android_host_artifact_path := index .Env \"QT_CI_ARTIFACT_ID_PATH_Android-host\" }}{{index .Env $android_host_artifact_path}}/install"
    enable_if:
      condition: and
      conditions:
        - condition: property
          property: target.osVersion
          equals_value: Android_ANY
        - condition: property
          property: target.arch
          equals_value: Multi

  - type: EnvironmentVariable
    variableName: HOST_INSTALL_DIR
    variableValue: "{{.InstallDir}}"
    disable_if:
      condition: and
      conditions:
        - condition: property
          property: target.osVersion
          equals_value: Android_ANY
        - condition: property
          property: target.arch
          equals_value: Multi

  - type: EnvironmentVariable
    variableName: LIBEXEC_INSTALL_DIR
    variableValue: "{{.Env.HOST_INSTALL_DIR}}\\bin\\"
    enable_if:
      condition: property
      property: host.os
      equals_value: Windows
  - type: EnvironmentVariable
    variableName: LIBEXEC_INSTALL_DIR
    variableValue: "{{.Env.HOST_INSTALL_DIR}}/libexec/"
    disable_if:
      condition: property
      property: host.os
      equals_value: Windows

  - type: EnvironmentVariable
    variableName: COIN_COMMAND_OUTPUT_TIMEOUT
    variableValue: "900"
    disable_if:
      condition: property
      property: features
      contains_value: UseAddressSanitizer
  - type: EnvironmentVariable
    variableName: COIN_COMMAND_OUTPUT_TIMEOUT
    variableValue: "10800"
    enable_if:
      condition: property
      property: features
      contains_value: UseAddressSanitizer