Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/NanthiniMahalingam/maui int…
Browse files Browse the repository at this point in the history
…o issue-18452
  • Loading branch information
NanthiniMahalingam committed Nov 4, 2024
2 parents d9101b5 + e8c96c5 commit a7cf994
Show file tree
Hide file tree
Showing 1,101 changed files with 5,752 additions and 9,075 deletions.
2 changes: 1 addition & 1 deletion .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
]
},
"microsoft.dotnet.xharness.cli": {
"version": "10.0.0-prerelease.24514.1",
"version": "10.0.0-prerelease.24524.9",
"commands": [
"xharness"
]
Expand Down
3 changes: 3 additions & 0 deletions NuGet.config
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
<add key="skiasharp" value="https://pkgs.dev.azure.com/xamarin/public/_packaging/SkiaSharp/nuget/v3/index.json" />
<add key="dotnet-libraries" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-libraries/nuget/v3/index.json" />
<add key="dotnet-libraries-transport" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-libraries-transport/nuget/v3/index.json" />

<!-- Added manually for .NET 8 MAUI -->-
<add key="darc-pub-dotnet-maui-a33a875e" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-maui-a33a875e/nuget/v3/index.json" />
</packageSources>
<activePackageSource>
<add key="All" value="(Aggregate source)" />
Expand Down
12 changes: 6 additions & 6 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<Dependencies>
<ProductDependencies>
<Dependency Name="Microsoft.DotNet.XHarness.TestRunners.Common" Version="10.0.0-prerelease.24514.1">
<Dependency Name="Microsoft.DotNet.XHarness.TestRunners.Common" Version="10.0.0-prerelease.24524.9">
<Uri>https://github.com/dotnet/xharness</Uri>
<Sha>8b3d320f930244889da101cd17cbfb6a178b7e35</Sha>
<Sha>b12e9b940300433453aa7d57ff094aad50ce782c</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.XHarness.TestRunners.Xunit" Version="10.0.0-prerelease.24514.1">
<Dependency Name="Microsoft.DotNet.XHarness.TestRunners.Xunit" Version="10.0.0-prerelease.24524.9">
<Uri>https://github.com/dotnet/xharness</Uri>
<Sha>8b3d320f930244889da101cd17cbfb6a178b7e35</Sha>
<Sha>b12e9b940300433453aa7d57ff094aad50ce782c</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.XHarness.CLI" Version="10.0.0-prerelease.24514.1">
<Dependency Name="Microsoft.DotNet.XHarness.CLI" Version="10.0.0-prerelease.24524.9">
<Uri>https://github.com/dotnet/xharness</Uri>
<Sha>8b3d320f930244889da101cd17cbfb6a178b7e35</Sha>
<Sha>b12e9b940300433453aa7d57ff094aad50ce782c</Sha>
</Dependency>
</ProductDependencies>
<ToolsetDependencies>
Expand Down
12 changes: 6 additions & 6 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
</PropertyGroup>
<PropertyGroup>
<!-- Current previous .NET SDK major version's stable release of MAUI packages -->
<MicrosoftMauiPreviousDotNetReleasedVersion>8.0.82</MicrosoftMauiPreviousDotNetReleasedVersion>
<MicrosoftMauiPreviousDotNetReleasedVersion>8.0.83</MicrosoftMauiPreviousDotNetReleasedVersion>
<!-- dotnet/installer -->
<MicrosoftNETSdkPackageVersion>9.0.100-rc.2.24474.11</MicrosoftNETSdkPackageVersion>
<MicrosoftDotnetSdkInternalPackageVersion>$(MicrosoftNETSdkPackageVersion)</MicrosoftDotnetSdkInternalPackageVersion>
Expand Down Expand Up @@ -82,7 +82,7 @@
<MicrosoftAspNetCoreMetadataPackageVersion>9.0.0-rc.2.24474.3</MicrosoftAspNetCoreMetadataPackageVersion>
<MicrosoftJSInteropPackageVersion>9.0.0-rc.2.24474.3</MicrosoftJSInteropPackageVersion>
<!-- Everything else (previous edition) -->
<MicrosoftAspNetCorePackageVersion>8.0.7</MicrosoftAspNetCorePackageVersion>
<MicrosoftAspNetCorePackageVersion>8.0.10</MicrosoftAspNetCorePackageVersion>
<MicrosoftAspNetCoreAuthorizationPreviousPackageVersion>$(MicrosoftAspNetCorePackageVersion)</MicrosoftAspNetCoreAuthorizationPreviousPackageVersion>
<MicrosoftAspNetCoreAuthenticationFacebookPreviousPackageVersion>$(MicrosoftAspNetCorePackageVersion)</MicrosoftAspNetCoreAuthenticationFacebookPreviousPackageVersion>
<MicrosoftAspNetCoreAuthenticationGooglePreviousPackageVersion>$(MicrosoftAspNetCorePackageVersion)</MicrosoftAspNetCoreAuthenticationGooglePreviousPackageVersion>
Expand Down Expand Up @@ -124,10 +124,10 @@
<_SkiaSharpExtendedVersion>2.0.0</_SkiaSharpExtendedVersion>
<_HarfBuzzSharpVersion>7.3.0.2</_HarfBuzzSharpVersion>
<_SkiaSharpNativeAssetsVersion>0.0.0-commit.7af1d0840a381c0ce7ef2877454a88dbb2949686.1086</_SkiaSharpNativeAssetsVersion>
<MicrosoftTemplateEngineTasksVersion>7.0.114</MicrosoftTemplateEngineTasksVersion>
<MicrosoftDotNetXHarnessTestRunnersCommonVersion>10.0.0-prerelease.24514.1</MicrosoftDotNetXHarnessTestRunnersCommonVersion>
<MicrosoftDotNetXHarnessTestRunnersXunitVersion>10.0.0-prerelease.24514.1</MicrosoftDotNetXHarnessTestRunnersXunitVersion>
<MicrosoftDotNetXHarnessCLIVersion>10.0.0-prerelease.24514.1</MicrosoftDotNetXHarnessCLIVersion>
<MicrosoftTemplateEngineTasksVersion>7.0.120</MicrosoftTemplateEngineTasksVersion>
<MicrosoftDotNetXHarnessTestRunnersCommonVersion>10.0.0-prerelease.24524.9</MicrosoftDotNetXHarnessTestRunnersCommonVersion>
<MicrosoftDotNetXHarnessTestRunnersXunitVersion>10.0.0-prerelease.24524.9</MicrosoftDotNetXHarnessTestRunnersXunitVersion>
<MicrosoftDotNetXHarnessCLIVersion>10.0.0-prerelease.24524.9</MicrosoftDotNetXHarnessCLIVersion>
<TizenUIExtensionsVersion>0.9.2</TizenUIExtensionsVersion>
<SvgSkiaPackageVersion>1.0.0.16</SvgSkiaPackageVersion>
<FizzlerPackageVersion>1.3.0</FizzlerPackageVersion>
Expand Down
2 changes: 1 addition & 1 deletion eng/pipelines/common/device-tests-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ steps:
${{ if or(eq(parameters.platform, 'ios'), eq(parameters.platform, 'catalyst'), eq(parameters.platform, 'android'))}}:
platform: macos
skipXcode: ${{ or(eq(parameters.platform, 'android'), eq(parameters.platform, 'windows')) }}
skipProvisioning: ${{ eq(parameters.platform, 'windows') }}
skipProvisioning: true
skipAndroidImages : ${{ or(eq(parameters.platform, 'ios'), eq(parameters.platform, 'catalyst')) }}
skipAndroidSdks: ${{ or(eq(parameters.platform, 'ios'), eq(parameters.platform, 'catalyst')) }}
installDefaultAndroidApi: ${{ or(eq(parameters.platform, 'ios'), eq(parameters.platform, 'catalyst')) }}
Expand Down
19 changes: 11 additions & 8 deletions eng/pipelines/common/maui-templates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ jobs:
- template: provision.yml
parameters:
checkoutDirectory: ${{ parameters.checkoutDirectory }}
skipXcode: ${{ ne(parameters.PlatformName, 'macos') }}
skipProvisioning: true

- task: DownloadBuildArtifacts@0
displayName: 'Download Packages'
Expand Down Expand Up @@ -156,18 +158,19 @@ jobs:
- ${{ each pair in step }}:
${{ pair.key }}: ${{ pair.value }}

- ${{ if eq(RunPlatform.testName, 'RunOniOS') }}:
- bash: |
chmod +x $(System.DefaultWorkingDirectory)/eng/scripts/clean-bot.sh
chmod +x $(System.DefaultWorkingDirectory)/eng/scripts/clean-simulator-runtime.sh
$(System.DefaultWorkingDirectory)/eng/scripts/clean-bot.sh
displayName: 'Clean bot'
continueOnError: true
timeoutInMinutes: 60
# - ${{ if eq(RunPlatform.testName, 'RunOniOS') }}:
# - bash: |
# chmod +x $(System.DefaultWorkingDirectory)/eng/scripts/clean-bot.sh
# chmod +x $(System.DefaultWorkingDirectory)/eng/scripts/clean-simulator-runtime.sh
# $(System.DefaultWorkingDirectory)/eng/scripts/clean-bot.sh
# displayName: 'Clean bot'
# continueOnError: true
# timeoutInMinutes: 60

- template: provision.yml
parameters:
skipXcode: ${{ eq(RunPlatform.testName, 'RunOnAndroid') }}
skipProvisioning: true
skipAndroidImages: ${{ ne(RunPlatform.testName, 'RunOnAndroid') }}
checkoutDirectory: ${{ parameters.checkoutDirectory }}

Expand Down
35 changes: 0 additions & 35 deletions eng/pipelines/common/pack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,41 +88,6 @@ steps:
- ${{ each pair in step }}:
${{ pair.key }}: ${{ pair.value }}

- pwsh: |
if ($env:JAVA_HOME_11_X64) {
$env:JAVA_HOME = $env:JAVA_HOME_11_X64
} else {
$path = (Get-ChildItem $env:ProgramFiles\Microsoft\jdk-11.*\bin\java.exe) | Select-Object -First 1
if ($path -and (Test-Path $path)) {
$env:JAVA_HOME = $path.Directory.Parent.FullName
}
}
if ($env:JAVA_HOME) {
echo "##vso[task.setvariable variable=JAVA_HOME]$env:JAVA_HOME"
echo "JAVA_HOME set to '$env:JAVA_HOME'"
} else {
echo "Unable to set JAVA_HOME"
}
displayName: 'Setup JDK Paths'
condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'))
- pwsh: |
if ($env:ANDROID_SDK_ROOT) {
echo "ANDROID_SDK_ROOT already set to '$env:ANDROID_SDK_ROOT'"
} else {
if ((Test-Path "${env:ProgramFiles(x86)}\Android\android-sdk")) {
$env:ANDROID_SDK_ROOT = "${env:ProgramFiles(x86)}\Android\android-sdk"
}
if ($env:ANDROID_SDK_ROOT) {
echo "##vso[task.setvariable variable=ANDROID_SDK_ROOT]$env:ANDROID_SDK_ROOT"
echo "ANDROID_SDK_ROOT set to '$env:ANDROID_SDK_ROOT'"
} else {
echo "Unable to set ANDROID_SDK_ROOT"
}
}
displayName: 'Setup ANDROID_SDK_ROOT Paths'
condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'))
- pwsh: ./build.ps1 --target=dotnet --configuration="${{ parameters.buildConfiguration }}" --verbosity=diagnostic --nugetsource="${{ parameters.nugetFolder }}"
displayName: 'Install .NET'
retryCountOnTaskFailure: 3
Expand Down
119 changes: 54 additions & 65 deletions eng/pipelines/common/provision.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,47 +20,63 @@ parameters:

steps:
# Prepare macOS
- ${{ if ne(parameters.poolName, 'Azure Pipelines') }}:
- template: agent-cleanser/v1.yml@yaml-templates
parameters:
condition: and(succeeded(), eq(variables['Agent.OS'], 'Darwin'))
UninstallMono: false
UninstallXamarinMac: false
CleanseAgentToolsDotNet: true # Cleanse all .NET versions under the agent tools directory and use only those provisioned by the pipeline
SelfHealPowerShell: false
AUTH_TOKEN_GITHUB_COM: $(github--pat--vs-mobiletools-engineering-service2)
# - ${{ if ne(parameters.poolName, 'Azure Pipelines') }}:
# - template: agent-cleanser/v1.yml@yaml-templates
# parameters:
# condition: and(succeeded(), eq(variables['Agent.OS'], 'Darwin'))
# UninstallMono: false
# UninstallXamarinMac: false
# CleanseAgentToolsDotNet: true # Cleanse all .NET versions under the agent tools directory and use only those provisioned by the pipeline
# SelfHealPowerShell: false
# AUTH_TOKEN_GITHUB_COM: $(github--pat--vs-mobiletools-engineering-service2)
# Provision Xcode
- ${{ if ne(parameters.skipXcode, 'true') }}:
- task: xamops.azdevex.provisionator-task.provisionator@2
condition: and(succeeded(), eq(variables['Agent.OS'], 'Darwin'))
displayName: 'Provision Xcode'
inputs:
provisioning_script: ${{ parameters.checkoutDirectory }}/${{ parameters.provisionatorXCodePath }}
provisioning_extra_args: ${{ parameters.provisionatorExtraArguments }}
github_token: ${{ parameters.gitHubToken }}
env:
PROVISIONATOR_CHANNEL: ${{ parameters.provisionatorChannel }}
AUTH_TOKEN_COMPONENTS_MAC_IOS_CERTIFICATE_P12: ${{ parameters.certPass }}
# - task: xamops.azdevex.provisionator-task.provisionator@2
# condition: and(succeeded(), eq(variables['Agent.OS'], 'Darwin'))
# displayName: 'Provision Xcode'
# inputs:
# provisioning_script: ${{ parameters.checkoutDirectory }}/${{ parameters.provisionatorXCodePath }}
# provisioning_extra_args: ${{ parameters.provisionatorExtraArguments }}
# github_token: ${{ parameters.gitHubToken }}
# env:
# PROVISIONATOR_CHANNEL: ${{ parameters.provisionatorChannel }}
# AUTH_TOKEN_COMPONENTS_MAC_IOS_CERTIFICATE_P12: ${{ parameters.certPass }}

- script: |
echo Mac OS version:
sw_vers -productVersion
echo
echo Installed Xcode versions:
ls /Applications | grep 'Xcode'
echo
echo currently selected xcode:
xcrun xcode-select --print-path
echo
echo selecting latest xcode...
sudo xcode-select -s /Applications/Xcode_$(REQUIRED_XCODE).app
xcrun xcode-select --print-path
xcodebuild -version
displayName: Select Xcode Version
# Provision Additional Software
- ${{ if ne(parameters.skipProvisioning, 'true') }}:
- task: xamops.azdevex.provisionator-task.provisionator@2
displayName: 'Provision Additional Software'
condition: and(succeeded(), eq(variables['Agent.OS'], 'Darwin'))
continueOnError: true
inputs:
provisioning_script: ${{ parameters.checkoutDirectory }}/${{ parameters.provisionatorPath }}
provisioning_extra_args: ${{ parameters.provisionatorExtraArguments }}
github_token: ${{ parameters.gitHubToken }}
env:
PROVISIONATOR_CHANNEL: ${{ parameters.provisionatorChannel }}
AUTH_TOKEN_COMPONENTS_MAC_IOS_CERTIFICATE_P12: ${{ parameters.certPass }}
${{ if eq(parameters.skipAndroidSdks, true) }}:
SKIP_ANDROID_API_SDKS: 'true'
${{ if eq(parameters.skipAndroidImages, true) }}:
SKIP_ANDROID_API_IMAGES: 'true'
${{ if eq(parameters.installDefaultAndroidApi, true) }}:
INSTALL_DEFAULT_ANDROID_API: 'true'
#- ${{ if ne(parameters.skipProvisioning, 'true') }}:
# - task: xamops.azdevex.provisionator-task.provisionator@2
# displayName: 'Provision Additional Software'
# condition: and(succeeded(), eq(variables['Agent.OS'], 'Darwin'))
# continueOnError: true
# inputs:
# provisioning_script: ${{ parameters.checkoutDirectory }}/${{ parameters.provisionatorPath }}
# provisioning_extra_args: ${{ parameters.provisionatorExtraArguments }}
# github_token: ${{ parameters.gitHubToken }}
# env:
# PROVISIONATOR_CHANNEL: ${{ parameters.provisionatorChannel }}
# AUTH_TOKEN_COMPONENTS_MAC_IOS_CERTIFICATE_P12: ${{ parameters.certPass }}
# ${{ if eq(parameters.skipAndroidSdks, true) }}:
# SKIP_ANDROID_API_SDKS: 'true'
# ${{ if eq(parameters.skipAndroidImages, true) }}:
# SKIP_ANDROID_API_IMAGES: 'true'
# ${{ if eq(parameters.installDefaultAndroidApi, true) }}:
# INSTALL_DEFAULT_ANDROID_API: 'true'

# Setup JDK Paths (gradle needs it)
- bash: |
Expand All @@ -69,17 +85,7 @@ steps:
# brew install --cask microsoft-openjdk@17
displayName: 'Setup JDK Paths'
condition: and(succeeded(), eq(variables['Agent.OS'], 'Darwin'))
# Configure VS Mac for Xcode
# This seems to be needed or else it will pick other xcode for example on xharness
# - bash: |
# set -x
# mkdir -p ~/Library/Preferences/Xamarin
# rm -f ~/Library/Preferences/Xamarin/Settings.plist
# /usr/libexec/PlistBuddy -c "add :AppleSdkRoot string $(dirname $(dirname $(xcode-select -p)))" ~/Library/Preferences/Xamarin/Settings.plist || true
# cat ~/Library/Preferences/Xamarin/Settings.plist || true
# displayName: 'Configure Visual Studio'
# condition: and(succeeded(), eq(variables['Agent.OS'], 'Darwin'))

# Prepare Windows
# Provision Additional Software
- ${{ if ne(parameters.skipProvisioning, 'true') }}:
Expand Down Expand Up @@ -117,23 +123,6 @@ steps:
displayName: 'Setup JDK Paths'
condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'))
- pwsh: |
if ($env:ANDROID_SDK_ROOT) {
echo "ANDROID_SDK_ROOT already set to '$env:ANDROID_SDK_ROOT'"
} else {
if ((Test-Path "${env:ProgramFiles(x86)}\Android\android-sdk")) {
$env:ANDROID_SDK_ROOT = "${env:ProgramFiles(x86)}\Android\android-sdk"
}
if ($env:ANDROID_SDK_ROOT) {
echo "##vso[task.setvariable variable=ANDROID_SDK_ROOT]$env:ANDROID_SDK_ROOT"
echo "ANDROID_SDK_ROOT set to '$env:ANDROID_SDK_ROOT'"
} else {
echo "Unable to set ANDROID_SDK_ROOT"
}
}
displayName: 'Setup ANDROID_SDK_ROOT Paths'
condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'))
# Prepare Both
- task: UseDotNet@2 # https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/tool/dotnet-core-tool-installer?view=azure-devops
displayName: 'Use .NET SDK $(DOTNET_VERSION)'
Expand Down
2 changes: 1 addition & 1 deletion eng/pipelines/common/ui-tests-build-sample.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ steps:
- template: provision.yml
parameters:
skipProvisioning: ${{ eq(parameters.platform, 'windows') }}
skipProvisioning: true
# FIXME: 'Build the MSBuild Tasks' step fails for net9.0-android35 without API 35
skipAndroidSdks: false
skipXcode: ${{ or(eq(parameters.platform, 'android'), eq(parameters.platform, 'windows')) }}
Expand Down
2 changes: 1 addition & 1 deletion eng/pipelines/common/ui-tests-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ steps:
- template: provision.yml
parameters:
skipProvisioning: ${{ eq(parameters.platform, 'windows') }}
skipProvisioning: true
skipAndroidSdks: ${{ ne(parameters.platform, 'android') }}
skipXcode: ${{ or(eq(parameters.platform, 'android'), eq(parameters.platform, 'windows')) }}
provisionatorChannel: ${{ parameters.provisionatorChannel }}
Expand Down
4 changes: 2 additions & 2 deletions eng/pipelines/common/ui-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ parameters:
androidPool: { }
iosPool: { }
windowsPool: { }
windowsBuildPool: { }
macosPool: { }
androidCompatibilityPool: { }
iosCompatibilityPool: { }
Expand Down Expand Up @@ -79,9 +80,8 @@ stages:
jobs:
- job: build_ui_tests
displayName: Build Sample App (Windows)
pool: ${{ parameters.windowsPool }}
pool: ${{ parameters.windowsBuildPool }}
variables:
REQUIRED_XCODE: $(DEVICETESTS_REQUIRED_XCODE)
APPIUM_HOME: $(System.DefaultWorkingDirectory)/.appium/
steps:
- template: ui-tests-build-sample.yml
Expand Down
5 changes: 3 additions & 2 deletions eng/pipelines/common/variables.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ variables:
- name: DOTNET_SKIP_FIRST_TIME_EXPERIENCE
value: true
- name: DOTNET_VERSION
value: 9.0.100-preview.4.24267.66
value: 9.0.100-rc.2.24474.11
- name: REQUIRED_XCODE
value: 16.0.0
- name: DEVICETESTS_REQUIRED_XCODE
Expand Down Expand Up @@ -57,7 +57,6 @@ variables:
value: 7.4.0
- name: Codeql.Enabled
value: false
- group: Xamarin-Secrets

# Variable groups required for private builds
- ${{ if or(eq(variables['System.TeamProject'], 'DevDiv'), eq(variables['Build.DefinitionName'], 'dotnet-maui')) }}:
Expand All @@ -73,6 +72,8 @@ variables:
# - name: PostBuildSign
# value: true
# For eng/common/SetupNugetSources.ps1
# - group: Xamarin-Secrets

- group: DotNetBuilds storage account read tokens
- group: AzureDevOps-Artifact-Feeds-Pats
- name: _InternalBuildArgs
Expand Down
Loading

0 comments on commit a7cf994

Please sign in to comment.