Skip to content

Commit

Permalink
Try build arcade net9 (#25085)
Browse files Browse the repository at this point in the history
* try

* try again

* Try more build

* Fix snupkg

* try publish

* fix depends

* fix

* Fix signing

* Fix condition

* try without this

* Try install workloads

* add catalyst

* Try install .dotnet

* Skip install .net

* Nowarn

* Set java home

* try sign

* sign dll

* dix

* more variables

* try other

* fix

* Remove pool changes

* Fix path

* dotnet

* remvoe restore

* Again

* Try bump arcade

* TreatWarningsAsErrors

* will this work

* Try -warnAsError 0

* again

* extra nowarn

* Fix variable

* Fix _BuildOfficalId

* Fix signing

* Update arcade

* Don t push this

* Dont update build number

* Add back cake script

* Add nuget.config again

* Clean signing

* try these feeds

* less premissions

* Try this

* Try fix the bin folder

* Fix nuget config

* Use DotNetTempDirectory for the script

* Fix device tests

* Add missing variable

* We need this

* Try this

* try this

* Add public pipeline

* Fix cake

* Fix tool

* Fix device

* try workloads

* try fix test

* fix sign

* more quick

* needs t build

* Fix windows script

* Try workloads

* fix location

* fix

* Try with this

* try fix paths

* try this again

* try use the latest tooling

* Revert "try use the latest tooling"

This reverts commit 1b337f8.

* Update variables.yml

* Update DotnetInternal.cs

* More fixes

* Update build-test-pack.yml

* Update latest arcade

* Add missing feeds

* Remove package source mapping

* Update windows.cake

* Update windows.cake

* Update global.json

* Try _SkipUpdateBuildNumber

* again

* Update variables.yml

* Again

* Include this

* Update vsmanproj

* Nove to arcade ne9

* Update rtm

* Dont build workloads

* Update rtm

* Update NuGet.config

* Update global.json

* Update Versions.props

* Update pack.yml

* Try rtm ios

* try windows again

* Fix folder for dotnet location

* Update windows.cake
  • Loading branch information
rmarinho authored Oct 15, 2024
1 parent ce01c15 commit c72387d
Show file tree
Hide file tree
Showing 41 changed files with 1,399 additions and 437 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.24501.1",
"version": "9.0.0-prerelease.24510.3",
"commands": [
"xharness"
]
Expand Down
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -376,4 +376,9 @@ Directory.Build.Override.props

# Only the "snapshots" directory should be added to Git, not the "snapshots-diff" directory
snapshots-diff/

#install of dotnet version
/.dotnet
.dotnet
temp
.packages
7 changes: 3 additions & 4 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
<DefineConstants Condition="'$(_MauiTargetPlatformIsWindows)' == 'True'">$(DefineConstants);WINDOWS</DefineConstants>
<DefineConstants Condition="'$(IncludeCompatibilityProjects)' == 'True'">$(DefineConstants);COMPATIBILITY_ENABLED</DefineConstants>
<DefineConstants Condition="'$(IncludePreviousTfms)' == 'True'">$(DefineConstants);ENABLE_PREVIOUS_TFM_BUILDS</DefineConstants>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<!-- <SymbolPackageFormat>snupkg</SymbolPackageFormat> -->
<!-- <GenerateRuntimeConfigurationFiles>false</GenerateRuntimeConfigurationFiles> -->
<!-- HACK: WinUI seems to have issues without this -->
<GenerateLibraryLayout>true</GenerateLibraryLayout>
Expand Down Expand Up @@ -215,9 +215,8 @@
</PropertyGroup>

<PropertyGroup>
<DotNetOutputPath>$(MSBuildThisFileDirectory)bin/</DotNetOutputPath>
<DotNetTempDirectory>$(DotNetOutputPath)temp/</DotNetTempDirectory>
<DotNetDirectory>$(DotNetOutputPath)dotnet/</DotNetDirectory>
<DotNetTempDirectory>$(RepoRoot)/temp/</DotNetTempDirectory>
<DotNetDirectory>$(RepoRoot)/.dotnet/</DotNetDirectory>
<DotNetToolPath>$(DotNetDirectory)dotnet</DotNetToolPath>
<DotNetPacksDirectory>$(DotNetDirectory)packs/</DotNetPacksDirectory>
<DotNetLibraryPacksDirectory>$(DotNetDirectory)library-packs/</DotNetLibraryPacksDirectory>
Expand Down
8 changes: 7 additions & 1 deletion Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,16 @@
<Import Project="eng\NuGetVersions.targets" />

<PropertyGroup>
<!-- Allows for MAUI Xaml Hot Reload Samples to run without checks -->
<!-- Allows for MAUI Xaml Hot Reload Samples to run without checks -->
<IgnoreMauiXamlHotReloadCompatibilityCheck>True</IgnoreMauiXamlHotReloadCompatibilityCheck>
</PropertyGroup>

<PropertyGroup>
<!-- Microsoft.Build.Msix.props" cannot be imported again -->
<!-- Found version-specific or distribution-specific runtime identifier(s)-->
<NoWarn>$(NoWarn);MSB4011;NETSDK1206</NoWarn>
</PropertyGroup>

<!-- platform version number information -->
<PropertyGroup Condition="'$(_MauiTargetPlatformIsiOS)' == 'True'">
<SupportedOSPlatformVersion>13.0</SupportedOSPlatformVersion>
Expand Down
22 changes: 3 additions & 19 deletions NuGet.config
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,6 @@
<!-- `clear` ensures no additional sources are inherited from another config file. -->
<packageSources>
<clear />
<!--Begin: Package sources managed by Dependency Flow automation. Do not edit the sources below.-->
<!-- Begin: Package sources from dotnet-emsdk -->
<!-- End: Package sources from dotnet-emsdk -->
<!-- Begin: Package sources from dotnet-runtime -->
<!-- End: Package sources from dotnet-runtime -->
<!--End: Package sources managed by Dependency Flow automation. Do not edit the sources above.-->
<add key="local" value="LOCAL_PLACEHOLDER" />
<add key="nuget-only" value="NUGET_ONLY_PLACEHOLDER" />
<add key="dotnet-tools" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json" protocolVersion="3" />
Expand All @@ -21,16 +15,9 @@
<add key="dotnet9" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet9/nuget/v3/index.json" />
<add key="dotnet9-transport" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet9-transport/nuget/v3/index.json" />
<add key="skiasharp" value="https://pkgs.dev.azure.com/xamarin/public/_packaging/SkiaSharp/nuget/v3/index.json" />
<!-- Added manually for dotnet/runtime 8.0.10 -->
<add key="darc-pub-dotnet-emsdk-d667257" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-emsdk-d6672570/nuget/v3/index.json" />
<add key="darc-pub-dotnet-runtime-b5f5349" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-runtime-b5f53494/nuget/v3/index.json" />
<!-- Added manually for dotnet/runtime 8.0.9 -->
<add key="darc-pub-dotnet-emsdk-2674f58" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-emsdk-2674f580/nuget/v3/index.json" />
<add key="darc-pub-dotnet-runtime-ed13b35" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-runtime-ed13b351/nuget/v3/index.json" />
<!-- Added manually for .NET 8 Android -->
<add key="darc-pub-dotnet-android-45bb7f3" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-android-45bb7f36/nuget/v3/index.json" />
<!-- Added manually for .NET 8 iOS -->
<add key="darc-pub-xamarin-xamarin-macios-a8d7eab" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-xamarin-xamarin-macios-a8d7eab2/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" />
<add key="dotnet8-transport" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet8-transport/nuget/v3/index.json" />
</packageSources>
<activePackageSource>
<add key="All" value="(Aggregate source)" />
Expand All @@ -39,7 +26,4 @@
<add key="local" value="true" />
<add key="nuget-only" value="true" />
</disabledPackageSources>
<!-- Define mappings by adding package patterns beneath the target source. -->
<!-- Some packages will restore from different locations, but most will be from `dotnet-public`. -->
<!-- The key value for <packageSource> should match key values from <packageSources> element. -->
</configuration>
15 changes: 9 additions & 6 deletions build.cmd
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
@ECHO OFF
SETLOCAL
PowerShell -NoProfile -NoLogo -ExecutionPolicy Bypass -Command "[System.Threading.Thread]::CurrentThread.CurrentCulture = ''; [System.Threading.Thread]::CurrentThread.CurrentUICulture = ''; try { & '%~dp0build.ps1' %*; exit $LASTEXITCODE } catch { write-host $_; exit 1 }"
SET exit_code=%ERRORLEVEL%
ECHO build.cmd completed
EXIT /b %exit_code%
@echo off
setlocal

set _args=%*
if "%~1"=="-?" set _args=-help
if "%~1"=="/?" set _args=-help

powershell -ExecutionPolicy ByPass -NoProfile -Command "& '%~dp0eng\build.ps1'" %_args%
exit /b %ERRORLEVEL%
Empty file modified build.ps1
100644 → 100755
Empty file.
34 changes: 10 additions & 24 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,30 +1,16 @@
#!/usr/bin/env bash

# script inspired by https://andrewlock.net/simplifying-the-cake-global-tool-bootstrapper-scripts-in-netcore3-with-local-tools/
source="${BASH_SOURCE[0]}"

# Define default arguments.
SCRIPT="build.cake"
CAKE_ARGUMENTS=()
# resolve $SOURCE until the file is no longer a symlink
while [[ -h $source ]]; do
scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
source="$(readlink "$source")"

# Parse arguments.
for i in "$@"; do
case $1 in
-s|--script) SCRIPT="$2"; shift ;;
--) shift; CAKE_ARGUMENTS+=("$@"); break ;;
*) CAKE_ARGUMENTS+=("$1") ;;
esac
shift
# if $source was a relative symlink, we need to resolve it relative to the path where the
# symlink file was located
[[ $source != /* ]] && source="$scriptroot/$source"
done

# Restore Cake tool
dotnet tool restore

if [ $? -ne 0 ]; then
echo "An error occurred while installing Cake."
exit 1
fi

echo "${CAKE_ARGUMENTS[@]}"

# Start Cake
dotnet tool run dotnet-cake "$SCRIPT" "${CAKE_ARGUMENTS[@]}"
scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
"$scriptroot/eng/build.sh" $@
6 changes: 3 additions & 3 deletions dotnet-local.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
ROOT="$(dirname "${BASH_SOURCE}")"
FULLROOT="$(cd "${ROOT}"; pwd)"

if [[ ! -x "${ROOT}/bin/dotnet/dotnet" ]] ; then
if [[ ! -x "${ROOT}/.dotnet/dotnet" ]] ; then
echo 'You must build MAUI first. Please see `.github/DEVELOPMENT.md` for details.' 1>&2
exit 1
fi

export DOTNET_ROOT="${FULLROOT}/bin/dotnet"
export DOTNET_ROOT="${FULLROOT}/.dotnet"
export PATH="${DOTNET_ROOT}:${PATH}"
exec "${ROOT}/bin/dotnet/dotnet" "$@"
exec "${ROOT}/.dotnet/dotnet" "$@"
7 changes: 7 additions & 0 deletions eng/Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<ProjectToBuild Include="$(RepoRoot)Microsoft.Maui.BuildTasks.slnf" />
<ProjectToBuild Include="$(RepoRoot)Microsoft.Maui.Packages-mac.slnf" Condition="'$(OS)' != 'Windows_NT'" />
<ProjectToBuild Include="$(RepoRoot)Microsoft.Maui.Packages.slnf" Condition="'$(OS)' == 'Windows_NT'" />
</ItemGroup>
</Project>
6 changes: 6 additions & 0 deletions eng/NuGetVersions.targets
Original file line number Diff line number Diff line change
Expand Up @@ -304,5 +304,11 @@
Update="System.Drawing.Common"
Version="$(SystemDrawingCommonPackageVersion)"
/>


<PackageReference Update="Microsoft.DotNet.Build.Tasks.Workloads" Version="$(MicrosoftDotNetBuildTasksWorkloadsPackageVersion)" />
<PackageReference Update="Microsoft.Signed.WiX" Version="$(MicrosoftSignedWixVersion)" />
<PackageReference Update="MicroBuild.Plugins.SwixBuild.Dotnet" Version="$(MicroBuildPluginsSwixBuildDotnetPackageVersion)" />
<PackageReference Update="Microsoft.DotNet.Build.Tasks.Installers" Version="$(MicrosoftDotNetBuildTasksInstallersPackageVersion)"/>
</ItemGroup>
</Project>
1 change: 1 addition & 0 deletions eng/Publishing.props
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<Project>
<PropertyGroup>
<PublishingVersion>3</PublishingVersion>
<ProducesDotNetReleaseShippingAssets>true</ProducesDotNetReleaseShippingAssets>
</PropertyGroup>
</Project>
52 changes: 17 additions & 35 deletions eng/Signing.props
Original file line number Diff line number Diff line change
@@ -1,44 +1,26 @@
<Project>
<PropertyGroup>
<!--
Windows arm/arm64 jobs don't have MSIs to sign. Keep it simple: allow not finding any matches
here and rely on overall signing validation.
-->
<AllowEmptySignList Condition="'$(SignFinalPackages)' != 'true'">true</AllowEmptySignList>
<UseDotNetCertificate>true</UseDotNetCertificate>
</PropertyGroup>

<ItemGroup>
<FileExtensionSignInfo Update=".nupkg" CertificateName="NuGet" />
<FileExtensionSignInfo Update=".zip" CertificateName="None" />
<FileExtensionSignInfo Include=".msi" CertificateName="MicrosoftDotNet500" />
</ItemGroup>

<!-- <ItemGroup>
<!--
Replace the default items to sign with the specific set we want.
-->
<ItemsToSign Remove="@(ItemsToSign)" />
<ItemsToSignPostBuild Remove="@(ItemsToSignPostBuild)" />
<ItemGroup Label="Third Party Assemblies">
<FileSignInfo Include="GMap.NET.Core.dll" CertificateName="3PartySHA2" />
<FileSignInfo Include="GMap.NET.GTK.dll" CertificateName="3PartySHA2" />
<FileSignInfo Include="webkit-sharp.dll" CertificateName="3PartySHA2" />
<FileSignInfo Include="Mono.Cecil.dll" CertificateName="3PartySHA2" />
<FileSignInfo Include="Mono.Cecil.Mdb.dll" CertificateName="3PartySHA2" />
<FileSignInfo Include="Mono.Cecil.Pdb.dll" CertificateName="3PartySHA2" />
<FileSignInfo Include="Mono.Cecil.Rocks.dll" CertificateName="3PartySHA2" />
<FileSignInfo Include="Svg.Skia.dll" CertificateName="3PartySHA2" />
<FileSignInfo Include="Svg.Custom.dll" CertificateName="3PartySHA2" />
<FileSignInfo Include="Svg.Model.dll" CertificateName="3PartySHA2" />
<FileSignInfo Include="ShimSkiaSharp.dll" CertificateName="3PartySHA2" />
<FileSignInfo Include="Fizzler.dll" CertificateName="3PartySHA2" />
<FileSignInfo Include="ExCSS.dll" CertificateName="3PartySHA2" />
<FileSignInfo Include="Newtonsoft.Json.dll" CertificateName="3PartySHA2" />

<!-- apphost and comhost template files are not signed, by design. -->
<FileSignInfo Include="apphost.exe;comhost.dll" CertificateName="None" />

<FileExtensionSignInfo Include=".msi" CertificateName="MicrosoftDotNet500" />
<FileExtensionSignInfo Include=".pkg" CertificateName="8003" />
<FileExtensionSignInfo Include=".deb;.rpm" CertificateName="LinuxSign" />
<FileSignInfo Include="OpenSans-Regular.ttf" CertificateName="3PartySHA2" />
<FileSignInfo Include="OpenSans-Semibold.ttf" CertificateName="3PartySHA2" />
</ItemGroup>

<!-- This repo signs everything, including installers, either right before doing the PushToAzureDevOpsArtifacts,
or in post-build. Populate what will get signed the same in both cases -->
<ItemGroup Condition="'$(PrepareArtifacts)' == 'true'">
<ItemsToSignWithPaths Include="$(DownloadDirectory)**/*.msi" />
<ItemsToSignWithPaths Include="$(DownloadDirectory)**/*.exe" />
<ItemsToSignWithPaths Include="$(DownloadDirectory)**/*.nupkg" />
<ItemsToSignWithPaths Include="$(DownloadDirectory)**/*.zip" />

<ItemsToSignWithoutPaths Include="@(ItemsToSignWithPaths->'%(Filename)%(Extension)')" />
<ItemsToSignPostBuild Include="@(ItemsToSignWithoutPaths->Distinct())" Condition="'$(PostBuildSign)' == 'true'" />
<ItemsToSign Include="@(ItemsToSignWithPaths->Distinct())" Condition="'$(PostBuildSign)' != 'true'" />
</ItemGroup> -->
</Project>
13 changes: 13 additions & 0 deletions eng/Tools.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<Target Name="InitInternalTooling" AfterTargets="Restore">
<Message Text="Installing the workloads" Importance="high" />

<!-- <MSBuild Projects="$(RepoRoot)src/DotNet/DotNet.csproj"
Targets="Build" /> -->
<Exec
Command="dotnet build $(RepoRoot)src/DotNet/DotNet.csproj -p:InstallDotNet=false"
WorkingDirectory="$(RepoRoot)"
EnvironmentVariables="DOTNET_MULTILEVEL_LOOKUP=0" />
</Target>
</Project>
Loading

0 comments on commit c72387d

Please sign in to comment.