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] Break "Linux Tests" into 2 parallel jobs. #9642

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
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
61 changes: 1 addition & 60 deletions build-tools/automation/azure-pipelines.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -108,66 +108,7 @@ extends:
parameters:
macTestAgentsUseCleanImages: ${{ parameters.macTestAgentsUseCleanImages }}

- stage: linux_tests
displayName: Linux Tests
dependsOn:
- mac_build
- linux_build
jobs:
# Check - "Xamarin.Android (Linux Tests Linux > Tests > MSBuild)"
- job: linux_tests_smoke
displayName: Linux > Tests > MSBuild
pool:
name: MAUI-1ESPT
image: $(LinuxPoolImage1ESPT)
os: linux
timeoutInMinutes: 180
workspace:
clean: all
steps:
- template: /build-tools/automation/yaml-templates/setup-test-environment.yaml@self

- task: DownloadPipelineArtifact@2
inputs:
artifactName: $(TestAssembliesArtifactName)
downloadPath: $(System.DefaultWorkingDirectory)/bin/Test$(XA.Build.Configuration)

- template: /build-tools/automation/yaml-templates/run-nunit-tests.yaml@self
parameters:
testRunTitle: Xamarin.Android.Build.Tests - Linux BuildTest
testAssembly: $(System.DefaultWorkingDirectory)/bin/Test$(XA.Build.Configuration)/$(DotNetStableTargetFramework)/Xamarin.Android.Build.Tests.dll
dotNetTestExtraArgs: --filter "Name = BuildTest"

- template: /build-tools/automation/yaml-templates/run-nunit-tests.yaml@self
parameters:
testRunTitle: Xamarin.Android.Build.Tests - Linux PackagingTest
testAssembly: $(System.DefaultWorkingDirectory)/bin/Test$(XA.Build.Configuration)/$(DotNetStableTargetFramework)/Xamarin.Android.Build.Tests.dll
dotNetTestExtraArgs: --filter "Name = PackagingTest"

- template: /build-tools/automation/yaml-templates/run-nunit-tests.yaml@self
parameters:
testRunTitle: Xamarin.Android.Build.Tests - Linux XASdkTests
testAssembly: $(System.DefaultWorkingDirectory)/bin/Test$(XA.Build.Configuration)/$(DotNetStableTargetFramework)/Xamarin.Android.Build.Tests.dll
dotNetTestExtraArgs: --filter "Name = XASdkTests & Name != XamarinLegacySdk"

- template: /build-tools/automation/yaml-templates/run-nunit-tests.yaml@self
parameters:
testRunTitle: Xamarin.Android.Build.Tests - Linux AndroidDependenciesTests
testAssembly: $(System.DefaultWorkingDirectory)/bin/Test$(XA.Build.Configuration)/$(DotNetStableTargetFramework)/Xamarin.Android.Build.Tests.dll
dotNetTestExtraArgs: --filter "Name = AndroidDependenciesTests"

- task: ShellScript@2
displayName: Test dotnet-local.sh
inputs:
scriptPath: dotnet-local.sh
args: build samples/HelloWorld/HelloWorld/HelloWorld.DotNet.csproj

- template: /build-tools/automation/yaml-templates/upload-results.yaml@self
parameters:
configuration: $(XA.Build.Configuration)
artifactName: Test Results - MSBuild - Linux

- template: /build-tools/automation/yaml-templates/fail-on-issue.yaml@self
- template: /build-tools/automation/yaml-templates/stage-linux-tests.yaml@self

- template: /build-tools/automation/yaml-templates/stage-msbuild-tests.yaml@self

Expand Down
87 changes: 87 additions & 0 deletions build-tools/automation/yaml-templates/stage-linux-tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
# Runs smoke tests on Linux packages.

stages:
- stage: linux_tests
displayName: Linux Tests
dependsOn:
- mac_build
- linux_build
jobs:
# Check - "Xamarin.Android (Linux Tests Linux > Tests > MSBuild)"
- job: linux_tests_smoke_1
displayName: Linux > Tests > MSBuild 1
pool:
name: MAUI-1ESPT
image: $(LinuxPoolImage1ESPT)
os: linux
timeoutInMinutes: 180
workspace:
clean: all
steps:
- template: /build-tools/automation/yaml-templates/setup-test-environment.yaml@self

- task: DownloadPipelineArtifact@2
inputs:
artifactName: $(TestAssembliesArtifactName)
downloadPath: $(System.DefaultWorkingDirectory)/bin/Test$(XA.Build.Configuration)

- template: /build-tools/automation/yaml-templates/run-nunit-tests.yaml@self
parameters:
testRunTitle: Xamarin.Android.Build.Tests - Linux BuildTest
testAssembly: $(System.DefaultWorkingDirectory)/bin/Test$(XA.Build.Configuration)/$(DotNetStableTargetFramework)/Xamarin.Android.Build.Tests.dll
dotNetTestExtraArgs: --filter "Name = BuildTest"

- template: /build-tools/automation/yaml-templates/upload-results.yaml@self
parameters:
configuration: $(XA.Build.Configuration)
artifactName: Test Results - MSBuild - Linux 1

- template: /build-tools/automation/yaml-templates/fail-on-issue.yaml@self

- job: linux_tests_smoke_2
displayName: Linux > Tests > MSBuild 2
pool:
name: MAUI-1ESPT
image: $(LinuxPoolImage1ESPT)
os: linux
timeoutInMinutes: 180
workspace:
clean: all
steps:
- template: /build-tools/automation/yaml-templates/setup-test-environment.yaml@self

- task: DownloadPipelineArtifact@2
inputs:
artifactName: $(TestAssembliesArtifactName)
downloadPath: $(System.DefaultWorkingDirectory)/bin/Test$(XA.Build.Configuration)

- template: /build-tools/automation/yaml-templates/run-nunit-tests.yaml@self
parameters:
testRunTitle: Xamarin.Android.Build.Tests - Linux PackagingTest
testAssembly: $(System.DefaultWorkingDirectory)/bin/Test$(XA.Build.Configuration)/$(DotNetStableTargetFramework)/Xamarin.Android.Build.Tests.dll
dotNetTestExtraArgs: --filter "Name = PackagingTest"

- template: /build-tools/automation/yaml-templates/run-nunit-tests.yaml@self
parameters:
testRunTitle: Xamarin.Android.Build.Tests - Linux XASdkTests
testAssembly: $(System.DefaultWorkingDirectory)/bin/Test$(XA.Build.Configuration)/$(DotNetStableTargetFramework)/Xamarin.Android.Build.Tests.dll
dotNetTestExtraArgs: --filter "Name = XASdkTests & Name != XamarinLegacySdk"

- template: /build-tools/automation/yaml-templates/run-nunit-tests.yaml@self
parameters:
testRunTitle: Xamarin.Android.Build.Tests - Linux AndroidDependenciesTests
testAssembly: $(System.DefaultWorkingDirectory)/bin/Test$(XA.Build.Configuration)/$(DotNetStableTargetFramework)/Xamarin.Android.Build.Tests.dll
dotNetTestExtraArgs: --filter "Name = AndroidDependenciesTests"

- task: ShellScript@2
displayName: Test dotnet-local.sh
inputs:
scriptPath: dotnet-local.sh
args: build samples/HelloWorld/HelloWorld/HelloWorld.DotNet.csproj

- template: /build-tools/automation/yaml-templates/upload-results.yaml@self
parameters:
configuration: $(XA.Build.Configuration)
artifactName: Test Results - MSBuild - Linux 2

- template: /build-tools/automation/yaml-templates/fail-on-issue.yaml@self
Loading