Skip to content

Commit

Permalink
Merge branch 'main' into no-bundleassemblies
Browse files Browse the repository at this point in the history
* main:
  [ci] Use AZDO built-in parallelization strategy. (dotnet#7804)
  Bump to dotnet/installer@e3ab0b5 8.0.100-preview.2.23123.10 (dotnet#7813)
  [ci] Run nunit tests with stable .NET version (dotnet#7826)
  [monodroid] Update p/invoke symbol names from net8 alpha1 (dotnet#7829)
  Localized file check-in by OneLocBuild (dotnet#7827)
  • Loading branch information
grendello committed Feb 28, 2023
2 parents ab016ec + d447bff commit 68684e8
Show file tree
Hide file tree
Showing 43 changed files with 400 additions and 294 deletions.
1 change: 1 addition & 0 deletions build-tools/automation/azure-pipelines-nightly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ stages:
extraBuildArgs: /p:TestAvdApiLevel=$(avdApiLevel) /p:TestAvdAbi=$(avdAbi) /p:TestAvdType=$(avdType)
artifactSource: bin/Test$(XA.Build.Configuration)/Mono.Android_Tests-Signed.apk
artifactFolder: Default
useDotNet: false

- task: MSBuild@1
displayName: shut down emulator
Expand Down
172 changes: 16 additions & 156 deletions build-tools/automation/azure-pipelines.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ stages:
testResultsFiles: TestResult-Xamarin.Android.JcwGen_Tests-$(ApkTestConfiguration).xml
artifactSource: bin/Test$(ApkTestConfiguration)/Xamarin.Android.JcwGen_Tests-Signed.apk
artifactFolder: Default
useDotNet: false

- template: yaml-templates/apk-instrumentation.yaml
parameters:
Expand All @@ -142,6 +143,7 @@ stages:
artifactSource: bin/Test$(ApkTestConfiguration)/Xamarin.Android.JcwGen_Tests-Signed.apk
artifactFolder: FastDev_Assemblies_Dexes
extraBuildArgs: /p:AndroidFastDeploymentType=Assemblies:Dexes
useDotNet: false

- template: yaml-templates/apk-instrumentation.yaml
parameters:
Expand All @@ -151,6 +153,7 @@ stages:
testResultsFiles: TestResult-Xamarin.Android.Locale_Tests-$(ApkTestConfiguration).xml
artifactSource: bin/Test$(ApkTestConfiguration)/Xamarin.Android.Locale_Tests-Signed.apk
artifactFolder: Default
useDotNet: false

- template: yaml-templates/apk-instrumentation.yaml
parameters:
Expand All @@ -161,6 +164,7 @@ stages:
extraBuildArgs: /p:AotAssemblies=True
artifactSource: bin/Test$(ApkTestConfiguration)/Xamarin.Android.Locale_Tests-Signed.apk
artifactFolder: Aot
useDotNet: false

- template: yaml-templates/apk-instrumentation.yaml
parameters:
Expand All @@ -171,6 +175,7 @@ stages:
extraBuildArgs: /p:AotAssemblies=True /p:AndroidEnableProfiledAot=true
artifactSource: bin/Test$(ApkTestConfiguration)/Xamarin.Android.Locale_Tests-Signed.apk
artifactFolder: Profiled-Aot
useDotNet: false

- template: yaml-templates/apk-instrumentation.yaml
parameters:
Expand All @@ -180,6 +185,7 @@ stages:
testResultsFiles: TestResult-Xamarin.Android.EmbeddedDSO_Test.nunit-$(ApkTestConfiguration).xml
artifactSource: bin/Test$(ApkTestConfiguration)/Xamarin.Android.EmbeddedDSO_Test-Signed.apk
artifactFolder: Default
useDotNet: false

- template: yaml-templates/apk-instrumentation.yaml
parameters:
Expand All @@ -189,6 +195,7 @@ stages:
testResultsFiles: TestResult-apkdiff-Xamarin.Forms_Performance_Integration-Signed-$(ApkTestConfiguration).xml
artifactSource: bin/Test$(ApkTestConfiguration)/Xamarin.Forms_Performance_Integration-Signed.apk
artifactFolder: Default
useDotNet: false

- template: yaml-templates/apk-instrumentation.yaml
parameters:
Expand All @@ -199,6 +206,7 @@ stages:
extraBuildArgs: /p:AotAssemblies=true
artifactSource: bin/Test$(ApkTestConfiguration)/Xamarin.Forms_Performance_Integration-Signed.apk
artifactFolder: Aot
useDotNet: false

- template: yaml-templates/apk-instrumentation.yaml
parameters:
Expand All @@ -209,6 +217,7 @@ stages:
extraBuildArgs: /p:AotAssemblies=True /p:AndroidEnableProfiledAot=true
artifactSource: bin/Test$(ApkTestConfiguration)/Xamarin.Forms_Performance_Integration-Signed.apk
artifactFolder: Profiled-Aot
useDotNet: false

- template: yaml-templates/apk-instrumentation.yaml
parameters:
Expand All @@ -218,6 +227,7 @@ stages:
testResultsFiles: TestResult-apkdiff-com.companyname.vsandroidapp-Signed-$(ApkTestConfiguration).xml
artifactSource: bin/Test$(ApkTestConfiguration)/com.companyname.vsandroidapp-Signed.apk
artifactFolder: Default
useDotNet: false

- task: MSBuild@1
displayName: shut down emulator
Expand Down Expand Up @@ -337,7 +347,6 @@ stages:
testResultsFiles: TestResult-Mono.Android.NET_Tests-$(XA.Build.Configuration).xml
artifactSource: bin/Test$(XA.Build.Configuration)/$(DotNetTargetFramework)-android/Mono.Android.NET_Tests-Signed.aab
artifactFolder: $(DotNetTargetFramework)-$(XA.Build.Configuration)
useDotNet: true

- template: yaml-templates/apk-instrumentation.yaml
parameters:
Expand All @@ -348,7 +357,6 @@ stages:
testResultsFiles: TestResult-Mono.Android.NET_Tests-Debug.xml
artifactSource: bin/Test$(XA.Build.Configuration)/$(DotNetTargetFramework)-android/Mono.Android.NET_Tests-Signed.apk
artifactFolder: $(DotNetTargetFramework)-Debug
useDotNet: true

- template: yaml-templates/apk-instrumentation.yaml
parameters:
Expand All @@ -359,7 +367,6 @@ stages:
extraBuildArgs: -p:TestsFlavor=NoAab -p:AndroidPackageFormat=apk
artifactSource: bin/Test$(XA.Build.Configuration)/$(DotNetTargetFramework)-android/Mono.Android.NET_Tests-Signed.apk
artifactFolder: $(DotNetTargetFramework)-NoAab
useDotNet: true

- template: yaml-templates/apk-instrumentation.yaml
parameters:
Expand All @@ -370,7 +377,6 @@ stages:
extraBuildArgs: -p:TestsFlavor=Interpreter -p:UseInterpreter=True
artifactSource: bin/Test$(XA.Build.Configuration)/$(DotNetTargetFramework)-android/Mono.Android.NET_Tests-Signed.aab
artifactFolder: $(DotNetTargetFramework)-Interpreter
useDotNet: true

- template: yaml-templates/apk-instrumentation.yaml
parameters:
Expand All @@ -381,7 +387,6 @@ stages:
extraBuildArgs: -p:TestsFlavor=NoAot -p:RunAOTCompilation=false
artifactSource: bin/Test$(XA.Build.Configuration)/$(DotNetTargetFramework)-android/Mono.Android.NET_Tests-Signed.aab
artifactFolder: $(DotNetTargetFramework)-NoAot
useDotNet: true

- template: yaml-templates/apk-instrumentation.yaml
parameters:
Expand All @@ -392,7 +397,6 @@ stages:
extraBuildArgs: -p:TestsFlavor=AotLlvm -p:EnableLLVM=true -p:AndroidEnableProfiledAot=false
artifactSource: bin/Test$(XA.Build.Configuration)/$(DotNetTargetFramework)-android/Mono.Android.NET_Tests-Signed.aab
artifactFolder: $(DotNetTargetFramework)-AotLlvm
useDotNet: true

- task: MSBuild@1
displayName: shut down emulator
Expand Down Expand Up @@ -487,7 +491,6 @@ stages:

- template: yaml-templates/run-nunit-tests.yaml
parameters:
useDotNet: true
testRunTitle: MSBuildDeviceIntegration Smoke - macOS
testAssembly: $(System.DefaultWorkingDirectory)/bin/Test$(XA.Build.Configuration)/MSBuildDeviceIntegration/$(DotNetStableTargetFramework)/MSBuildDeviceIntegration.dll
dotNetTestExtraArgs: --filter "TestCategory = SmokeTests $(DotNetNUnitCategories)"
Expand Down Expand Up @@ -536,7 +539,6 @@ stages:

- template: yaml-templates/run-nunit-tests.yaml
parameters:
useDotNet: true
testRunTitle: Xamarin.Android.Build.Tests - Linux .NET 6 Smoke Tests
testAssembly: $(System.DefaultWorkingDirectory)/bin/Test$(XA.Build.Configuration)/$(DotNetStableTargetFramework)/Xamarin.Android.Build.Tests.dll
dotNetTestExtraArgs: --filter "TestCategory = SmokeTests $(DotNetNUnitCategories)"
Expand Down Expand Up @@ -640,154 +642,11 @@ stages:
target_framework: $(DotNetStableTargetFramework)
provisionatorChannel: ${{ parameters.provisionatorChannel }}

- stage: msbuilddevice_tests
displayName: MSBuild Emulator Tests
dependsOn: mac_build
condition: and(succeeded(), or(eq(variables['RunAllTests'], true), contains(dependencies.mac_build.outputs['mac_build_create_installers.TestConditions.TestAreas'], 'MSBuildDevice')))
jobs:
# Check - "Xamarin.Android (macOS > Tests > MSBuild+Emulator Legacy #N)"
- template: yaml-templates/run-msbuild-device-tests.yaml
parameters:
node_id: 1
job_name: mac_msbuilddevice_tests_1
job_suffix: Legacy
nunit_categories: '&& cat != Debugger'
provisionatorChannel: ${{ parameters.provisionatorChannel }}
jobCondition: and(succeeded(), eq(variables.IsRelOrTargetingRel, 'False'))

- template: yaml-templates/run-msbuild-device-tests.yaml
parameters:
node_id: 2
job_name: mac_msbuilddevice_tests_2
job_suffix: Legacy
nunit_categories: '&& cat != Debugger'
provisionatorChannel: ${{ parameters.provisionatorChannel }}
jobCondition: and(succeeded(), eq(variables.IsRelOrTargetingRel, 'False'))

- template: yaml-templates/run-msbuild-device-tests.yaml
parameters:
node_id: 3
job_name: mac_msbuilddevice_tests_3
job_suffix: Legacy
nunit_categories: '&& cat != Debugger'
provisionatorChannel: ${{ parameters.provisionatorChannel }}
jobCondition: and(succeeded(), eq(variables.IsRelOrTargetingRel, 'False'))

- template: yaml-templates/run-msbuild-device-tests.yaml
parameters:
node_id: 4
job_name: mac_msbuilddevice_tests_with_debugger
job_suffix: Legacy
jdkTestFolder: $(XA.Jdk11.Folder)
nunit_categories: '&& cat == Debugger'
provisionatorChannel: ${{ parameters.provisionatorChannel }}
jobCondition: and(succeeded(), eq(variables.IsRelOrTargetingRel, 'False'))

# Check - "Xamarin.Android (macOS > Tests > MSBuild+Emulator One .NET #N)"
- template: yaml-templates/run-msbuild-device-tests.yaml
parameters:
node_id: 1
job_name: mac_dotnetdevice_tests_1
job_suffix: One .NET
nunit_categories: $(DotNetNUnitCategories)
target_framework: $(DotNetStableTargetFramework)
provisionatorChannel: ${{ parameters.provisionatorChannel }}

- template: yaml-templates/run-msbuild-device-tests.yaml
parameters:
node_id: 2
job_name: mac_dotnetdevice_tests_2
job_suffix: One .NET
nunit_categories: $(DotNetNUnitCategories)
target_framework: $(DotNetStableTargetFramework)
provisionatorChannel: ${{ parameters.provisionatorChannel }}

- template: yaml-templates/run-msbuild-device-tests.yaml
parameters:
node_id: 3
job_name: mac_dotnetdevice_tests_3
job_suffix: One .NET
nunit_categories: $(DotNetNUnitCategories)
target_framework: $(DotNetStableTargetFramework)
provisionatorChannel: ${{ parameters.provisionatorChannel }}

- template: yaml-templates/run-msbuild-device-tests.yaml
parameters:
node_id: 4
job_name: mac_dotnetdevice_tests_4
job_suffix: One .NET
nunit_categories: $(DotNetNUnitCategories)
target_framework: $(DotNetStableTargetFramework)
provisionatorChannel: ${{ parameters.provisionatorChannel }}

- job: wear_tests
displayName: macOS > Tests > WearOS
timeoutInMinutes: 180
cancelTimeoutInMinutes: 2
strategy:
matrix:
Android30-x86:
avdApiLevel: 30
avdAbi: x86
avdType: android-wear
deviceName: wear_square
pool:
vmImage: $(HostedMacImage)
workspace:
clean: all
steps:
- template: yaml-templates/setup-test-environment.yaml
parameters:
configuration: $(XA.Build.Configuration)

- template: yaml-templates/run-xaprepare.yaml
parameters:
displayName: install required brew tools and prepare java.interop
arguments: --s=Required --auto-provision=yes --auto-provision-uses-sudo=yes

- template: yaml-templates/run-xaprepare.yaml
parameters:
displayName: install emulator
arguments: --s=EmulatorTestDependencies

- script: echo "##vso[task.setvariable variable=Java8SdkDirectory]$JAVA_HOME_8_X64"
displayName: set Java8SdkDirectory

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

- task: MSBuild@1
displayName: install and launch emulator
inputs:
solution: tests/Mono.Android-Tests/Mono.Android-Tests.csproj
configuration: $(XA.Build.Configuration)
msbuildArguments: /t:InstallAvdImage;AcquireAndroidTarget /p:TestDeviceName=$(deviceName) /p:TestAvdApiLevel=$(avdApiLevel) /p:TestAvdAbi=$(avdAbi) /p:TestAvdType=$(avdType) /bl:$(System.DefaultWorkingDirectory)/bin/Test$(XA.Build.Configuration)/install-emulator-$(avdApiLevel).binlog

- template: yaml-templates/run-nunit-tests.yaml
parameters:
useDotNet: true
testRunTitle: WearOS On Device - macOS
testAssembly: $(System.DefaultWorkingDirectory)/bin/Test$(XA.Build.Configuration)/MSBuildDeviceIntegration/$(DotNetStableTargetFramework)/MSBuildDeviceIntegration.dll
dotNetTestExtraArgs: --filter "TestCategory = WearOS"
testResultsFile: TestResult-WearOS--$(XA.Build.Configuration).xml

- task: MSBuild@1
displayName: shut down emulator
inputs:
solution: tests/Mono.Android-Tests/Mono.Android-Tests.csproj
configuration: $(XA.Build.Configuration)
msbuildArguments: /t:AcquireAndroidTarget,ReleaseAndroidTarget /p:TestDeviceName=$(deviceName) /p:TestAvdApiLevel=$(avdApiLevel) /p:TestAvdAbi=$(avdAbi) /p:TestAvdType=$(avdType) /bl:$(System.DefaultWorkingDirectory)/bin/Test$(XA.Build.Configuration)/shutdown-emulator.binlog
condition: always()

- template: yaml-templates/upload-results.yaml
parameters:
configuration: $(XA.Build.Configuration)
artifactName: Test Results - Emulator $(avdApiLevel)-$(avdAbi)-$(avdType) - macOS

- template: yaml-templates/fail-on-issue.yaml

- template: yaml-templates/stage-msbuild-emulator-tests.yaml
parameters:
provisionatorChannel: ${{ parameters.provisionatorChannel }}
stageCondition: and(succeeded(), or(eq(variables['RunAllTests'], true), contains(dependencies.mac_build.outputs['mac_build_create_installers.TestConditions.TestAreas'], 'MSBuildDevice')))
nunit_categories: '& cat != DotNetIgnore & cat != HybridAOT & cat != MkBundle & cat != MonoSymbolicate & cat != PackagesConfig & cat != StaticProject & cat != SystemApplication'

- stage: bcl_tests
displayName: BCL Emulator Tests
Expand Down Expand Up @@ -833,6 +692,7 @@ stages:
testResultsFiles: TestResult-Xamarin.Android.Bcl_Tests.nunit-$(XA.Build.Configuration).xml
artifactSource: bin/Test$(XA.Build.Configuration)/Xamarin.Android.Bcl_Tests-Signed.apk
artifactFolder: Default
useDotNet: false

- task: PublishTestResults@2
displayName: publish Xamarin.Android.Bcl-Tests-XUnit results
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ parameters:
testResultsFormat: NUnit
artifactSource: ""
artifactFolder: ""
useDotNet: false
useDotNet: true
condition: succeeded()

steps:
Expand Down
2 changes: 1 addition & 1 deletion build-tools/automation/yaml-templates/build-windows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -116,14 +116,14 @@ stages:

- template: run-nunit-tests.yaml
parameters:
useDotNet: false
testRunTitle: Smoke MSBuild Tests - Windows Build Tree
testAssembly: $(System.DefaultWorkingDirectory)\bin\Test$(XA.Build.Configuration)\net472\Xamarin.Android.Build.Tests.dll
testResultsFile: TestResult-SmokeMSBuildTests-WinBuildTree-$(XA.Build.Configuration).xml
nunitConsoleExtraArgs: --where "cat == SmokeTests"

- template: run-nunit-tests.yaml
parameters:
useDotNet: true
testRunTitle: Smoke MSBuild Tests - Windows Dotnet Build
testAssembly: $(System.DefaultWorkingDirectory)\bin\Test$(XA.Build.Configuration)\$(DotNetStableTargetFramework)\Xamarin.Android.Build.Tests.dll
testResultsFile: TestResult-SmokeMSBuildTests-WinDotnetBuild-$(XA.Build.Configuration).xml
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
parameters:
version: '0.1.0-alpha1'
condition: succeeded()
continueOnError: true

steps:
- powershell: dotnet tool uninstall dotnet-test-slicer -g
displayName: uninstall dotnet-test-slicer
ignoreLASTEXITCODE: true
condition: ${{ parameters.condition }}

- script: dotnet tool update dotnet-test-slicer --version ${{ parameters.version }} --add-source https://api.nuget.org/v3/index.json -g
displayName: install dotnet-test-slicer ${{ parameters.version }}
condition: ${{ parameters.condition }}
continueOnError: ${{ parameters.continueOnError }}
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ jobs:
parameters:
testRunTitle: LocalizationTests On Device - macOS
testAssembly: $(System.DefaultWorkingDirectory)/bin/Test$(XA.Build.Configuration)/MSBuildDeviceIntegration/$(DotNetStableTargetFramework)/MSBuildDeviceIntegration.dll
useDotNet: true
dotNetTestExtraArgs: --filter "Name~CheckLocalizationIsCorrectNode${{ parameters.node_id }}"
testResultsFile: TestResult-LocalizationTests-Node${{ parameters.node_id }}-$(XA.Build.Configuration).xml

Expand Down
Loading

0 comments on commit 68684e8

Please sign in to comment.