-
Notifications
You must be signed in to change notification settings - Fork 564
[ci] Parallelize and reduce overhead of MSBuild test stage. #7850
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
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
c16e1a4
[ci] Parallelize and reduce overhead of MSBuild test stage.
jpobst 9cadfca
Don't provision unneeded dependencies.
jpobst ef15fdb
Refactor to 'run-sliced-nunit-tests'.
jpobst 5517295
Refactor to 'run-msbuild-tests'.
jpobst 189c376
Use same template for MSBuild Smoke tests.
jpobst 6c9d871
Update dotnet-test-slicer to fix some missing tests.
jpobst 2664afb
Run Xamarin.Android.Tools.Aidl-Tests.
jpobst ac24831
Remove "Node-X" categories.
jpobst 197964c
Update Xamarin.Android.Tools.Aidl-Tests.csprj.
jpobst 6127628
Move Aidl-Tests to Xamarin.Android.sln.
jpobst f0a24bf
Download test assemblies.
jpobst File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
build-tools/automation/yaml-templates/install-dotnet-test-slicer.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| parameters: | ||
| version: '0.1.0-alpha1' | ||
| version: '0.1.0-alpha2' | ||
| condition: succeeded() | ||
| continueOnError: true | ||
|
|
||
|
|
||
66 changes: 0 additions & 66 deletions
66
build-tools/automation/yaml-templates/run-msbuild-mac-tests.yaml
This file was deleted.
Oops, something went wrong.
54 changes: 54 additions & 0 deletions
54
build-tools/automation/yaml-templates/run-msbuild-tests.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| parameters: | ||
| testOS: # 'macOS' or 'Windows' | ||
| jobName: # Name of the job | ||
| jobDisplayName: # Display name of the job | ||
| agentCount: # Number of build agents to run in parallel | ||
| testFilter: # Filter used to select tests (NUnit test selection language, not dotnet test filter language) | ||
| installApkDiff: false # Smoke tests use apkdiff, others do not | ||
|
|
||
| jobs: | ||
| - job: ${{ parameters.jobName }} | ||
| strategy: | ||
| parallel: ${{ parameters.agentCount }} | ||
| displayName: ${{ parameters.jobDisplayName }} | ||
| ${{ if eq(parameters.testOS, 'Windows') }}: | ||
| pool: $(1ESWindowsPool) | ||
| ${{ if eq(parameters.testOS, 'macOS') }}: | ||
| pool: | ||
| vmImage: $(HostedMacImage) | ||
| timeoutInMinutes: 180 | ||
| cancelTimeoutInMinutes: 5 | ||
| steps: | ||
| - ${{ if eq(parameters.testOS, 'Windows') }}: | ||
| - script: netsh int ipv4 set global sourceroutingbehavior=drop | ||
|
|
||
| - template: kill-processes.yaml | ||
|
|
||
| - template: clean.yaml | ||
|
|
||
| - template: setup-test-environment.yaml | ||
| parameters: | ||
| provisionClassic: false | ||
| installTestSlicer: true | ||
| installApkDiff: ${{ parameters.installApkDiff }} | ||
| installLegacyDotNet: false | ||
| restoreNUnitConsole: false | ||
| updateMono: false | ||
|
|
||
| - task: DownloadPipelineArtifact@2 | ||
| inputs: | ||
| artifactName: $(TestAssembliesArtifactName) | ||
| downloadPath: $(System.DefaultWorkingDirectory)/bin/Test$(XA.Build.Configuration) | ||
|
|
||
| - template: run-sliced-nunit-tests.yaml | ||
| parameters: | ||
| testAssembly: $(System.DefaultWorkingDirectory)/bin/Test$(XA.Build.Configuration)/$(DotNetStableTargetFramework)/Xamarin.Android.Build.Tests.dll | ||
| testFilter: ${{ parameters.testFilter }} $(ExcludedNUnitCategories) | ||
| testRunTitle: Xamarin.Android.Build.Tests - ${{ parameters.testOS }} | ||
| testResultsTitle: TestResult-MSBuildTests-${{ parameters.jobName }} | ||
|
|
||
| - template: upload-results.yaml | ||
| parameters: | ||
| artifactName: Test Results - MSBuild - ${{ parameters.testOS }}-$(System.JobPositionInPhase) | ||
|
|
||
| - template: fail-on-issue.yaml |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems duplicate of
DotNetNUnitCategories, why is the syntax here different?Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dotnet testuses one syntax, NUnit uses a different syntax.When you use
dotnet testthe adapter does the translation. Becausedotnet-test-slicerhitsNUnit.Enginedirectly, we need to use NUnit's test selection language.I put a little note here https://github.com/xamarin/xamarin-android/blob/f0a24bf67b3f0e56ed7a1d24c2e3789f542f0908/build-tools/automation/yaml-templates/run-sliced-nunit-tests.yaml#L3, but it doesn't bubble up to that variable specification.