-
Notifications
You must be signed in to change notification settings - Fork 4.5k
/
wasm-library-tests.yml
96 lines (93 loc) · 4.23 KB
/
wasm-library-tests.yml
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
parameters:
alwaysRun: false
extraBuildArgs: ''
extraHelixArgs: ''
isExtraPlatformsBuild: false
isWasmOnlyBuild: false
nameSuffix: ''
platforms: []
scenarios: ['normal']
shouldContinueOnError: false
shouldRunSmokeOnly: false
jobs:
#
# Build for Browser/wasm and test it
#
- template: /eng/pipelines/common/platform-matrix.yml
parameters:
jobTemplate: /eng/pipelines/common/global-build-job.yml
helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml
buildConfig: Release
runtimeFlavor: mono
platforms: ${{ parameters.platforms }}
shouldContinueOnError: ${{ parameters.shouldContinueOnError }}
variables:
# map dependencies variables to local variables
- name: alwaysRunVar
value: ${{ parameters.alwaysRun }}
# - wasm darc deps changed
# - any libs that can have wasm specific changes
# - any other wasm specific changes that are not wbt, or dbg
- name: shouldRunOnDefaultPipelines
value: $[
or(
eq(variables['wasmDarcDependenciesChanged'], true),
eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_tools_illink.containsChange'], true),
eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true),
eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_wasm_chrome.containsChange'], true),
eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_wasm_specific_except_wbt_dbg.containsChange'], true))
]
# run smoke tests only if:
# - explicitly requested
# - libraries or illink changed and no wasm specific changes
- name: shouldRunSmokeOnlyVar
value: $[
or(
eq('${{ parameters.shouldRunSmokeOnly }}', 'true'),
and(
eq('${{ parameters.shouldRunSmokeOnly }}', 'onLibrariesAndIllinkChanges'),
ne(variables['wasmDarcDependenciesChanged'], true),
or(
eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_tools_illink.containsChange'], true),
eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true)
),
ne(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_wasm_chrome.containsChange'], true),
ne(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_wasm_specific_except_wbt_dbg.containsChange'], true)
)
)
]
- name: _wasmRunSmokeTestsOnlyArg
value: /p:RunSmokeTestsOnly=$(shouldRunSmokeOnlyVar)
- name: chromeInstallArg
${{ if containsValue(parameters.scenarios, 'WasmTestOnChrome') }}:
value: /p:InstallChromeForTests=true
${{ else }}:
value: ''
- name: v8InstallArg
${{ if containsValue(parameters.scenarios, 'normal') }}:
value: /p:InstallV8ForTests=true
${{ else }}:
value: ''
jobParameters:
isExtraPlatforms: ${{ parameters.isExtraPlatformsBuild }}
testGroup: innerloop
nameSuffix: LibraryTests${{ parameters.nameSuffix }}
buildArgs: -s mono+libs+host+packs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true /p:MonoEnableAssertMessages=true /p:BrowserHost=$(_hostedOs) $(_wasmRunSmokeTestsOnlyArg) $(chromeInstallArg) $(v8InstallArg) ${{ parameters.extraBuildArgs }}
timeoutInMinutes: 240
# if !alwaysRun, then:
# if this is runtime-wasm (isWasmOnlyBuild):
# - then run only if it would not have run on default pipelines (based
# on path changes)
# - else run based on path changes
condition: >-
or(
eq(variables['alwaysRunVar'], true),
eq(variables['isDefaultPipeline'], variables['shouldRunOnDefaultPipelines']))
# extra steps, run tests
postBuildSteps:
- template: /eng/pipelines/libraries/helix.yml
parameters:
creator: dotnet-bot
testRunNamePrefixSuffix: Mono_$(_BuildConfig)
extraHelixArguments: /p:BrowserHost=$(_hostedOs) $(_wasmRunSmokeTestsOnlyArg) ${{ parameters.extraHelixArgs }}
scenarios: ${{ parameters.scenarios }}