Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[net7.0] Merges PR#15368 and PR#15496 into net7.0 branch and some 🍒 picks from main #15636

Closed
wants to merge 62 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
d67523d
Set TrimMode to partial if not set
agocke Jun 28, 2022
a14002a
Missed a few more places where _LinkMode was used
agocke Jun 28, 2022
6854d31
Update DefaultAction call
agocke Jul 1, 2022
c558df7
Merge branch 'main' into set-trimmode-partial
agocke Jul 11, 2022
b8af230
Update Xamarin.Shared.Sdk.targets
agocke Jul 11, 2022
4c3cb2e
Fix whitespace
rolfbjarne Jul 12, 2022
381ca5e
Simplify a bit.
rolfbjarne Jul 12, 2022
4c6a35b
Merge remote-tracking branch 'origin/net7.0' into set-trimmode-partial
rolfbjarne Jul 12, 2022
1069837
Update linker version
agocke Jul 13, 2022
2864a71
Merge remote-tracking branch 'origin/net7.0' into set-trimmode-partial
rolfbjarne Jul 14, 2022
7fe9c68
Update dependencies from https://github.com/dotnet/installer build 20…
dotnet-maestro[bot] Jul 14, 2022
74610c1
Re-generate global.json
Jul 14, 2022
eb8afba
Update dependencies from https://github.com/dotnet/installer build 20…
dotnet-maestro[bot] Jul 15, 2022
18e5f90
Re-generate global.json
Jul 15, 2022
621fc54
Fix linking nothing.
rolfbjarne Jul 15, 2022
8282bd6
Update dependencies from https://github.com/dotnet/installer build 20…
dotnet-maestro[bot] Jul 16, 2022
fff15a5
Re-generate global.json
Jul 16, 2022
6b6d7ff
Update dependencies from https://github.com/dotnet/installer build 20…
dotnet-maestro[bot] Jul 18, 2022
cb4b77c
Re-generate global.json
Jul 18, 2022
70ecfae
Update dependencies from https://github.com/dotnet/installer build 20…
dotnet-maestro[bot] Jul 19, 2022
8f93b55
Re-generate global.json
Jul 19, 2022
37c9c5e
Update dependencies from https://github.com/dotnet/installer build 20…
dotnet-maestro[bot] Jul 20, 2022
da1579c
Re-generate global.json
Jul 20, 2022
4736252
Update dependencies from https://github.com/dotnet/installer build 20…
dotnet-maestro[bot] Jul 21, 2022
4454f70
Re-generate global.json
Jul 21, 2022
c4977a9
Update dependencies from https://github.com/dotnet/installer build 20…
dotnet-maestro[bot] Jul 22, 2022
363b36f
Re-generate global.json
Jul 22, 2022
85d5e7e
Update dependencies from https://github.com/dotnet/installer build 20…
dotnet-maestro[bot] Jul 23, 2022
e4f9b58
Re-generate global.json
Jul 23, 2022
86d4995
Update dependencies from https://github.com/dotnet/installer build 20…
dotnet-maestro[bot] Jul 25, 2022
ccbb4c7
Re-generate global.json
Jul 25, 2022
0447bec
Update dependencies from https://github.com/dotnet/installer build 20…
dotnet-maestro[bot] Jul 26, 2022
30fd7ff
Re-generate global.json
Jul 26, 2022
09f2897
Update dependencies from https://github.com/dotnet/installer build 20…
dotnet-maestro[bot] Jul 27, 2022
4cce2f4
Re-generate global.json
Jul 27, 2022
8cde5ad
Update dependencies from https://github.com/dotnet/installer build 20…
dotnet-maestro[bot] Jul 28, 2022
8c3afbf
Re-generate global.json
Jul 28, 2022
340924a
Update dependencies from https://github.com/dotnet/installer build 20…
dotnet-maestro[bot] Jul 29, 2022
7721822
Re-generate global.json
Jul 29, 2022
fa113ff
Update dependencies from https://github.com/dotnet/installer build 20…
dotnet-maestro[bot] Jul 30, 2022
5574949
Re-generate global.json
Jul 30, 2022
adf684f
Update dependencies from https://github.com/dotnet/installer build 20…
dotnet-maestro[bot] Aug 1, 2022
a9cc7ff
Re-generate global.json
Aug 1, 2022
81d3e56
Update dependencies from https://github.com/dotnet/installer build 20…
dotnet-maestro[bot] Aug 2, 2022
bba5246
Re-generate global.json
Aug 2, 2022
bef4fc0
Update dependencies from https://github.com/dotnet/installer build 20…
dotnet-maestro[bot] Aug 3, 2022
df5a088
Re-generate global.json
Aug 3, 2022
cb9dc4b
Update dependencies from https://github.com/dotnet/installer build 20…
dotnet-maestro[bot] Aug 4, 2022
4ceb899
Re-generate global.json
Aug 4, 2022
9b544ce
Merge remote-tracking branch 'agocke/set-trimmode-partial' into net7.0
dalexsoto Aug 4, 2022
96a2e8e
[CI] Remove older pkgs in the system to make sure we are not running …
mandel-macaque Jul 19, 2022
de11425
[Xtro] Ensure that when we do auto sanitize we do not return a fail. …
mandel-macaque Jul 20, 2022
48bbba4
Bump Xamarin.Messaging to 1.6.60 (#15370)
emaf Jul 20, 2022
6b97574
Ensure the Hot Restart bundle does not have any entitlements set (#15…
emaf Jul 21, 2022
c40a84c
Set custom home env var from XMA Build Agent (#15571)
mauroa Jul 26, 2022
1bc7f36
[mlaunch] Fix permisisons after extracting from nuget (#15566)
chamons Jul 25, 2022
d4ee04d
[CI] List the installed frameworks in the test bot. (#15611)
mandel-macaque Aug 3, 2022
0ecfa0c
[submodules] Fix indentation in config file. (#15618)
mandel-macaque Aug 3, 2022
31a0b13
[CI] Make sure we do not have pkgs from other builds. (#15619)
mandel-macaque Aug 4, 2022
946cc52
[net7.0] bump linker to net7.0
dalexsoto Aug 5, 2022
8e43594
Copy 7.0.100 sdk-manifest files
jonathanpeppers Aug 5, 2022
efb3a0e
Add a mkdir to create $(DOTNET_MANIFESTS_PATH)
jonathanpeppers Aug 5, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@
url = ../../migueldeicaza/MonoTouch.Dialog
branch = dotnet
[submodule "api-tools"]
path = external/api-tools
url = ../../rolfbjarne/api-tools
branch = main
path = external/api-tools
url = ../../rolfbjarne/api-tools
branch = main
1 change: 0 additions & 1 deletion NuGet.config
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
<!-- Begin: Package sources from dotnet-aspnetcore -->
<!-- End: Package sources from dotnet-aspnetcore -->
<!-- Begin: Package sources from dotnet-runtime -->
<add key="darc-pub-dotnet-runtime-4d6a40a" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-runtime-4d6a40ac/nuget/v3/index.json" />
<!-- End: Package sources from dotnet-runtime -->
<!--End: Package sources managed by Dependency Flow automation. Do not edit the sources above.-->
<add key="dotnet-public" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public/nuget/v3/index.json" protocolVersion="3" />
Expand Down
6 changes: 6 additions & 0 deletions dotnet/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,12 @@ DIRECTORIES += \
$(DIRECTORIES):
$(Q) mkdir -p $@

.stamp-cp-mono-workload: $(TOP)/Make.config
mkdir -p $(DOTNET_MANIFESTS_PATH)
$(CP) -r $(DOTNET_MANIFESTS_PATH)/../$(DOTNET_MANIFEST_VERSION_BAND)/* $(DOTNET_MANIFESTS_PATH)/
$(Q) touch $@
TARGETS += .stamp-cp-mono-workload

CURRENT_HASH_LONG:=$(shell git log -1 --pretty=%H)

$(DOTNET_DESTDIR)/Microsoft.%: Microsoft.% | $(foreach platform,$(DOTNET_PLATFORMS),$(DOTNET_DESTDIR)/Microsoft.$(platform).Sdk/data $(DOTNET_DESTDIR)/Microsoft.$(platform).Sdk/Sdk $(DOTNET_DESTDIR)/Microsoft.$(platform).Sdk/targets $(DOTNET_DESTDIR)/Microsoft.$(platform).Templates) \
Expand Down
2 changes: 2 additions & 0 deletions dotnet/targets/Xamarin.Shared.Sdk.props
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
<_XamarinTaskAssembly Condition="'$(_PlatformName)' != 'macOS'">$(_XamarinSdkRootDirectory)\tools\msbuild\iOS\Xamarin.iOS.Tasks.dll</_XamarinTaskAssembly>
<_XamarinTaskAssembly Condition="'$(_PlatformName)' == 'macOS'">$(_XamarinSdkRootDirectory)\tools\msbuild\macOS\Xamarin.Mac.Tasks.dll</_XamarinTaskAssembly>
<SuppressTrimAnalysisWarnings Condition=" '$(SuppressTrimAnalysisWarnings)' == '' ">true</SuppressTrimAnalysisWarnings>
<!-- For compat with user code not marked trimmable, only trim opt-in by default. -->
<TrimMode Condition="'$(TrimMode)' == ''">partial</TrimMode>
<AfterMicrosoftNETSdkTargets>$(AfterMicrosoftNETSdkTargets);$(MSBuildThisFileDirectory)Microsoft.$(_PlatformName).Sdk.targets</AfterMicrosoftNETSdkTargets>

<!-- _XamarinSdkRoot is used by the existing MSBuild targets files -->
Expand Down
13 changes: 7 additions & 6 deletions dotnet/targets/Xamarin.Shared.Sdk.targets
Original file line number Diff line number Diff line change
Expand Up @@ -451,9 +451,10 @@

<!-- TrimMode specifies what the linker will do with framework assemblies -->
<TrimMode Condition="'$(_LinkMode)' == 'TrimMode'">$(TrimMode)</TrimMode>
<TrimMode Condition="'$(_LinkMode)' == 'None'">copy</TrimMode> <!-- Don't use 'copyused', because that might still end up saving some assemblies, and if that's the platform assembly, it may break the partial static registrar -->
<TrimMode Condition="'$(_LinkMode)' == 'SdkOnly' Or '$(_LinkMode)' == 'Full'">link</TrimMode>
<!-- For Full link mode we also need to set TrimMode for all non-framework assemblies. This is done further below -->
<TrimMode Condition="'$(_LinkMode)' == 'None'">copy</TrimMode>
<TrimMode Condition="'$(_LinkMode)' == 'SdkOnly'">partial</TrimMode>
<TrimMode Condition="'$(_LinkMode)' == 'Full'">full</TrimMode>
<!-- For None link mode we also need to set TrimMode for all assemblies. This is done further below -->

<!-- Determine if any assemblies are actually trimmed, or if we're in a "Don't link" scenario -->
<!-- We're in a "Don't link" scenario if both of the following are true:
Expand Down Expand Up @@ -562,12 +563,12 @@
</PropertyGroup>

<ItemGroup>
<!-- Mark all assemblies to be linked if we're linking all assemblies -->
<!-- Mark all assemblies to be copied if we're not linking any assemblies -->
<ResolvedFileToPublish
Update="@(ResolvedFileToPublish)"
Condition="'$(_LinkMode)' == 'Full' And '%(ResolvedFileToPublish.Extension)' == '.dll' And '%(ResolvedFileToPublish.AssetType)' != 'native'"
Condition="'$(_LinkMode)' == 'None' And '%(ResolvedFileToPublish.Extension)' == '.dll' And '%(ResolvedFileToPublish.AssetType)' != 'native'"
>
<TrimMode>link</TrimMode>
<TrimMode>copy</TrimMode> <!-- Don't use 'copyused', because that might still end up saving some assemblies, and if that's the platform assembly, it may break the partial static registrar -->
</ResolvedFileToPublish>

<!-- Mark our entry assembly as a root assembly. -->
Expand Down
16 changes: 8 additions & 8 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
<Dependencies>
<ProductDependencies>
<Dependency Name="Microsoft.Dotnet.Sdk.Internal" Version="7.0.100-rc.1.22363.4">
<Dependency Name="Microsoft.Dotnet.Sdk.Internal" Version="7.0.100-rc.1.22403.8">
<Uri>https://github.com/dotnet/installer</Uri>
<Sha>691d82ff676ba35c1bb28ef94fbe7c9021481e1f</Sha>
<Sha>3854e285abc309ba66107a28709254fb1d187145</Sha>
</Dependency>
<Dependency Name="Microsoft.NET.ILLink.Tasks" Version="7.0.100-1.22362.1" CoherentParentDependency="Microsoft.Dotnet.Sdk.Internal">
<Dependency Name="Microsoft.NET.ILLink.Tasks" Version="7.0.100-1.22377.1" CoherentParentDependency="Microsoft.Dotnet.Sdk.Internal">
<Uri>https://github.com/dotnet/linker</Uri>
<Sha>33a76b856466b96dd3d179e599a7fc0118389641</Sha>
<Sha>f09bacf09ef10b61cf9f19825f8782171a816dab</Sha>
</Dependency>
<Dependency Name="Microsoft.NETCore.App.Ref" Version="7.0.0-preview.7.22358.7" CoherentParentDependency="Microsoft.Dotnet.Sdk.Internal">
<Dependency Name="Microsoft.NETCore.App.Ref" Version="7.0.0-rc.1.22402.10" CoherentParentDependency="Microsoft.Dotnet.Sdk.Internal">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>1967649721058a457157d4321af3e6fceaa5441b</Sha>
<Sha>a6c0d5c483273725a3626ddbbb355464f3753f09</Sha>
</Dependency>
<!-- This is required for our test apps to build; in some cases Microsoft.AspNetCore.App is pulled in, and when building test apps the build needs to be able to resolve that -->
<Dependency Name="Microsoft.AspNetCore.App.Ref" Version="7.0.0-rc.1.22362.16" CoherentParentDependency="Microsoft.Dotnet.Sdk.Internal">
<Dependency Name="Microsoft.AspNetCore.App.Ref" Version="7.0.0-rc.1.22403.3" CoherentParentDependency="Microsoft.Dotnet.Sdk.Internal">
<Uri>https://github.com/dotnet/aspnetcore</Uri>
<Sha>69c7a87cd8f05da9c05c373edfc0337c9e864d9e</Sha>
<Sha>846f0fd3cc4217582c00da10ad590704288190af</Sha>
</Dependency>
</ProductDependencies>
<ToolsetDependencies>
Expand Down
6 changes: 3 additions & 3 deletions eng/Versions.props
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<Project>
<!--Package versions-->
<PropertyGroup>
<MicrosoftDotnetSdkInternalPackageVersion>7.0.100-rc.1.22363.4</MicrosoftDotnetSdkInternalPackageVersion>
<MicrosoftNETILLinkTasksPackageVersion>7.0.100-1.22362.1</MicrosoftNETILLinkTasksPackageVersion>
<MicrosoftDotnetSdkInternalPackageVersion>7.0.100-rc.1.22403.8</MicrosoftDotnetSdkInternalPackageVersion>
<MicrosoftNETILLinkTasksPackageVersion>7.0.100-1.22377.1</MicrosoftNETILLinkTasksPackageVersion>
<MicrosoftDotNetBuildTasksFeedPackageVersion>6.0.0-beta.21212.6</MicrosoftDotNetBuildTasksFeedPackageVersion>
<MicrosoftNETILStripTasksPackageVersion>6.0.0-rc.2.21468.3</MicrosoftNETILStripTasksPackageVersion>
<MicrosoftNETCoreAppRefPackageVersion>7.0.0-preview.7.22358.7</MicrosoftNETCoreAppRefPackageVersion>
<MicrosoftNETCoreAppRefPackageVersion>7.0.0-rc.1.22402.10</MicrosoftNETCoreAppRefPackageVersion>
<MicrosoftTemplateEngineTasksVersion>7.0.100-alpha.1.21601.1</MicrosoftTemplateEngineTasksVersion>
</PropertyGroup>
</Project>
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"sdk": {
"version": "7.0.100-rc.1.22363.4"
"version": "7.0.100-rc.1.22403.8"
}
}
2 changes: 1 addition & 1 deletion msbuild/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<MessagingVersion>1.6.24</MessagingVersion>
<MessagingVersion>1.6.60</MessagingVersion>
<HotRestartVersion>1.0.93</HotRestartVersion>
</PropertyGroup>
</Project>
2 changes: 1 addition & 1 deletion msbuild/Messaging/Xamarin.Messaging.Build/TaskRunner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ internal TaskRunner (ITaskSerializer serializer)
var dotnetPath = Path.Combine (sdkRootPath, "dotnet", "dotnet");

if (File.Exists (dotnetPath)) {
Environment.SetEnvironmentVariable ("HOME", Path.Combine (sdkRootPath, ".home"));
Environment.SetEnvironmentVariable ("DOTNET_CUSTOM_HOME", Path.Combine (sdkRootPath, ".home"));
} else {
//In case the XMA dotnet has not been installed yet
dotnetPath = "/usr/local/share/dotnet/dotnet";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<ItemGroup>
<PackageReference Include="System.IO.Abstractions" Version="6.0.27" />
<PackageReference Include="Mono.Cecil" Version="0.11.4" />
<PackageReference Include="GitInfo" Version="2.1.2" />
<PackageReference Include="GitInfo" Version="2.2.0" />
<!-- We only include build assets to get targets related to agent generation, the assemblies come from Xamarin.iOS.Tasks -->
<PackageReference Include="Xamarin.Messaging.Core" Version="$(MessagingVersion)" IncludeAssets="build" />
</ItemGroup>
Expand Down
8 changes: 7 additions & 1 deletion msbuild/Xamarin.MacDev.Tasks.Core/Tasks/BTouchTaskBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,13 @@ public override bool Execute ()
BTouchToolPath = PathUtils.ConvertToMacPath (BTouchToolPath);
DotNetCscCompiler = PathUtils.ConvertToMacPath (DotNetCscCompiler);

if (!IsDotNet) {
if (IsDotNet) {
var customHome = Environment.GetEnvironmentVariable ("DOTNET_CUSTOM_HOME");

if(!string.IsNullOrEmpty(customHome)) {
EnvironmentVariables = EnvironmentVariables.CopyAndAdd ($"HOME={customHome}");
}
} else {
ToolExe = BTouchToolExe;
ToolPath = BTouchToolPath;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,19 @@ void ComputeProperties ()
File.WriteAllText (projectPath, csproj);

var arguments = new List<string> ();
if (IsDotNet) {
var environment = default (Dictionary<string, string>);

if (IsDotNet) {
executable = Environment.GetEnvironmentVariable ("DOTNET_HOST_PATH");
if (string.IsNullOrEmpty (executable))
executable = "dotnet";
arguments.Add ("build");

var customHome = Environment.GetEnvironmentVariable ("DOTNET_CUSTOM_HOME");

if (!string.IsNullOrEmpty (customHome)) {
environment = new Dictionary<string, string> { { "HOME", customHome } };
}
} else {
executable = "/Library/Frameworks/Mono.framework/Commands/msbuild";
}
Expand All @@ -108,7 +116,7 @@ void ComputeProperties ()

arguments.Add (projectPath);

ExecuteAsync (executable, arguments).Wait ();
ExecuteAsync (executable, arguments, environment: environment).Wait ();
var computedPropertes = File.ReadAllLines (outputFile);
foreach (var line in computedPropertes) {
var property = line.Substring (0, line.IndexOf ('='));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,15 @@ string ComputeAotCompilerPath ()
arguments.Add ("/t:ComputeAotCompilerPath");
arguments.Add (projectPath);

var environment = default (Dictionary<string, string>);
var customHome = Environment.GetEnvironmentVariable ("DOTNET_CUSTOM_HOME");

if (!string.IsNullOrEmpty (customHome)) {
environment = new Dictionary<string, string> { { "HOME", customHome } };
}

try {
ExecuteAsync (executable, arguments).Wait ();
ExecuteAsync (executable, arguments, environment: environment).Wait ();
return File.ReadAllText (outputFile).Trim ();
} finally {
File.Delete (projectPath);
Expand Down
5 changes: 5 additions & 0 deletions msbuild/Xamarin.iOS.Tasks.Windows/Tasks/PrepareAppBundle.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using System.IO;
using System.IO.Compression;
using Xamarin.iOS.Windows;
using Xamarin.MacDev;

namespace Xamarin.iOS.HotRestart.Tasks {
public class PrepareAppBundle : Task {
Expand Down Expand Up @@ -36,6 +37,10 @@ public override bool Execute ()
"Xamarin.PreBuilt.iOS.app.zip");

ZipFile.ExtractToDirectory (preBuiltAppBundlePath, AppBundlePath);

// Ensure the archived-expanded-entitlements.xcent is empty. If there are any entitlements in that file, the new signature will be invalid
new PDictionary ().Save (Path.Combine (AppBundlePath, "archived-expanded-entitlements.xcent"));

File.WriteAllText (Path.Combine (AppBundlePath, "Extracted"), string.Empty);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ Copyright (C) 2011-2013 Xamarin. All rights reserved.
ReferenceAssemblyPaths="@(ReferencePath)"
RootAssemblyNames="@(TrimmerRootAssembly)"
TrimMode="$(TrimMode)"
DefaultAction="$(TrimmerDefaultAction)"
DefaultAction="$(_TrimmerDefaultAction)"
RemoveSymbols="$(TrimmerRemoveSymbols)"
FeatureSettings="@(_TrimmerFeatureSettings)"
CustomData="@(_TrimmerCustomData)"
Expand Down
5 changes: 4 additions & 1 deletion tests/xtro-sharpie/xtro-sanity/Sanitizer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,10 @@ public static int Main (string [] args)
Console.WriteLine ($"Sanity check failed ({count})");

// useful when updating stuff locally - we report but we don't fail
return Environment.GetEnvironmentVariable ("XTRO_SANITY_SKIP") == "1" ? 0 : count;
var sanitizedOrSkippedSanity =
!string.IsNullOrEmpty (Environment.GetEnvironmentVariable ("XTRO_SANITY_SKIP"))
|| !string.IsNullOrEmpty (Environment.GetEnvironmentVariable ("AUTO_SANITIZE"));
return sanitizedOrSkippedSanity ? 0 : count;
}
}
}
28 changes: 28 additions & 0 deletions tools/devops/automation/templates/build/build-pkgs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,34 @@ steps:
artifactName: WorkloadRollback
continueOnError: true

- bash: |
var=$(make -C $(Build.SourcesDirectory)/xamarin-macios/tools/devops print-variable VARIABLE=IOS_PACKAGE_VERSION)
IOS_PACKAGE_VERSION=${var#*=}
IOS_PACKAGE_VERSION=$(echo $IOS_PACKAGE_VERSION | cut -d "+" -f1)

var=$(make -C $(Build.SourcesDirectory)/xamarin-macios/tools/devops print-variable VARIABLE=MAC_PACKAGE_VERSION)
MAC_PACKAGE_VERSION=${var#*=}
MAC_PACKAGE_VERSION=$(echo $MAC_PACKAGE_VERSION | cut -d "+" -f1)

PKG_DST="$(Build.SourcesDirectory)/PkgsVersions.json"

echo "{" > $PKG_DST
echo "\"iOS\": \"$IOS_PACKAGE_VERSION\"," >> $PKG_DST
echo "\"macOS\": \"$MAC_PACKAGE_VERSION\"" >> $PKG_DST
echo "}" >> $PKG_DST

echo "PkgVersions.json file contents:"
echo "$(cat $PKG_DST)"
name: pkg_versions_file
displayName: 'Generate PkgsVersions.json'

- task: PublishPipelineArtifact@1
displayName: 'Publish PkgsVersions.json'
inputs:
targetPath: $(Build.SourcesDirectory)/PkgsVersions.json
artifactName: PkgsVersions
continueOnError: true

# upload each of the pkgs into the pipeline artifacts
- task: PublishPipelineArtifact@1
displayName: 'Publish Build Artifacts'
Expand Down
1 change: 1 addition & 0 deletions tools/devops/automation/templates/common/setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ steps:
sudo rm -Rf /Developer/MonoTouch
sudo rm -Rf /Library/Frameworks/Xamarin.iOS.framework
sudo rm -Rf /Library/Frameworks/Xamarin.Mac.framework
ls -R /Library/Frameworks
displayName: 'Delete library folders'
timeoutInMinutes: 5

Expand Down
3 changes: 3 additions & 0 deletions tools/devops/automation/templates/common/teardown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ steps:
displayName: 'Remove git creds store'
condition: always()

- bash: |
sudo rm -Rf $(Build.SourcesDirectory)/artifacts
displayName: "Remove artifacts"

- template: uninstall-certificates/v1.yml@templates
parameters:
Expand Down
38 changes: 20 additions & 18 deletions tools/devops/automation/templates/tests/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,29 +116,26 @@ steps:
AUTH_TOKEN_VSENG_XAMARIN_MAC_DEVICES_P12: ${{ parameters.xqaCertPass }}
AUTH_TOKEN_VSENG_XAMARIN_MAC_DEVICES_2_P12: ${{ parameters.xqaCertPass }}

# download the not notarized pkgs since we do not need them to be signed
- task: DownloadPipelineArtifact@2
displayName: Download not notaraized build
displayName: Download artifacts
inputs:
artifact: 'not-signed-package'
allowFailedBuilds: true
path: $(Build.SourcesDirectory)/package
path: $(Build.SourcesDirectory)/artifacts

- pwsh: |
$dir = "$(Build.SourcesDirectory)/package"
Dir $dir
$items = Get-ChildItem $dir -Recurse
foreach ($i in $items) {
if ($i.Name -like "xamarin.ios-*.pkg") {
$path = $i.FullName
Write-Host "##vso[task.setvariable variable=XI_PACKAGE;]$path"
}
if ($i.Name -like "xamarin.mac-*.pkg") {
$path = $i.FullName
Write-Host "##vso[task.setvariable variable=XM_PACKAGE;]$path"
}
}
displayName: 'Set iOS pkgs url'
$dir = "$(Build.SourcesDirectory)/artifacts"
$versionsPath = "$dir/PkgsVersions/PkgsVersions.json"
$versionData = Get-Content $versionsPath | ConvertFrom-Json

$iOSVersion = $versionData | Select-Object -ExpandProperty "iOS"
$iOSPath = "$dir/not-signed-package/xamarin.ios-$iOSVersion.pkg"
Write-Host "##vso[task.setvariable variable=XI_PACKAGE;]$iOSPath"

$macOSVersion = $versionData | Select-Object -ExpandProperty "macOS"
$macOSPath = "$dir/not-signed-package/xamarin.mac-$macOSVersion.pkg"
Write-Host "##vso[task.setvariable variable=XM_PACKAGE;]$macOSPath"

displayName: 'Set pkgs url'
timeoutInMinutes: 5

- bash: |
Expand Down Expand Up @@ -173,6 +170,11 @@ steps:
provisioning_extra_args: '-vvvv'
timeoutInMinutes: 250

- bash: |
ls -R /Library/Frameworks/Xamarin.iOS.framework
ls -R /Library/Frameworks/Xamarin.Mac.framework
displayName: "Show installed Frameworks"

- bash: |
set -e
set -x
Expand Down
6 changes: 5 additions & 1 deletion tools/devops/automation/templates/tests/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,15 +84,19 @@ steps:
$versionData = Get-Content $workloadPath | ConvertFrom-Json
# could be done in a loop, but we don't want to be smart just yet
$iOSVersion = $versionData | Select-Object -ExpandProperty "microsoft.net.sdk.ios"
Write-Host "iOS workload version is $iOSVersion"
Write-Host "##vso[task.setvariable variable=IOS_WORKLOAD_VERSION;]$iOSVersion"

$tvOSVersion = $versionData | Select-Object -ExpandProperty "microsoft.net.sdk.tvos"
Write-Host "tvOS workload version is $tvOSVersion"
Write-Host "##vso[task.setvariable variable=TVOS_WORKLOAD_VERSION;]$tvOSVersion"

$macVersion = $versionData | Select-Object -ExpandProperty "microsoft.net.sdk.macos"
Write-Host "macOS workload version is $macVersion"
Write-Host "##vso[task.setvariable variable=MACOS_WORKLOAD_VERSION;]$macVersion"

$catalystVersion = $versionData | Select-Object -ExpandProperty "microsoft.net.sdk.maccatalyst"
Write-Host "MacCatalyst workload version is $catalystVersion "
Write-Host "##vso[task.setvariable variable=MACCATALYST_WORKLOAD_VERSION;]$catalystVersion"
displayName: 'Set workload versions for xtro'

Expand Down
2 changes: 1 addition & 1 deletion tools/dotnet-linker/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ TOP=../..
include $(TOP)/Make.config
include $(TOP)/mk/rules.mk

BUILD_DIR=bin/Debug/net6.0
BUILD_DIR=bin/Debug/net7.0

DOTNET_TARGETS += \
$(BUILD_DIR)/dotnet-linker.dll \
Expand Down
2 changes: 1 addition & 1 deletion tools/dotnet-linker/dotnet-linker.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<RootNamespace>dotnet_linker</RootNamespace>
<DefineConstants>$(DefineConstants);BUNDLER</DefineConstants>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
Expand Down
Loading