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

Improve CI path-changes-based-triggers to work better #79127

Merged
merged 19 commits into from
Feb 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
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
117 changes: 55 additions & 62 deletions eng/pipelines/common/evaluate-default-paths.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,11 @@ parameters:
eng/testing/scenarios/BuildWasmAppsJobsList.txt
eng/testing/tests.wasm.targets
src/libraries/sendtohelix-wasm.targets
src/mono/mono/**/*wasm*
src/mono/nuget/Microsoft.NET.Runtime.WebAssembly.Sdk/*
src/mono/nuget/Microsoft.NET.Runtime.wasm.Sample.Mono/*
src/mono/nuget/Microsoft.NETCore.BrowserDebugHost.Transport/*
src/mono/nuget/Microsoft.NET.Workload*
src/mono/sample/wasm/*
src/mono/wasi/*
src/mono/wasm/*
Expand All @@ -23,10 +26,25 @@ parameters:
_wasm_pipelines: [
eng/pipelines/**/*wasm*
]
_wasm_src_native: [
src/native/minipal/*
src/native/libs/CMakeLists.txt
src/native/libs/configure.cmake
src/native/libs/build*
src/native/libs/Common/*
src/native/libs/System.Globalization.Native/*
src/native/libs/System.IO.Compression.Native/*
src/native/libs/System.Native/*
]

# src/workloads is only used in runtime-official builds
# where evaluate-paths is not used
_always_exclude: [
eng/pipelines/common/evaluate-default-paths.yml
'*.md'
LICENSE.TXT
PATENTS.TXT
THIRD-PARTY-NOTICES.TXT
src/workloads/*
]

Expand All @@ -42,10 +60,6 @@ jobs:
- src/native/libs/System.IO.Compression.Native/*
exclude:
- eng/Version.Details.xml
- '*.md'
- LICENSE.TXT
- PATENTS.TXT
- THIRD-PARTY-NOTICES.TXT
- docs/*
- src/installer/*
- src/mono/*
Expand All @@ -71,10 +85,6 @@ jobs:
- ${{ parameters._const_paths._always_exclude }}

- eng/Version.Details.xml
- '*.md'
- LICENSE.TXT
- PATENTS.TXT
- THIRD-PARTY-NOTICES.TXT
- docs/*
- src/installer/*
- src/coreclr/*
Expand All @@ -89,10 +99,6 @@ jobs:
- subset: libraries
exclude:
- eng/Version.Details.xml
- '*.md'
- LICENSE.TXT
- PATENTS.TXT
- THIRD-PARTY-NOTICES.TXT
- docs/*
- src/installer/*
- src/mono/*
Expand All @@ -114,21 +120,11 @@ jobs:
include:
- src/tools/illink/*

- subset: non_runtimetests
exclude:
- src/tests/*
- ${{ parameters._const_paths._wasm_pipelines }}
- ${{ parameters._const_paths._always_exclude }}

- subset: installer
include:
- docs/manpages/*
exclude:
- eng/Version.Details.xml
- '*.md'
- LICENSE.TXT
- PATENTS.TXT
- THIRD-PARTY-NOTICES.TXT
- docs/*
- src/coreclr/*
- src/mono/*
Expand All @@ -139,6 +135,7 @@ jobs:
- eng/pipelines/coreclr/*
- eng/pipelines/mono/*
- eng/pipelines/libraries/*
- ${{ parameters._const_paths._wasm_specific_only }}
- ${{ parameters._const_paths._wasm_pipelines }}
- ${{ parameters._const_paths._always_exclude }}

Expand All @@ -161,10 +158,11 @@ jobs:

#
# ** WASM **
# Changes in *only* Wasm.Build.Tests, or debugger, are very self-contained,
# so we try to avoid triggering only those relevants tests
# Changes in *only* Wasm.Build.Tests, debugger, or runtime-tests are very
# self-contained, so we try to trigger only those relevants tests
#
- subset: wasmbuildtests
combined: true
include:
- eng/Version.Details.xml
- eng/Versions.props
Expand All @@ -181,74 +179,70 @@ jobs:
- 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.Current.Manifest/*
- src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net6.Manifest/*
- src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net7.Manifest/*
- src/mono/nuget/Microsoft.NET.Workload*
- src/mono/nuget/Microsoft.NETCore.BrowserDebugHost.Transport/*
- src/mono/wasm/build/*
- src/mono/wasm/emscripten-version.txt
- src/mono/wasm/host/*
- src/mono/wasm/runtime/*
- src/mono/wasm/templates/*
- src/mono/wasm/Wasm.Build.Tests/*
- ${{ parameters._const_paths._wasm_src_native }}
- src/tasks/*
- ${{ parameters._const_paths._wasm_pipelines }}
exclude:
- ${{ parameters._const_paths._always_exclude }}

- subset: wasmdebuggertests
combined: true
include:
- eng/testing/ProvisioningVersions.props
- src/libraries/System.Runtime.InteropServices/*
- src/libraries/System.Runtime.InteropServices.JavaScript/*
- src/mono/mono/*
- src/mono/wasm/debugger/*
- src/mono/wasm/runtime/*
- ${{ parameters._const_paths._wasm_src_native }}
- ${{ parameters._const_paths._wasm_pipelines }}

- subset: any_other_than_wasm_wbt_dbg
exclude:
- src/mono/wasm/Wasm.Build.Tests/*
- src/mono/wasm/debugger/*
- ${{ parameters._const_paths._wasm_pipelines }}
- src/mono/nuget/*
- ${{ parameters._const_paths._always_exclude }}

- subset: wasm_wbt_or_dbg
# wasm/runtimetests need to be run
- subset: wasm_runtimetests
combined: true
include:
- src/mono/wasm/Wasm.Build.Tests/*
- src/tests/*
- src/mono/*
- ${{ parameters._const_paths._wasm_src_native }}
exclude:
- src/mono/nuget/*
- src/mono/sample/*
- src/mono/tests/*
- src/mono/tools/*
- src/mono/wasi/*
- src/mono/wasm/debugger/*
- src/mono/wasm/Wasm.Build.Tests/*
- ${{ parameters._const_paths._wasm_pipelines }}
- ${{ parameters._const_paths._always_exclude }}

- subset: wasm
# Wasm except Wasm.build.Tests, and debugger
- subset: wasm_specific_except_wbt_dbg
combined: true
include:
- ${{ parameters._const_paths._wasm_specific_only }}
- ${{ parameters._const_paths._wasm_pipelines }}
# other paths that should also trigger wasm jobs
- src/mono/*

# libraries with some wasm specific code
- subset: wasm_libraries
include:
- src/libraries/Common/*
- src/libraries/System.Console/*
- src/libraries/System.Diagnostics.FileVersionInfo/tests/*
- src/libraries/System.IO.Compression/*
- src/libraries/System.IO.MemoryMappedFiles/*
- src/libraries/System.Net.Http/*
- src/libraries/System.Net.Mail/*
- src/libraries/System.Net.Primitives/*
- src/libraries/System.Net.WebClient/*
- src/libraries/System.Net.WebProxy/*
- src/libraries/System.Net.WebSockets.Client/*
- src/libraries/System.Net.WebSockets/*
- src/libraries/System.Runtime.InteropServices.JavaScript/*
- src/libraries/System.Runtime.InteropServices/*
- src/libraries/System.Runtime.Serialization.Formatters/*
- src/libraries/System.Security.Cryptography/*
- src/libraries/System.Text.Encodings.Web/*

# anything other than wasm-specific paths
- subset: non_wasm
exclude:
- ${{ parameters._const_paths._wasm_specific_only }}
- ${{ parameters._const_paths._wasm_pipelines }}
- eng/testing/scenarios/BuildWasmAppsJobsList.txt
- eng/testing/workloads-testing.targets
- src/mono/mono/component/mini-wasm-debugger.c
- src/mono/wasm/debugger/*
- src/mono/wasm/Wasm.Build.Tests/*
- src/mono/nuget/Microsoft.NET.Runtime*
- src/mono/nuget/Microsoft.NET.Workload*
- src/mono/nuget/Microsoft.NETCore.BrowserDebugHost.Transport/*
- ${{ parameters._const_paths._always_exclude }}

# anything other than mono, or wasm specific paths
Expand All @@ -258,7 +252,6 @@ jobs:
- ${{ parameters._const_paths._wasm_specific_only }}
- ${{ parameters._const_paths._wasm_pipelines }}
- ${{ parameters._const_paths._always_exclude }}

- eng/testing/tests.mobile.targets
- src/mono/*
- src/tasks/AndroidAppBuilder/*
Expand Down
2 changes: 2 additions & 0 deletions eng/pipelines/common/evaluate-paths-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ jobs:
parameters:
subsetName: ${{ path.subset }}
arguments:
- ${{ if eq(path.combined, true) }}:
- --combined
# The commit that we're building is always a merge commit that is merging into the target branch.
# So the first parent of the commit is on the target branch and the second parent is on the source branch.
- --difftarget HEAD^1
Expand Down
6 changes: 1 addition & 5 deletions eng/pipelines/common/templates/wasm-build-only.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,7 @@ jobs:
or(
eq(variables['wasmDarcDependenciesChanged'], true),
eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true),
and(
eq(dependencies.evaluate_paths.outputs['SetPathVars_wasm.containsChange'], true),
eq(dependencies.evaluate_paths.outputs['SetPathVars_non_runtimetests.containsChange'], true)),
eq(dependencies.evaluate_paths.outputs['SetPathVars_wasm_libraries.containsChange'], true),
eq(dependencies.evaluate_paths.outputs['SetPathVars_mono_excluding_wasm.containsChange'], true))
eq(dependencies.evaluate_paths.outputs['SetPathVars_wasm_specific_except_wbt_dbg.containsChange'], true))
]
jobParameters:
isExtraPlatforms: ${{ parameters.isExtraPlatformsBuild }}
Expand Down
5 changes: 0 additions & 5 deletions eng/pipelines/common/templates/wasm-build-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,6 @@ jobs:
nameSuffix: WasmBuildTests
buildArgs: -s mono+libs+host+packs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true /p:TestWasmBuildTests=true /p:TestAssemblies=false /p:BrowserHost=$(_hostedOs)
timeoutInMinutes: 180
# 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),
Expand Down
1 change: 1 addition & 0 deletions eng/pipelines/common/templates/wasm-debugger-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ jobs:
value: $[
or(
eq(variables['wasmDarcDependenciesChanged'], true),
eq(dependencies.evaluate_paths_outputs['DarcDependenciesChanged.Microsoft_DotNet_HotReload_Utils_Generator_BuildTool'], true),
eq(dependencies.evaluate_paths.outputs['SetPathVars_wasmdebuggertests.containsChange'], true))
]
jobParameters:
Expand Down
21 changes: 6 additions & 15 deletions eng/pipelines/common/templates/wasm-library-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,25 +27,16 @@ jobs:
# 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),
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_libraries.containsChange'], true),
and(
eq(dependencies.evaluate_paths.outputs['SetPathVars_wasm.containsChange'], true),
eq(dependencies.evaluate_paths.outputs['SetPathVars_non_runtimetests.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))
eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true),
eq(dependencies.evaluate_paths.outputs['SetPathVars_wasm_specific_except_wbt_dbg.containsChange'], true))
]
- name: _wasmRunSmokeTestsOnlyArg
value: /p:RunSmokeTestsOnly=${{ eq(parameters.shouldRunSmokeOnly, true) }}
- name: chromeInstallArg
Expand Down
9 changes: 1 addition & 8 deletions eng/pipelines/common/templates/wasm-runtime-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ jobs:
value: $[
or(
eq(variables['wasmDarcDependenciesChanged'], true),
eq(dependencies.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true),
eq(dependencies.evaluate_paths.outputs['SetPathVars_wasm.containsChange'], true))
eq(dependencies.evaluate_paths.outputs['SetPathVars_wasm_runtimetests.containsChange'], true))
]
jobParameters:
testGroup: innerloop
Expand All @@ -37,12 +36,6 @@ 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
# on path changes)
# - else run based on path changes
condition: >-
or(
eq(variables['alwaysRunVar'], true),
Expand Down
Loading