Update macOS build image (#1909)
* Update azure-pipelines.yml * Fix build --------- Co-authored-by: Vladislav Antonyuk <33021114+VladislavAntonyuk@users.noreply.github.com>
This commit is contained in:
Родитель
b55322ac95
Коммит
6d2d2d90ba
|
@ -17,7 +17,6 @@ variables:
|
|||
PathToSamplesSln: 'samples/XCT.Sample.sln'
|
||||
PathToCommunityToolkitUnitTestCsproj: 'src/CommunityToolkit/Xamarin.CommunityToolkit.UnitTests/Xamarin.CommunityToolkit.UnitTests.csproj'
|
||||
PathToMarkupUnitTestCsproj: 'src/Markup/Xamarin.CommunityToolkit.Markup.UnitTests/Xamarin.CommunityToolkit.Markup.UnitTests.csproj'
|
||||
PathToMsBuildOnMacOS: 'mono /Applications/Visual\ studio.app/Contents/Resources/lib/monodevelop/bin/MSBuild/Current/bin/MSBuild.dll'
|
||||
Codeql.Enabled: true
|
||||
|
||||
resources:
|
||||
|
@ -349,15 +348,34 @@ jobs:
|
|||
version: $(NETCORE_TEST_VERSION_2_1)
|
||||
includePreviewVersions: false
|
||||
|
||||
- task: CmdLine@2
|
||||
displayName: 'Build Markup'
|
||||
# restore, build and pack the packages
|
||||
- task: MSBuild@1
|
||||
displayName: Build Xamarin.CommunityToolkit.csproj
|
||||
inputs:
|
||||
script: '$(PathToMsBuildOnMacOS) $(PathToMarkupCsproj) /p:Configuration=Release /restore /t:Build /p:ContinuousIntegrationBuild=true /p:Deterministic=false'
|
||||
solution: $(PathToCommunityToolkitCsproj)
|
||||
configuration: Release
|
||||
msbuildArguments: '/restore /t:Build /p:ContinuousIntegrationBuild=true /p:Deterministic=false'
|
||||
|
||||
- task: CmdLine@2
|
||||
displayName: 'Build Community Toolkit'
|
||||
- task: MSBuild@1
|
||||
displayName: Pack Community Toolkit NuGets
|
||||
inputs:
|
||||
script: '$(PathToMsBuildOnMacOS) $(PathToCommunityToolkitCsproj) /p:Configuration=Release /restore /t:Build /p:ContinuousIntegrationBuild=true /p:Deterministic=false'
|
||||
solution: $(PathToCommunityToolkitCsproj)
|
||||
configuration: Release
|
||||
msbuildArguments: '/t:Pack /p:PackageVersion=$(NugetPackageVersion)'
|
||||
|
||||
- task: MSBuild@1
|
||||
displayName: Build Markup Project
|
||||
inputs:
|
||||
solution: $(PathToMarkupCsproj)
|
||||
configuration: Release
|
||||
msbuildArguments: '/restore /t:Build /p:ContinuousIntegrationBuild=true /p:Deterministic=false'
|
||||
|
||||
- task: MSBuild@1
|
||||
displayName: Pack Markup NuGet
|
||||
inputs:
|
||||
solution: $(PathToMarkupCsproj)
|
||||
configuration: Release
|
||||
msbuildArguments: '/t:Pack /p:PackageVersion=$(NugetPackageVersion)'
|
||||
|
||||
- task: CmdLine@2
|
||||
displayName: 'Run Markup Unit Tests'
|
||||
|
@ -369,16 +387,6 @@ jobs:
|
|||
inputs:
|
||||
script: 'dotnet test $(PathToCommunityToolkitUnitTestCsproj) -c Release -p:BuildInParallel=false'
|
||||
|
||||
- task: CmdLine@2
|
||||
displayName: 'Pack Markup NuGets'
|
||||
inputs:
|
||||
script: '$(PathToMsBuildOnMacOS) $(PathToMarkupUnitTestCsproj) /p:Configuration=Release /t:Pack /p:PackageVersion=$(NugetPackageVersion)'
|
||||
|
||||
- task: CmdLine@2
|
||||
displayName: 'Pack CommunityToolkit NuGets'
|
||||
inputs:
|
||||
script: '$(PathToMsBuildOnMacOS) $(PathToCommunityToolkitCsproj) /p:Configuration=Release /t:Pack /p:PackageVersion=$(NugetPackageVersion)'
|
||||
|
||||
- ${{ if eq(variables['System.TeamProject'], 'devdiv') }}:
|
||||
- template: sign-artifacts/jobs/v2.yml@internal-templates
|
||||
parameters:
|
||||
|
|
|
@ -78,7 +78,7 @@ namespace Xamarin.CommunityToolkit.UI.Views
|
|||
}
|
||||
else if (uriSource.Uri != null)
|
||||
{
|
||||
asset = AVUrlAsset.Create(NSUrl.FromString(uriSource.Uri.AbsoluteUri));
|
||||
asset = AVUrlAsset.Create(NSUrl.FromString(uriSource.Uri.AbsoluteUri) ?? throw new ArgumentException("Invalid Uri", "Source"));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -88,7 +88,7 @@ namespace Xamarin.CommunityToolkit.UI.Views
|
|||
else
|
||||
{
|
||||
if (Element.Source is XCT.FileMediaSource fileSource)
|
||||
asset = AVAsset.FromUrl(NSUrl.FromFilename(fileSource.File));
|
||||
asset = AVAsset.FromUrl(NSUrl.FromFilename(fileSource.File ?? throw new ArgumentException("Invalid file", "Source")));
|
||||
}
|
||||
|
||||
_ = asset ?? throw new NullReferenceException();
|
||||
|
|
Загрузка…
Ссылка в новой задаче