maui/eng/pipelines/handlers.yml

358 строки
13 KiB
YAML
Исходник Обычный вид История

trigger:
branches:
include:
- main
2021-04-24 20:06:28 +03:00
- release/*
2021-03-11 19:23:29 +03:00
tags:
include:
- '*'
paths:
include:
- '*'
exclude:
- .github/*
- docs/*
- CODE-OF-CONDUCT.md
- CONTRIBUTING.md
- LICENSE.TXT
- PATENTS.TXT
- README.md
- SECURITY.md
- THIRD-PARTY-NOTICES.TXT
pr:
branches:
include:
- main
2021-04-24 21:19:50 +03:00
- release/*
paths:
include:
- '*'
exclude:
- .github/*
- docs/*
- CODE-OF-CONDUCT.md
- CONTRIBUTING.md
- LICENSE.TXT
- PATENTS.TXT
- README.md
- SECURITY.md
- THIRD-PARTY-NOTICES.TXT
schedules:
- cron: "0 0 * * *"
displayName: Daily midnight build
branches:
include:
- main
variables:
- template: /eng/pipelines/common/variables.yml
parameters:
- name: BuildEverything
type: boolean
default: false
- name: BuildConfigurations
type: object
default:
- Debug
- Release
- name: BuildPlatforms
type: object
default:
- name: windows
poolName: 'Azure Pipelines'
vmImage: windows-latest
bootsAndroid: $(Android.Msi)
bootsiOS: $(iOS.Msi)
artifact: net6-windows
- name: macos
poolName: $(macOSXNet6VmPool)
vmImage: $(macOSXNet6VmImage)
bootsAndroid: $(Android.Pkg)
bootsiOS: $(iOS.Pkg)
bootsMacCatalyst: $(MacCatalyst.Pkg)
artifact: net6-macos
- name: PackPlatforms
type: object
default:
- name: windows
poolName: 'Azure Pipelines'
vmImage: windows-latest
bootsAndroid: $(Android.Msi)
bootsiOS: $(iOS.Msi)
artifact: nuget
- name: macos
poolName: 'Azure Pipelines'
vmImage: macos-latest
bootsAndroid: $(Android.Pkg)
bootsiOS: $(iOS.Pkg)
bootsMacCatalyst: $(MacCatalyst.Pkg)
artifact: nuget-macos
resources:
repositories:
- repository: xamarin-templates
type: github
name: xamarin/yaml-templates
endpoint: xamarin
ref: refs/heads/main # still defaults to master even though main is the main branch
stages:
- stage: windows
displayName: Build Windows
jobs:
- ${{ each BuildCondition in parameters.BuildConfigurations }}:
- job: win_hosted_${{ BuildCondition }}
workspace:
clean: all
displayName: Build Windows Phase (${{ BuildCondition }})
condition: or(
${{ parameters.BuildEverything }},
ne(variables['Build.Reason'], 'PullRequest'),
eq('${{ BuildCondition }}', 'Release'))
timeoutInMinutes: 60
pool:
name: $(vs2019VmPool)
vmImage: $(vs2019VmImage)
demands: [ msbuild ]
steps:
- template: common/build-windows.yml
Make .NET 6 Packable (#13881) * Add some common nupkg properties to everything * Remove project property refactored into directory build props * Remove properties now in common dir build props * Add net6 version of project * More net6 * Only target netstandard2.0 now net4* is no longer needed as there's no more vs2017 support * Clean up strong naming a bit * Update dependencies * Package all the things for build tasks in the -t:Pack * Add more net6 project versions * Clean up whitespace * Needed moar NET6 * Name fixes * Added meta project for packaging and package script * Remove assembly copyright (now duplicates) * Add resizetizer, add params to package script * Disable strong naming for now We need to re-evaluate how we do this a bit, we should probably use the `al` tool to do it now, and I believe the StrongNamer package may not work anymore, but we can do the same thing in a custom target at a later date. * Fix path to tasks assembly * don't build ios on android specific project * Finish rename of toolbox file * - add cake * - fix cake extras * fix the copy for the IDE * Try packing on CI * versions baby! * build release * this should od it * this * oops * Move to an empty folder * Use new symbol formats * no symbols for build tasks and the head * symbol all the things * Compiler error with commented out code XD * oopsies * only build transitive * Try this * log everything * This might work * REPORTS * previews * needed * versions * duh * Update build.cake Co-authored-by: Shane Neuville <shneuvil@microsoft.com> Co-authored-by: Matthew Leibowitz <mattleibow@live.com>
2021-03-02 20:36:17 +03:00
# - stage: windows_controlgallery
# displayName: Build Windows ControlGallery
# dependsOn: []
# jobs:
# - ${{ each BuildCondition in parameters.BuildConfigurations }}:
# - job: win_hosted_${{ BuildCondition }}
# workspace:
# clean: all
# displayName: Build Windows Phase (${{ BuildCondition }})
# condition: or(
# ${{ parameters.BuildEverything }},
# ne(variables['Build.Reason'], 'PullRequest'),
# eq('${{ BuildCondition }}', 'Release'))
# timeoutInMinutes: 60
# pool:
# name: $(vs2019VmPool)
# vmImage: $(vs2019VmImage)
# demands: [ msbuild ]
# steps:
# - template: common/controlgallery-windows.yml
- stage: build_osx
displayName: iOS
dependsOn: []
jobs:
- job: ios
workspace:
clean: all
displayName: Build ControlGallery iOS
timeoutInMinutes: 120
pool:
name: $(macOSXVmPool)
vmImage: $(macOSXVmImage)
demands:
- sh
- Xamarin.iOS
steps:
- template: common/controlgallery-ios.yml
- stage: build_android
displayName: Android
dependsOn: []
jobs:
- job: android
workspace:
clean: all
displayName: Build ControlGallery Android
timeoutInMinutes: 120
pool:
name: $(macOSXVmPool)
vmImage: $(macOSXVmImage)
variables:
renderers: 'FAST'
outputfolder: 'newRenderers'
steps:
- template: common/controlgallery-android.yml
- stage: pack_net6
displayName: Pack .NET 6
Make .NET 6 Packable (#13881) * Add some common nupkg properties to everything * Remove project property refactored into directory build props * Remove properties now in common dir build props * Add net6 version of project * More net6 * Only target netstandard2.0 now net4* is no longer needed as there's no more vs2017 support * Clean up strong naming a bit * Update dependencies * Package all the things for build tasks in the -t:Pack * Add more net6 project versions * Clean up whitespace * Needed moar NET6 * Name fixes * Added meta project for packaging and package script * Remove assembly copyright (now duplicates) * Add resizetizer, add params to package script * Disable strong naming for now We need to re-evaluate how we do this a bit, we should probably use the `al` tool to do it now, and I believe the StrongNamer package may not work anymore, but we can do the same thing in a custom target at a later date. * Fix path to tasks assembly * don't build ios on android specific project * Finish rename of toolbox file * - add cake * - fix cake extras * fix the copy for the IDE * Try packing on CI * versions baby! * build release * this should od it * this * oops * Move to an empty folder * Use new symbol formats * no symbols for build tasks and the head * symbol all the things * Compiler error with commented out code XD * oopsies * only build transitive * Try this * log everything * This might work * REPORTS * previews * needed * versions * duh * Update build.cake Co-authored-by: Shane Neuville <shneuvil@microsoft.com> Co-authored-by: Matthew Leibowitz <mattleibow@live.com>
2021-03-02 20:36:17 +03:00
dependsOn: []
jobs:
- ${{ each BuildPlatform in parameters.PackPlatforms }}:
- job: pack_net6_${{ BuildPlatform.name }}
workspace:
clean: all
displayName: Pack .NET 6 (${{ BuildPlatform.name }})
timeoutInMinutes: 120
pool:
name: ${{ BuildPlatform.poolName }}
vmImage: ${{ BuildPlatform.vmImage }}
steps:
- ${{ if eq(BuildPlatform.name, 'macos') }}:
Bring back XAML2006/2009 XmlnsDefinition attributes (#878) * Fix yaml triggers * Run pr's for release branches * Automated dotnet-format update (#839) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * [Housekeeping] Add provisionating xcode to net6 (#836) * Add provisionating xcode to net6 * Fix essentials device tests * try again * Update dependencies from https://github.com/xamarin/xamarin-android build main-a2156d41275b92de3cf23f7c79801327c74b7fe0-1 (#846) Microsoft.Android.Sdk.Windows From Version 11.0.200-ci.main.226 -> To Version 11.0.200-ci.main.234 Dependency coherency updates Microsoft.Dotnet.Sdk.Internal From Version 6.0.100-preview.4.21215.1 -> To Version 6.0.100-preview.4.21221.10 (parent: Microsoft.Android.Sdk.Windows Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> * WinUI Navigation Handler (#801) * WinUI Navigation Handler * - PR comments * - consolidate a few more APIs * - fix namespaces * - fix namespaces * Update src/Compatibility/Core/src/WinUI/FlyoutPageRenderer.cs Co-authored-by: Matthew Leibowitz <mattleibow@live.com> Co-authored-by: Matthew Leibowitz <mattleibow@live.com> * Improve Hot Reload Integration (#851) * Fixes HotReload (#853) Reverts changed from: https://github.com/dotnet/maui/commit/7d4d1ce4b78ec941fe56126d9eaaee5fb69ff1b6#diff-2b4bb95e12307423f7126d91b43a1511b68d00535e9f2b5f535af85d7a388333R36 * Android Push/Pop Navigation (#837) * Android Navigation * - fix layout * - changes * - yay pushing * - wire up nav to use bundle ids * - cleanup * - setup pop * - build up nav stack * - remove nav push * - remove graph xml * Update global.json * - add android to non net6 controls project * - fix namespace * Update Microsoft.Maui-net6.sln * iOS NavigationPageHandler (#852) * iOS Navigation * - wire up iOS Navigation * - remove VET * - rework with HR * - fix namespace * - fix HR * - fix hr * - fix SO exception * - maybe? * - nullabel fix * Update dependencies from https://github.com/xamarin/xamarin-macios build 20210426.5 (#847) Microsoft.MacCatalyst.Sdk , Microsoft.iOS.Sdk From Version 14.5.100-ci.main.620 -> To Version 14.5.100-ci.main.658 Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> Co-authored-by: Rui Marinho <me@ruimarinho.net> * Automated dotnet-format update (#854) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Implement PickerHandler in WinUI (#779) * Implement PickerHandler in WinUI * Enab le nullable in some classes * Fix build error * Register MauiComboBox ResourceDictionary * Updated PickerExtensions * Updated MauiComboBox Co-authored-by: Rachel Kang <rachelkang@microsoft.com> * [Build] Update maestro with macOS and tvOS (#862) * [Build] Update maestro with macOS and tvOS * [Build] Add tvOS and macOS to workload/dogfood * Add Microsoft.iOS.Windows.Sdk Co-authored-by: Jonathan Peppers <jonathan.peppers@microsoft.com> * Update README.md (#865) * ContainerViewControllers should use the correct background color. (#868) Also set the title of the VC from a page * Automated dotnet-format update (#872) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Bring back XAML2006/2009 XmlnsDefinition attributes These are required so that things like x:Static can be resolved to Microsoft.Maui.Controls.Xaml.StaticExtension. Co-authored-by: Rui Marinho <me@ruimarinho.net> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: dotnet-maestro[bot] <42748379+dotnet-maestro[bot]@users.noreply.github.com> Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> Co-authored-by: Shane Neuville <shneuvil@microsoft.com> Co-authored-by: Matthew Leibowitz <mattleibow@live.com> Co-authored-by: James Clancey <james.clancey@gmail.com> Co-authored-by: Javier Suárez <javiersuarezruiz@hotmail.com> Co-authored-by: Rachel Kang <rachelkang@microsoft.com> Co-authored-by: Jonathan Peppers <jonathan.peppers@microsoft.com> Co-authored-by: 1d0n7kn0w <3910210+1d0n7kn0w@users.noreply.github.com> Co-authored-by: Jonathan Dick <jodick@microsoft.com>
2021-04-28 22:29:13 +03:00
- task: xamops.azdevex.provisionator-task.provisionator@1
displayName: 'Provision Xcode'
condition: ne(variables['REQUIRED_XCODE'], '')
inputs:
provisioning_script: $(provisionator.xcode)
- task: xamops.azdevex.provisionator-task.provisionator@1
displayName: 'Provisionator'
condition: eq(variables['provisioning'], 'true')
inputs:
provisioning_script: $(provisionator.xcode)
provisioning_extra_args: $(provisionator.extraArguments)
- script: |
echo "##vso[task.prependpath]/Library/Frameworks/Mono.framework/Versions/Current/Commands/"
echo "##vso[task.prependpath]~/Library/Developer/Xamarin/android-sdk-macosx"
displayName: 'Setup SDK Paths'
condition: ne(variables['osx2019VmPool'], 'Azure Pipelines')
- 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 vsmac xcode
[build] Update to .NET 6 Preview 4 (#796) * [build] Update to .NET 6 Preview 4 Brings in Preview 4 updates for the Android, MaciOS, and .NET SDks. Initial build attempts were failing with hundreds of errors: D:\a\1\s\src\Essentials\src\Connectivity\Connectivity.ios.tvos.macos.cs(12,70): error BI1234: 'CTCellularData' is obsolete: 'Starting with ios14.0 Use the 'CallKit' API instead.' [D:\a\1\s\src\Essentials\src\Essentials-net6.csproj] D:\a\1\s\src\Essentials\src\Compass\Compass.ios.cs(31,6): error CA1416: This call site is reachable on: 'iOS' 13.6 and later. 'CLLocationManager.HeadingFilter' is only supported on: 'macos' 11.0 and later. [D:\a\1\s\src\Essentials\src\Essentials-net6.csproj] D:\a\1\s\src\Core\src\Platform\MaciOS\ColorExtensions.cs(64,13): error CA1416: This call site is reachable on: 'MacCatalyst' 13.5 and later. 'UIColor.SystemBackgroundColor.get' is supported on: 'ios' 13.0 and later. [D:\a\1\s\src\Core\src\Core-net6.csproj] CSC : error AD0001: Analyzer 'Microsoft.NetCore.Analyzers.InteropServices.PlatformCompatibilityAnalyzer' threw an exception of type 'System.NullReferenceException' with message 'Object reference not set to an instance of an object.'. [D:\a\1\s\src\BlazorWebView\src\core\Microsoft.AspNetCore.Components.WebView.Maui.csproj] The [platform compatibility analyzer][0] has been disabled for now, and it can be enabled locally to work through the few hundred errors in future PRs. Once these issues were sorted, there were a handful of other breaks that I've attempted to fix: D:\a\1\s\src\Essentials\src\AssemblyInfo\AssemblyInfo.ios.tvos.watchos.macos.cs(3,12): error CS0618: 'LinkerSafeAttribute' is obsolete: 'Replace with '[assembly: System.Reflection.AssemblyMetadata ("IsTrimmable", "True")]'.' [D:\a\1\s\src\Essentials\src\Essentials-net6.csproj] D:\a\1\s\src\Compatibility\Core\src\iOS\Renderers\TabbedRenderer.cs(422,33): error CS1503: Argument 1: cannot convert from 'UIKit.UIStringAttributes' to 'UIKit.UITextAttributes' [D:\a\1\s\src\Compatibility\Core\src\Compatibility-net6.csproj] D:\a\1\s\src\Compatibility\Core\src\iOS\CollectionView\CarouselViewController.cs(106,23): error CS0114: 'CarouselViewController.DraggingStarted(UIScrollView)' hides inherited member 'UICollectionViewController.DraggingStarted(UIScrollView)'. To make the current member override that implementation, add the override keyword. Otherwise add the new keyword. [ D:\a\1\s\src\Compatibility\Core\src\Compatibility-net6.csproj] D:\a\1\s\src\Compatibility\Core\src\iOS\CollectionView\CarouselViewController.cs(117,23): error CS0114: 'CarouselViewController.DraggingEnded(UIScrollView, bool)' hides inherited member 'UICollectionViewController.DraggingEnded(UIScrollView, bool)'. To make the current member override that implementation, add the override keyword. Otherwise add the new keyword. [ D:\a\1\s\src\Compatibility\Core\src\Compatibility-net6.csproj] Finally it seems JDK 14 was being preferred on macOS machines in CI, so I've set `$(JI_JAVA_HOME)` to the [pre-installed JDK 11][1]. [0]: https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1416 [1]: https://github.com/actions/virtual-environments/blob/macOS-10.15/20210419.2/images/macos/macos-10.15-Readme.md#java * Apply feedback, bump p4 bits, provision xcode 12.5 rc * Use Big Sur pool, clean up duplicate variable declaration * Revert "Use Big Sur pool, clean up duplicate variable declaration" This reverts commit b91482e10cdef99158e9060c9bf51298a74d89a8. * Disable linker for ios and catalyst Co-authored-by: Rui Marinho <me@ruimarinho.net>
2021-04-24 13:32:18 +03:00
- script: echo '##vso[task.setvariable variable=JI_JAVA_HOME]$(JAVA_HOME_11_X64)'
displayName: set JI_JAVA_HOME
- ${{ if eq(BuildPlatform.name, 'windows') }}:
- task: xamops.azdevex.provisionator-task.provisionator@1
displayName: 'Provision VSWindows'
inputs:
provisioning_script: $(provisionator.vs2019)
- script: dotnet tool restore
displayName: install dotnet tools
- script: dotnet cake --configuration=Release
displayName: pack nugets
- task: CopyFiles@2
displayName: 'Copy SignList.xml Files'
inputs:
Contents: |
**/Microsoft.Maui.*.nupkg
**/Microsoft.Maui.*.snupkg
**/Microsoft.AspNetCore.Components.WebView.Maui.*.nupkg
**/Microsoft.AspNetCore.Components.WebView.Maui.*.snupkg
**/SignList.xml
TargetFolder: $(build.artifactstagingdirectory)
flattenFolders: true
- task: CopyFiles@2
displayName: 'Copy Bin Log Files'
condition: always()
inputs:
Contents: |
**/*.binlog
TargetFolder: $(build.artifactstagingdirectory)
flattenFolders: true
- task: PublishBuildArtifacts@1
condition: always()
displayName: publish artifacts
inputs:
ArtifactName: ${{ BuildPlatform.artifact }}
- stage: build_net6
displayName: Build .NET 6
dependsOn: []
jobs:
- ${{ each BuildPlatform in parameters.BuildPlatforms }}:
- ${{ each BuildCondition in parameters.BuildConfigurations }}:
- job: build_net6_${{ BuildPlatform.name }}_${{ BuildCondition }}
workspace:
clean: all
displayName: Build .NET 6 (${{ BuildPlatform.name }} | ${{ BuildCondition }})
timeoutInMinutes: 120
condition: or(
${{ parameters.BuildEverything }},
ne(variables['Build.Reason'], 'PullRequest'),
WinUI (#548) * WinUI3 Desktop Head * - Fix up Compatibility Proiect * - fix conditionals * - temp remove windows pack restriction * - namespace fixes * - winui * - add WinUI to SLN * - change handlers to windows * - fixes * - additional handlers * - essentials fixes * - msbuild * - add more * - fix comment * - transitive * - check for windows * - windows conditional * - vs path * - restore;build * - remove target * - build first * -remove * Building again! * - add global.json file * - set MauiPlatforms * - remove things * Make it at least run * - split out restore/build * - magic? * - 5 * Put stuff here and try more * - add restore * - fix essentials * Get it closer * Go simple or go home * diffs * - net5 checks * - winui fixes * - files * - preview versions * - maybe? * - add code back in * Update package.ps1 Fix usage of $dotnet, moved around if and try-finally * Whoops * Update package.ps1 Add /restore flag, fix double // * - fixed pri runtime paths * - copy xbf files around * - fix * - fix path * Fonts * - windows only nugets * - fix targets * Fonts now working * ws * //TODO WINUI3 * More mappings * - builds * - remove props * - props * Button has all the things done so far * - layout basics * Don't reference the build tasks, then all is well * - shims * - fix shim measuring * - fix resource loading * Uncomment the things in Forms * - tweak measure * update * Remove old code * Revert "Remove old code" This reverts commit 2b63ebab0e5fdc180360e5aa4ee04c3df964a8cc. * Add image for goodness * - measure * - always build winui for core * - add created handlers * - add mappers * Build windows and macos now * Always pack * - call arrange on the children again * - fix * - embrace it * - fix condition * - maybe * This might work * that * - fix * - fix * - no more * Use the correct path to the image * No more SimpleApp * This actually works... Co-authored-by: Matthew Leibowitz <mattleibow@live.com> Co-authored-by: Jonathan Peppers <jonathan.peppers@microsoft.com>
2021-03-25 17:02:01 +03:00
eq('${{ BuildCondition }}', 'Release'))
pool:
name: ${{ BuildPlatform.poolName }}
vmImage: ${{ BuildPlatform.vmImage }}
steps:
- ${{ if eq(BuildPlatform.name, 'macos') }}:
Bring back XAML2006/2009 XmlnsDefinition attributes (#878) * Fix yaml triggers * Run pr's for release branches * Automated dotnet-format update (#839) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * [Housekeeping] Add provisionating xcode to net6 (#836) * Add provisionating xcode to net6 * Fix essentials device tests * try again * Update dependencies from https://github.com/xamarin/xamarin-android build main-a2156d41275b92de3cf23f7c79801327c74b7fe0-1 (#846) Microsoft.Android.Sdk.Windows From Version 11.0.200-ci.main.226 -> To Version 11.0.200-ci.main.234 Dependency coherency updates Microsoft.Dotnet.Sdk.Internal From Version 6.0.100-preview.4.21215.1 -> To Version 6.0.100-preview.4.21221.10 (parent: Microsoft.Android.Sdk.Windows Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> * WinUI Navigation Handler (#801) * WinUI Navigation Handler * - PR comments * - consolidate a few more APIs * - fix namespaces * - fix namespaces * Update src/Compatibility/Core/src/WinUI/FlyoutPageRenderer.cs Co-authored-by: Matthew Leibowitz <mattleibow@live.com> Co-authored-by: Matthew Leibowitz <mattleibow@live.com> * Improve Hot Reload Integration (#851) * Fixes HotReload (#853) Reverts changed from: https://github.com/dotnet/maui/commit/7d4d1ce4b78ec941fe56126d9eaaee5fb69ff1b6#diff-2b4bb95e12307423f7126d91b43a1511b68d00535e9f2b5f535af85d7a388333R36 * Android Push/Pop Navigation (#837) * Android Navigation * - fix layout * - changes * - yay pushing * - wire up nav to use bundle ids * - cleanup * - setup pop * - build up nav stack * - remove nav push * - remove graph xml * Update global.json * - add android to non net6 controls project * - fix namespace * Update Microsoft.Maui-net6.sln * iOS NavigationPageHandler (#852) * iOS Navigation * - wire up iOS Navigation * - remove VET * - rework with HR * - fix namespace * - fix HR * - fix hr * - fix SO exception * - maybe? * - nullabel fix * Update dependencies from https://github.com/xamarin/xamarin-macios build 20210426.5 (#847) Microsoft.MacCatalyst.Sdk , Microsoft.iOS.Sdk From Version 14.5.100-ci.main.620 -> To Version 14.5.100-ci.main.658 Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> Co-authored-by: Rui Marinho <me@ruimarinho.net> * Automated dotnet-format update (#854) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Implement PickerHandler in WinUI (#779) * Implement PickerHandler in WinUI * Enab le nullable in some classes * Fix build error * Register MauiComboBox ResourceDictionary * Updated PickerExtensions * Updated MauiComboBox Co-authored-by: Rachel Kang <rachelkang@microsoft.com> * [Build] Update maestro with macOS and tvOS (#862) * [Build] Update maestro with macOS and tvOS * [Build] Add tvOS and macOS to workload/dogfood * Add Microsoft.iOS.Windows.Sdk Co-authored-by: Jonathan Peppers <jonathan.peppers@microsoft.com> * Update README.md (#865) * ContainerViewControllers should use the correct background color. (#868) Also set the title of the VC from a page * Automated dotnet-format update (#872) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Bring back XAML2006/2009 XmlnsDefinition attributes These are required so that things like x:Static can be resolved to Microsoft.Maui.Controls.Xaml.StaticExtension. Co-authored-by: Rui Marinho <me@ruimarinho.net> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: dotnet-maestro[bot] <42748379+dotnet-maestro[bot]@users.noreply.github.com> Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> Co-authored-by: Shane Neuville <shneuvil@microsoft.com> Co-authored-by: Matthew Leibowitz <mattleibow@live.com> Co-authored-by: James Clancey <james.clancey@gmail.com> Co-authored-by: Javier Suárez <javiersuarezruiz@hotmail.com> Co-authored-by: Rachel Kang <rachelkang@microsoft.com> Co-authored-by: Jonathan Peppers <jonathan.peppers@microsoft.com> Co-authored-by: 1d0n7kn0w <3910210+1d0n7kn0w@users.noreply.github.com> Co-authored-by: Jonathan Dick <jodick@microsoft.com>
2021-04-28 22:29:13 +03:00
- task: xamops.azdevex.provisionator-task.provisionator@1
displayName: 'Provision Xcode'
condition: ne(variables['REQUIRED_XCODE'], '')
inputs:
provisioning_script: $(provisionator.xcode)
- task: xamops.azdevex.provisionator-task.provisionator@1
displayName: 'Provisionator'
condition: eq(variables['provisioning'], 'true')
inputs:
provisioning_script: $(provisionator.xcode)
provisioning_extra_args: $(provisionator.extraArguments)
- script: |
echo "##vso[task.prependpath]/Library/Frameworks/Mono.framework/Versions/Current/Commands/"
echo "##vso[task.prependpath]~/Library/Developer/Xamarin/android-sdk-macosx"
displayName: 'Setup SDK Paths'
condition: ne(variables['osx2019VmPool'], 'Azure Pipelines')
- 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 vsmac xcode
[build] Update to .NET 6 Preview 4 (#796) * [build] Update to .NET 6 Preview 4 Brings in Preview 4 updates for the Android, MaciOS, and .NET SDks. Initial build attempts were failing with hundreds of errors: D:\a\1\s\src\Essentials\src\Connectivity\Connectivity.ios.tvos.macos.cs(12,70): error BI1234: 'CTCellularData' is obsolete: 'Starting with ios14.0 Use the 'CallKit' API instead.' [D:\a\1\s\src\Essentials\src\Essentials-net6.csproj] D:\a\1\s\src\Essentials\src\Compass\Compass.ios.cs(31,6): error CA1416: This call site is reachable on: 'iOS' 13.6 and later. 'CLLocationManager.HeadingFilter' is only supported on: 'macos' 11.0 and later. [D:\a\1\s\src\Essentials\src\Essentials-net6.csproj] D:\a\1\s\src\Core\src\Platform\MaciOS\ColorExtensions.cs(64,13): error CA1416: This call site is reachable on: 'MacCatalyst' 13.5 and later. 'UIColor.SystemBackgroundColor.get' is supported on: 'ios' 13.0 and later. [D:\a\1\s\src\Core\src\Core-net6.csproj] CSC : error AD0001: Analyzer 'Microsoft.NetCore.Analyzers.InteropServices.PlatformCompatibilityAnalyzer' threw an exception of type 'System.NullReferenceException' with message 'Object reference not set to an instance of an object.'. [D:\a\1\s\src\BlazorWebView\src\core\Microsoft.AspNetCore.Components.WebView.Maui.csproj] The [platform compatibility analyzer][0] has been disabled for now, and it can be enabled locally to work through the few hundred errors in future PRs. Once these issues were sorted, there were a handful of other breaks that I've attempted to fix: D:\a\1\s\src\Essentials\src\AssemblyInfo\AssemblyInfo.ios.tvos.watchos.macos.cs(3,12): error CS0618: 'LinkerSafeAttribute' is obsolete: 'Replace with '[assembly: System.Reflection.AssemblyMetadata ("IsTrimmable", "True")]'.' [D:\a\1\s\src\Essentials\src\Essentials-net6.csproj] D:\a\1\s\src\Compatibility\Core\src\iOS\Renderers\TabbedRenderer.cs(422,33): error CS1503: Argument 1: cannot convert from 'UIKit.UIStringAttributes' to 'UIKit.UITextAttributes' [D:\a\1\s\src\Compatibility\Core\src\Compatibility-net6.csproj] D:\a\1\s\src\Compatibility\Core\src\iOS\CollectionView\CarouselViewController.cs(106,23): error CS0114: 'CarouselViewController.DraggingStarted(UIScrollView)' hides inherited member 'UICollectionViewController.DraggingStarted(UIScrollView)'. To make the current member override that implementation, add the override keyword. Otherwise add the new keyword. [ D:\a\1\s\src\Compatibility\Core\src\Compatibility-net6.csproj] D:\a\1\s\src\Compatibility\Core\src\iOS\CollectionView\CarouselViewController.cs(117,23): error CS0114: 'CarouselViewController.DraggingEnded(UIScrollView, bool)' hides inherited member 'UICollectionViewController.DraggingEnded(UIScrollView, bool)'. To make the current member override that implementation, add the override keyword. Otherwise add the new keyword. [ D:\a\1\s\src\Compatibility\Core\src\Compatibility-net6.csproj] Finally it seems JDK 14 was being preferred on macOS machines in CI, so I've set `$(JI_JAVA_HOME)` to the [pre-installed JDK 11][1]. [0]: https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1416 [1]: https://github.com/actions/virtual-environments/blob/macOS-10.15/20210419.2/images/macos/macos-10.15-Readme.md#java * Apply feedback, bump p4 bits, provision xcode 12.5 rc * Use Big Sur pool, clean up duplicate variable declaration * Revert "Use Big Sur pool, clean up duplicate variable declaration" This reverts commit b91482e10cdef99158e9060c9bf51298a74d89a8. * Disable linker for ios and catalyst Co-authored-by: Rui Marinho <me@ruimarinho.net>
2021-04-24 13:32:18 +03:00
- script: echo '##vso[task.setvariable variable=JI_JAVA_HOME]$(JAVA_HOME_11_X64)'
displayName: set JI_JAVA_HOME
- ${{ if eq(BuildPlatform.name, 'windows') }}:
- task: xamops.azdevex.provisionator-task.provisionator@1
displayName: 'Provision VSWindows'
inputs:
provisioning_script: $(provisionator.vs2019)
- pwsh: |
[build] bootstrap a local .\bin\dotnet\ with .NET Workloads (#514) Based on: https://github.com/jonathanpeppers/maui-workload This adds a new `DotNet.csproj` that provisions a local .NET 6 install into `.\bin\dotnet\`. Next, it uses versions defined in `eng/Versions.props` as required by .NET version bumping infrastructure (called Darc): <Project> <PropertyGroup> <MicrosoftNETSdkPackageVersion>6.0.100-preview.2.21155.3</MicrosoftNETSdkPackageVersion> <MicrosoftAndroidSdkPackageVersion>11.0.200-ci.main.148</MicrosoftAndroidSdkPackageVersion> <MicrosoftMacCatalystSdkPackageVersion>14.3.100-ci.main.337</MicrosoftMacCatalystSdkPackageVersion> <MicrosoftiOSSdkPackageVersion>14.4.100-ci.main.1192</MicrosoftiOSSdkPackageVersion> </PropertyGroup> </Project> Next, we can use these versions to consume NuGet packages for workloads: <PackageDownload Include="Microsoft.NET.Workload.Android" Version="[$(MicrosoftAndroidSdkPackageVersion)]" /> <PackageDownload Include="Microsoft.NET.Workload.MacCatalyst" Version="[$(MicrosoftMacCatalystSdkPackageVersion)]" /> <PackageDownload Include="Microsoft.NET.Workload.iOS" Version="[$(MicrosoftiOSSdkPackageVersion)]" /> Then the other packs they depend on: <PackageDownload Include="Microsoft.Android.Ref" Version="[$(MicrosoftAndroidSdkPackageVersion)]" /> <PackageDownload Include="Microsoft.Android.Sdk.win-x64" Version="[$(MicrosoftAndroidSdkPackageVersion)]" Condition="$([MSBuild]::IsOSPlatform('windows'))" /> <PackageDownload Include="Microsoft.Android.Sdk.osx-x64" Version="[$(MicrosoftAndroidSdkPackageVersion)]" Condition="$([MSBuild]::IsOSPlatform('osx'))" /> <PackageDownload Include="Microsoft.Android.Sdk.BundleTool" Version="[$(MicrosoftAndroidSdkPackageVersion)]" /> <PackageDownload Include="Microsoft.MacCatalyst.Ref" Version="[$(MicrosoftMacCatalystSdkPackageVersion)]" /> <PackageDownload Include="Microsoft.MacCatalyst.Sdk" Version="[$(MicrosoftMacCatalystSdkPackageVersion)]" /> <PackageDownload Include="Microsoft.iOS.Ref" Version="[$(MicrosoftiOSSdkPackageVersion)]" /> <PackageDownload Include="Microsoft.iOS.Sdk" Version="[$(MicrosoftiOSSdkPackageVersion)]" /> After doing this, I can build .NET 6 projects with: > .\bin\dotnet\dotnet.exe build .\src\Controls\samples\Controls.Sample.SingleProject\Maui.Controls.Sample.SingleProject.csproj I can even build MacCatalyst apps on Windows! I updated `build.cake` so the following builds for .NET 6 and opens Visual Studio: > dotnet cake --target=VS-NET6 This is the equivalent of these commands if you want to run them individually: dotnet build src\DotNet\DotNet.csproj .\bin\dotnet\dotnet build Microsoft.Maui.BuildTasks-net6.sln .\bin\dotnet\dotnet build Microsoft.Maui-net6.sln .\eng\dogfood.ps1 ~~ Other Changes ~~ * Rework CI setup to use .\bin\dotnet\dotnet * We don't need boots or URLs anymore * Fixed `MSBuildTests` to use .\bin\dotnet\dotnet if found and fall back to the system `dotnet` * Moved `.nuspec\package.ps1` to `eng\package.ps1` ~~ What problems does this solve? ~~ * MacCatalyst builds on Windows! (offline build that checks C#) * Building Maui always gets you the right things installed. * Maui becoming a .NET workload will be a breeze. We can copy files into `.\bin\dotnet\sdk-manifests` and `.\bin\dotnet\packs`. * We can use Darc to bump dependencies within .NET: https://github.com/dotnet/arcade/blob/main/Documentation/Darc.md
2021-03-22 13:16:06 +03:00
& dotnet build src/DotNet/DotNet.csproj -bl:$(LogDirectory)/$(BuildConfiguration)-dotnet.binlog
& $(DotNet.Path) build Microsoft.Maui.BuildTasks-net6.sln -c $(BuildConfiguration) -bl:$(LogDirectory)/$(BuildConfiguration)-buildtasks.binlog
& $(DotNet.Path) build Microsoft.Maui-net6.sln -c $(BuildConfiguration) -bl:$(LogDirectory)/$(BuildConfiguration).binlog
displayName: build samples
errorActionPreference: stop
- task: PublishBuildArtifacts@1
condition: always()
displayName: publish artifacts
inputs:
ArtifactName: ${{ BuildPlatform.artifact }}
2021-03-04 22:41:31 +03:00
- template: common/device-tests.yml
parameters:
${{ if or(parameters.BuildEverything, ne(variables['Build.Reason'], 'PullRequest')) }}:
androidApiLevels: [ 30, 29, 21 ]
iosVersions: [ 'latest' ]
projects:
- name: essentials
desc: Essentials
android: $(System.DefaultWorkingDirectory)/src/Essentials/test/DeviceTests.Android/Essentials.DeviceTests.Android.csproj
ios: $(System.DefaultWorkingDirectory)/src/Essentials/test/DeviceTests.iOS/Essentials.DeviceTests.iOS.csproj
- name: core
desc: Core
android: $(System.DefaultWorkingDirectory)/src/Core/tests/DeviceTests.Android/Core.DeviceTests.Android.csproj
ios: $(System.DefaultWorkingDirectory)/src/Core/tests/DeviceTests.iOS/Core.DeviceTests.iOS.csproj
# only sign using the private server
2021-03-04 22:41:31 +03:00
- ${{ if eq(variables['System.TeamProject'], 'devdiv') }}:
- stage: nuget_signing
2021-03-06 04:36:17 +03:00
dependsOn: pack_net6
2021-03-04 22:41:31 +03:00
displayName: Sign Nuget
jobs:
- template: sign-artifacts/jobs/v2.yml@xamarin-templates
parameters:
teamName: Maui
usePipelineArtifactTasks: false
targetFolder: $(Build.ArtifactStagingDirectory)/nuget/signed
signedArtifactName: nuget
signedArtifactPath: signed
displayName: Sign Phase
condition: and(succeeded(), ne(variables['signVmImage'], ''), or(eq(variables['Sign'], 'true'), or(eq(variables['Build.SourceBranch'], 'refs/heads/main'), or(startsWith(variables['Build.SourceBranch'],'refs/tags/'), startsWith(variables['Build.SourceBranch'],'refs/heads/release/') ))))