Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: Reduce the unrelated jobs running on wasm only PRs #74601

Merged
merged 17 commits into from
Sep 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion eng/pipelines/common/evaluate-changed-paths.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ parameters:

steps:
- ${{ if ne(parameters.arguments[0], '') }}:
- script: eng/pipelines/evaluate-changed-paths.sh
- script: >-
eng/pipelines/evaluate-changed-paths.sh
--azurevariable containsChange
${{ join(' ', parameters.arguments) }}
displayName: Evaluate paths for ${{ parameters.subsetName }}
Expand Down
129 changes: 84 additions & 45 deletions eng/pipelines/common/evaluate-default-paths.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,23 @@
parameters:
extraSubsets: ''

# _* parameters are being used as a const array,
# do not set them when using the template
_const_paths:
_wasm_specific_only: [
eng/testing/ProvisioningVersions.props
eng/testing/scenarios/BuildWasmAppsJobsList.txt
eng/testing/tests.wasm.targets
src/libraries/sendtohelix-wasm.targets
src/mono/nuget/Microsoft.NET.Runtime.WebAssembly.Sdk/*
src/mono/nuget/Microsoft.NET.Runtime.wasm.Sample.Mono/*
src/mono/wasi/*
src/mono/wasm/*
src/tasks/WasmAppBuilder/*
src/tasks/WasmBuildTasks/*
src/tasks/WorkloadBuildTasks/*
]

jobs:
- template: /eng/pipelines/common/evaluate-paths-job.yml
parameters:
Expand All @@ -28,13 +45,16 @@ jobs:
- eng/pipelines/mono/*
- eng/pipelines/libraries/*
- eng/pipelines/common/evaluate-default-paths.yml
- subset: mono

- subset: mono_excluding_wasm
include:
- src/libraries/System.Private.CoreLib/*
- src/native/libs/Common/*
- src/native/libs/System.Globalization.Native/*
- src/native/libs/System.IO.Compression.Native/*
exclude:
- ${{ parameters._const_paths._wasm_specific_only }}

- eng/Version.Details.xml
- '*.md'
- LICENSE.TXT
Expand All @@ -46,11 +66,11 @@ jobs:
- src/libraries/*
- src/native/libs/*
- src/tests/*
- src/mono/wasm/*
- eng/pipelines/installer/*
- eng/pipelines/coreclr/*
- eng/pipelines/libraries/*
- eng/pipelines/common/evaluate-default-paths.yml

- subset: libraries
exclude:
- eng/Version.Details.xml
Expand All @@ -68,14 +88,10 @@ jobs:
- eng/pipelines/mono/*
- eng/pipelines/installer/*
- eng/pipelines/common/evaluate-default-paths.yml

- subset: runtimetests
include:
- src/tests/*
exclude:
# wasm runtime changes will trigger all wasm jobs anyway
- src/mono/wasm/*
- src/mono/wasm/*
- eng/pipelines/common/evaluate-default-paths.yml
- subset: installer
include:
- docs/manpages/*
Expand All @@ -95,6 +111,7 @@ jobs:
- eng/pipelines/mono/*
- eng/pipelines/libraries/*
- eng/pipelines/common/evaluate-default-paths.yml

# We have limited Apple Silicon testing capacity
# We want PR testing on a narrower set of changes
# Specifically runtime directories which are higher risk of
Expand All @@ -108,61 +125,83 @@ jobs:
- src/coreclr/jit/*
- src/coreclr/pal/*
- src/coreclr/vm/*
exclude:
- '*'
- subset: coreclr_jit
include:
- src/coreclr/jit/*

#
# ** WASM **
# Changes in *only* Wasm.Build.Tests, or debugger, are very self-contained,
# so we try to avoid triggering only those relevants tests
#
- subset: wasmbuildtests
include:
- src/tasks/*
- src/mono/wasm/Directory.Build*
- src/mono/wasm/Wasm.Build.Tests/*
- src/mono/wasm/build/*
- src/mono/wasm/host/*
- src/mono/wasm/runtime/*
- src/mono/wasm/templates/*
- src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.Manifest/*
- eng/Version.Details.xml
- eng/Versions.props
- eng/testing/scenarios/BuildWasmAppsJobsList.txt
- eng/testing/workloads-testing.targets
- src/libraries/sendtohelix*
- src/mono/mono/*
- src/mono/nuget/Microsoft.NET.Runtime.MonoAOTCompiler.Task/*
- src/mono/nuget/Microsoft.NET.Runtime.MonoTargets.Sdk/*
- src/mono/nuget/Microsoft.NET.Runtime.WebAssembly.Sdk/*
- src/mono/nuget/Microsoft.NET.Runtime.wasm.Sample.Mono/*
- src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.Manifest/*
- src/mono/nuget/Microsoft.NETCore.BrowserDebugHost.Transport/*
- src/mono/nuget/Microsoft.NET.Runtime.MonoAOTCompiler.Task/*
- src/mono/nuget/Microsoft.NET.Runtime.MonoTargets.Sdk/*
- src/mono/mono/*
- eng/testing/scenarios/BuildWasmAppsJobsList.txt
- eng/testing/workloads-testing.targets
- eng/Version.Details.xml
- eng/Versions.props
- src/mono/wasm/build/*
- src/mono/wasm/emscripten-version.txt
- src/libraries/sendtohelix*
exclude:
- eng/pipelines/common/evaluate-default-paths.yml
- src/mono/wasm/host/*
- src/mono/wasm/runtime/*
- src/mono/wasm/templates/*
- src/mono/wasm/Wasm.Build.Tests/*
- src/tasks/*

- subset: wasmdebuggertests
include:
- src/mono/wasm/debugger/*
- src/mono/wasm/runtime/*
- src/mono/wasm/Directory.Build*
- src/mono/wasm/debugger/Wasm.Debugger.Tests/*
- eng/testing/ProvisioningVersions.props
- src/mono/mono/*
- src/mono/wasm/debugger/*
- src/mono/wasm/runtime/*

- subset: any_other_than_wasm_wbt_dbg
exclude:
- eng/pipelines/common/evaluate-default-paths.yml
- subset: allwasm
- src/mono/wasm/Wasm.Build.Tests/*
- src/mono/wasm/debugger/*

- subset: wasm_wbt_or_dbg
include:
- eng/Version.Details.xml
- src/mono/*.proj
- src/mono/Directory.Build*
- src/mono/CMakeLists.txt
- src/mono/System.Private.CoreLib/*
- src/mono/mono/*
- src/mono/wasm/emscripten-version.txt
- src/mono/wasm/build/*
- src/mono/wasm/data/aot-tests/*
- src/mono/wasm/runtime/*
- src/mono/wasm/test-main.js
- src/mono/wasm/wasm.proj
- src/mono/wasm/Wasm.Build.Tests/*
- src/mono/wasm/debugger/*

- subset: wasm
include:
- ${{ parameters._const_paths._wasm_specific_only }}
# other paths that should also trigger wasm jobs
- src/mono/*

# anything other than wasm-specific paths
- subset: non_wasm
exclude:
- ${{ parameters._const_paths._wasm_specific_only }}

# having this ensures that change in evaluate-default-paths.yml won't
# trigger non-onlywasm jobs
- eng/pipelines/common/evaluate-default-paths.yml

# anything other than mono, or wasm specific paths
- subset: non_mono_and_wasm
exclude:
- ${{ parameters._const_paths._wasm_specific_only }}

- eng/testing/tests.mobile.targets
- src/mono/*
- src/tasks/AndroidAppBuilder/*
- src/tasks/AotCompilerTask/*
- src/tasks/AppleAppBuilder/*
- src/tasks/MonoTargetsTasks/*
- src/tasks/WasmAppBuilder/*
- src/tasks/WasmBuildTasks/*
- src/tasks/WorkloadBuildTasks/*

- ${{ if ne(parameters.extraSubsets, '') }}:
- ${{ parameters.extraSubsets }}
1 change: 0 additions & 1 deletion eng/pipelines/common/evaluate-paths-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ parameters:
# This example will include ALL path changes under src/libraries/ except the ones under src/libraries/*!System.Private.CoreLib/*
paths: []


jobs:
- job: evaluate_paths
displayName: Evaluate Paths
Expand Down
10 changes: 2 additions & 8 deletions eng/pipelines/common/templates/wasm-build-only.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,15 @@ jobs:
platforms: ${{ parameters.platforms }}
variables:
# map dependencies variables to local variables
- name: librariesContainsChange
value: $[ dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'] ]
- name: monoContainsChange
value: $[ dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'] ]
- name: alwaysRunVar
value: ${{ parameters.alwaysRun }}
- name: allWasmContainsChange
value: $[ dependencies.evaluate_paths.outputs['SetPathVars_allwasm.containsChange'] ]
- name: shouldRunOnDefaultPipelines
value: $[
or(
eq(variables['wasmDarcDependenciesChanged'], true),
eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true),
eq(dependencies.evaluate_paths.outputs['SetPathVars_allwasm.containsChange'], true),
eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true))
eq(dependencies.evaluate_paths.outputs['SetPathVars_wasm.containsChange'], true),
eq(dependencies.evaluate_paths.outputs['SetPathVars_mono_excluding_wasm.containsChange'], true))
]
jobParameters:
isExtraPlatforms: ${{ parameters.isExtraPlatformsBuild }}
Expand Down
6 changes: 1 addition & 5 deletions eng/pipelines/common/templates/wasm-build-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,12 @@ jobs:
shouldContinueOnError: ${{ parameters.shouldContinueOnError }}
variables:
# map dependencies variables to local variables
- name: wasmbuildtestsContainsChange
value: $[ dependencies.evaluate_paths.outputs['SetPathVars_wasmbuildtests.containsChange'] ]
- name: allWasmContainsChange
value: $[ dependencies.evaluate_paths.outputs['SetPathVars_allwasm.containsChange'] ]
- name: alwaysRunVar
value: ${{ parameters.alwaysRun }}
- name: shouldRunOnDefaultPipelines
value: $[
or(
eq(variables['wasmDarcDependenciesChanged'], true),
eq(dependencies.evaluate_paths.outputs['SetPathVars_allwasm.containsChange'], true),
eq(dependencies.evaluate_paths.outputs['SetPathVars_wasmbuildtests.containsChange'], true))
]
jobParameters:
Expand All @@ -56,3 +51,4 @@ jobs:
extraHelixArguments: /p:BrowserHost=$(_hostedOs)
scenarios:
- buildwasmapps

5 changes: 0 additions & 5 deletions eng/pipelines/common/templates/wasm-debugger-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,12 @@ jobs:
shouldContinueOnError: ${{ parameters.shouldContinueOnError }}
variables:
# map dependencies variables to local variables
- name: wasmdebuggertestsContainsChange
value: $[ dependencies.evaluate_paths.outputs['SetPathVars_wasmdebuggertests.containsChange'] ]
- name: allWasmContainsChange
value: $[ dependencies.evaluate_paths.outputs['SetPathVars_allwasm.containsChange'] ]
- name: alwaysRunVar
value: ${{ parameters.alwaysRun }}
- name: shouldRunOnDefaultPipelines
value: $[
or(
eq(variables['wasmDarcDependenciesChanged'], true),
eq(dependencies.evaluate_paths.outputs['SetPathVars_allwasm.containsChange'], true),
eq(dependencies.evaluate_paths.outputs['SetPathVars_wasmdebuggertests.containsChange'], true))
]
jobParameters:
Expand Down
20 changes: 11 additions & 9 deletions eng/pipelines/common/templates/wasm-library-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,24 @@ jobs:
shouldContinueOnError: ${{ parameters.shouldContinueOnError }}
variables:
# map dependencies variables to local variables
- name: librariesContainsChange
value: $[ dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'] ]
- name: monoContainsChange
value: $[ dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'] ]
- name: alwaysRunVar
value: ${{ parameters.alwaysRun }}
- name: allWasmContainsChange
value: $[ dependencies.evaluate_paths.outputs['SetPathVars_allwasm.containsChange'] ]
- name: shouldRunOnDefaultPipelines
value: $[
or(
eq(variables['wasmDarcDependenciesChanged'], true),
eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true),
eq(dependencies.evaluate_paths.outputs['SetPathVars_allwasm.containsChange'], true),
eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true))
and(
ne(variables['onlyWBTOrDbgTestHaveChanges'], true),
or(
eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true),
eq(dependencies.evaluate_paths.outputs['SetPathVars_mono_excluding_wasm.containsChange'], true),
eq(dependencies.evaluate_paths.outputs['SetPathVars_wasm.containsChange'], true))))
]
- name: onlyWBTOrDbgTestHaveChanges
value:
and(
eq(dependencies.evaluate_paths.outputs.SetPathVars_wasm_wbt_or_dbg.containsChange, true),
ne(dependencies.evaluate_paths.outputs.SetPathVars_any_other_than_wasm_wbt_dbg.containsChange, true))
jobParameters:
isExtraPlatforms: ${{ parameters.isExtraPlatformsBuild }}
testGroup: innerloop
Expand Down
8 changes: 3 additions & 5 deletions eng/pipelines/common/templates/wasm-runtime-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ jobs:
runtimeFlavor: mono
platforms: ${{ parameters.platforms }}
variables:
- name: allWasmContainsChange
value: $[ dependencies.evaluate_paths.outputs['SetPathVars_allwasm.containsChange'] ]
- name: alwaysRunVar
value: ${{ parameters.alwaysRun }}
- name: timeoutPerTestInMinutes
Expand All @@ -29,9 +27,8 @@ jobs:
value: $[
or(
eq(variables['wasmDarcDependenciesChanged'], true),
eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true),
eq(dependencies.evaluate_paths.outputs['SetPathVars_allwasm.containsChange'], true),
eq(dependencies.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true))
eq(dependencies.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true),
eq(dependencies.evaluate_paths.outputs['SetPathVars_wasm.containsChange'], true))
]
jobParameters:
testGroup: innerloop
Expand All @@ -40,6 +37,7 @@ jobs:
runtimeVariant: monointerpreter
buildArgs: -s mono+libs -c $(_BuildConfig)
timeoutInMinutes: 180
# FIXME: will get triggered by only wbt/dbg changes
# if !alwaysRun, then:
# if this is runtime-wasm (isWasmOnlyBuild):
# - then run only if it would not have run on default pipelines (based
Expand Down
Loading