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

Initial workload split #29

Merged
merged 11 commits into from
Jun 24, 2021
Merged
1 change: 1 addition & 0 deletions eng/Tools.props
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<ItemGroup>
<!-- arcade -->
<PackageReference Include="Microsoft.DotNet.Build.Tasks.Packaging" Version="$(MicrosoftDotNetBuildTasksPackagingVersion)" />
<PackageReference Include="Microsoft.DotNet.Build.Tasks.Templating" PrivateAssets="All" Version="$(MicrosoftDotNetBuildTasksTemplatingVersion)" IsImplicitlyDefined="true" />
</ItemGroup>
</Project>

4 changes: 4 additions & 0 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,9 @@
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>a3377cccde8639089f99107e2ba5df2c8cbe6394</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Build.Tasks.Templating" Version="6.0.0-beta.21310.4">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>a565e0c890d0a325775882542cff7e775db8f8e6</Sha>
</Dependency>
</ToolsetDependencies>
</Dependencies>
4 changes: 3 additions & 1 deletion eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@
<VersionPrefix>6.0.0</VersionPrefix>
<PreReleaseVersionLabel>preview</PreReleaseVersionLabel>
<PreReleaseVersionIteration>7</PreReleaseVersionIteration>
<!-- when bumping this you also need to rename the .pkgproj's in eng/nuget and eng/nuget/descriptions.json. TODO: make this better -->

<EmscriptenVersion>2.0.23</EmscriptenVersion>
<WorkloadSdkBandVersion>6.0.100</WorkloadSdkBandVersion>
</PropertyGroup>
<PropertyGroup>
<MicrosoftDotNetBuildTasksPackagingVersion>6.0.0-beta.21319.2</MicrosoftDotNetBuildTasksPackagingVersion>
<MicrosoftDotNetBuildTasksTemplatingVersion>6.0.0-beta.21319.2</MicrosoftDotNetBuildTasksTemplatingVersion>
</PropertyGroup>
</Project>
7 changes: 4 additions & 3 deletions eng/emsdk.proj
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,10 @@
<Target Name="Test" />
<Target Name="Pack" DependsOnTargets="Build">
<Message Importance="High" Text="Creating nuget packages..." />
<MSBuild Projects="$(MSBuildThisFileDirectory)nuget\Microsoft.NET.Runtime.Emscripten.$(EmscriptenVersion).Node.$(PackageRID).pkgproj" Targets="Build" />
<MSBuild Projects="$(MSBuildThisFileDirectory)nuget\Microsoft.NET.Runtime.Emscripten.$(EmscriptenVersion).Python.$(PackageRID).pkgproj" Targets="Build" Condition="'$(UsesPythonFromEmsdk)' == 'true'" />
<MSBuild Projects="$(MSBuildThisFileDirectory)nuget\Microsoft.NET.Runtime.Emscripten.$(EmscriptenVersion).Sdk.$(PackageRID).pkgproj" Targets="Build" />
<MSBuild Projects="$(MSBuildThisFileDirectory)nuget\Microsoft.NET.Runtime.Emscripten.Node\Microsoft.NET.Runtime.Emscripten.Node.pkgproj" Targets="Build" />
<MSBuild Projects="$(MSBuildThisFileDirectory)nuget\Microsoft.NET.Runtime.Emscripten.Python\Microsoft.NET.Runtime.Emscripten.Python.pkgproj" Targets="Build" Condition="'$(UsesPythonFromEmsdk)' == 'true'" />
<MSBuild Projects="$(MSBuildThisFileDirectory)nuget\Microsoft.NET.Runtime.Emscripten.Sdk\Microsoft.NET.Runtime.Emscripten.Sdk.pkgproj" Targets="Build" />
<MSBuild Projects="$(MSBuildThisFileDirectory)nuget\Microsoft.NET.Workload.Emscripten.Manifest\Microsoft.NET.Workload.Emscripten.Manifest.pkgproj" Targets="Build" Condition="'$(AssetManifestOS)' == '' or '$(AssetManifestOS)' == 'osx'" />
</Target>
<Import Project="$(RepoRoot)\Directory.Build.targets" />
</Project>

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion eng/nuget/Microsoft.NET.Runtime.Emscripten.Common.props
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
<ReleaseNotes>https://go.microsoft.com/fwlink/?LinkID=799421</ReleaseNotes>

<PackageVersion>$(VersionPrefix)</PackageVersion>
<PackageDescriptionFile>$(MSBuildThisFileDirectory)/descriptions.json</PackageDescriptionFile>
<PackageLicenseFile>$(RepoRoot)/LICENSE</PackageLicenseFile>
<PackageIndexFile>$(MSBuildThisFileDirectory)/packageIndex.json</PackageIndexFile>

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<Project>
<Import Project="$(RepoRoot)\Directory.Build.props" />
<Import Project="$(NuGetPackageRoot)\microsoft.dotnet.build.tasks.packaging\$(MicrosoftDotNetBuildTasksPackagingVersion)\build\Microsoft.DotNet.Build.Tasks.Packaging.props" />
<Import Project="$([MSBuild]::GetPathOfFileAbove(Microsoft.NET.Runtime.Emscripten.Common.props))" />
<Import Project="Microsoft.NET.Runtime.Emscripten.Node.props" />

<Target Name="_PrepareForPack" BeforeTargets="GetPackageFiles" Returns="@(PackageFile)">
<!-- Override the id to include the Emscripten version -->
<PropertyGroup>
<Id>Microsoft.NET.Runtime.Emscripten.$(EmscriptenVersion).Node.$(PackageRID)</Id>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! I like that the files don't need to be renamed anymore.

</PropertyGroup>
</Target>

<PropertyGroup>
<PackageDescription>Contains Emscripten Node binaries for $(PackageRID).</PackageDescription>
<Description>Contains Emscripten Node binaries for $(PackageRID).</Description>
</PropertyGroup>

<Import Project="$(NuGetPackageRoot)\microsoft.dotnet.build.tasks.packaging\$(MicrosoftDotNetBuildTasksPackagingVersion)\build\Microsoft.DotNet.Build.Tasks.Packaging.targets" />
<Import Project="$(RepoRoot)\Directory.Build.targets" />
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<Project>
<Import Project="$(RepoRoot)\Directory.Build.props" />
<Import Project="$(NuGetPackageRoot)\microsoft.dotnet.build.tasks.packaging\$(MicrosoftDotNetBuildTasksPackagingVersion)\build\Microsoft.DotNet.Build.Tasks.Packaging.props" />
<Import Project="$([MSBuild]::GetPathOfFileAbove(Microsoft.NET.Runtime.Emscripten.Common.props))" />
<Import Project="Microsoft.NET.Runtime.Emscripten.Python.props" />

<Target Name="_PrepareForPack" BeforeTargets="GetPackageFiles" Returns="@(PackageFile)">
<!-- Override the id to include the Emscripten version -->
<PropertyGroup>
<Id>Microsoft.NET.Runtime.Emscripten.$(EmscriptenVersion).Python.$(PackageRID)</Id>
</PropertyGroup>
</Target>

<PropertyGroup>
<PackageDescription>Contains Emscripten Python binaries for $(PackageRID).</PackageDescription>
<Description>Contains Emscripten Python binaries for $(PackageRID).</Description>
</PropertyGroup>

<Import Project="$(NuGetPackageRoot)\microsoft.dotnet.build.tasks.packaging\$(MicrosoftDotNetBuildTasksPackagingVersion)\build\Microsoft.DotNet.Build.Tasks.Packaging.targets" />
<Import Project="$(RepoRoot)\Directory.Build.targets" />
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<Project>
<Import Project="$(RepoRoot)\Directory.Build.props" />
<Import Project="$(NuGetPackageRoot)\microsoft.dotnet.build.tasks.packaging\$(MicrosoftDotNetBuildTasksPackagingVersion)\build\Microsoft.DotNet.Build.Tasks.Packaging.props" />
<Import Project="$([MSBuild]::GetPathOfFileAbove(Microsoft.NET.Runtime.Emscripten.Common.props))" />
<Import Project="Microsoft.NET.Runtime.Emscripten.Sdk.props" />

<Target Name="_PrepareForPack" BeforeTargets="GetPackageFiles" Returns="@(PackageFile)">
<!-- Override the id to include the Emscripten version -->
<PropertyGroup>
<Id>Microsoft.NET.Runtime.Emscripten.$(EmscriptenVersion).Sdk.$(PackageRID)</Id>
</PropertyGroup>
</Target>

<PropertyGroup>
<PackageDescription>Contains Emscripten SDK binaries for $(PackageRID).</PackageDescription>
<Description>Contains Emscripten SDK binaries for $(PackageRID).</Description>
</PropertyGroup>

<Import Project="$(NuGetPackageRoot)\microsoft.dotnet.build.tasks.packaging\$(MicrosoftDotNetBuildTasksPackagingVersion)\build\Microsoft.DotNet.Build.Tasks.Packaging.targets" />
<Import Project="$(RepoRoot)\Directory.Build.targets" />
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<Project DefaultTargets="Build">
<Import Project="$(RepoRoot)\Directory.Build.props" />

<Import Project="$(NuGetPackageRoot)\microsoft.dotnet.build.tasks.packaging\$(MicrosoftDotNetBuildTasksPackagingVersion)\build\Microsoft.DotNet.Build.Tasks.Packaging.props" />
<Import Project="$(NuGetPackageRoot)\microsoft.dotnet.build.tasks.templating\$(MicrosoftDotNetBuildTasksTemplatingVersion)\build\Microsoft.DotNet.Build.Tasks.Templating.props" />
<Import Project="$([MSBuild]::GetPathOfFileAbove(Microsoft.NET.Runtime.Emscripten.Common.props))" />

<PropertyGroup>
<PackageDescription>Internal toolchain package not meant for direct consumption. Please do not reference directly.</PackageDescription>
<Description>Internal toolchain package not meant for direct consumption. Please do not reference directly.</Description>
</PropertyGroup>
lewing marked this conversation as resolved.
Show resolved Hide resolved

lewing marked this conversation as resolved.
Show resolved Hide resolved
<Target Name="_PrepareForPack" BeforeTargets="GetPackageFiles" Returns="@(PackageFile)">
<!-- Override the id to include the sdk band as per the workload installer spec -->
<PropertyGroup>
<Id>Microsoft.NET.Workload.Emscripten.Manifest-$(WorkloadSdkBandVersion)</Id>
</PropertyGroup>

<PropertyGroup>
<WorkloadManifestPath>$(IntermediateOutputPath)WorkloadManifest.json</WorkloadManifestPath>
</PropertyGroup>

<ItemGroup>
<PackageFile Include="$(WorkloadManifestPath)" TargetPath="data" />
<PackageFile Include="WorkloadManifest.targets" TargetPath="data" />
</ItemGroup>
</Target>

<!-- Running this target ensures we have the fully evaluated PackageVersion -->
<Target Name="_WriteManifestValues" AfterTargets="CalculatePackageVersion">
<PropertyGroup>
<PackagePathVersion>PackageVersion=$(PackageVersion);</PackagePathVersion>
</PropertyGroup>

<ItemGroup>
<_WorkloadManifestValues Include="WorkloadVersion" Value="$(PackageVersion)" />
<_WorkloadManifestValues Include="PackageVersion" Value="$(PackageVersion)" />
<_WorkloadManifestValues Include="EmscriptenVersion" Value="$(EmscriptenVersion)" />
</ItemGroup>

<GenerateFileFromTemplate
TemplateFile="WorkloadManifest.json.in"
Properties="@(_WorkloadManifestValues->'%(Identity)=%(Value)')"
OutputPath="$(WorkloadManifestPath)" />
</Target>

<Import Project="$(NuGetPackageRoot)\microsoft.dotnet.build.tasks.packaging\$(MicrosoftDotNetBuildTasksPackagingVersion)\build\Microsoft.DotNet.Build.Tasks.Packaging.targets" />
<Import Project="$(RepoRoot)\Directory.Build.targets" />
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"version": "${WorkloadVersion}",
"workloads": {
"microsoft-net-sdk-emscripten": {
"abstract": true,
"description": "Emscripten SDK compiler tooling",
"packs": [
"Microsoft.NET.Runtime.Emscripten.Node",
"Microsoft.NET.Runtime.Emscripten.Python",
"Microsoft.NET.Runtime.Emscripten.Sdk"
],
"platforms": [ "win-x64", "linux-x64", "osx-x64", "osx-arm64" ]
}
},
"packs": {
"Microsoft.NET.Runtime.Emscripten.Node" : {
"kind": "Sdk",
"version": "${PackageVersion}",
"alias-to": {
"win-x64": "Microsoft.NET.Runtime.${EmscriptenVersion}.Node.win-x64",
"linux-x64": "Microsoft.NET.Runtime.Emscripten.${EmscriptenVersion}.Node.linux-x64",
"osx-x64": "Microsoft.NET.Runtime.Emscripten.${EmscriptenVersion}.Node.osx-x64",
"osx-arm64": "Microsoft.NET.Runtime.Emscripten.${EmscriptenVersion}.Node.osx-x64"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

osx-arm64 -> osx-x64 - is this deliberate? I see this for the other two packs too

Copy link
Member Author

@lewing lewing Jun 23, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is to tell the sdk that it should use the osx-x64 packs when targeting osx-arm64 (they work using rosetta)

}
},
"Microsoft.NET.Runtime.Emscripten.Python" : {
"kind": "Sdk",
"version": "${PackageVersion}",
"alias-to": {
"win-x64": "Microsoft.NET.Runtime.Emscripten.${EmscriptenVersion}.Python.win-x64",
"osx-x64": "Microsoft.NET.Runtime.Emscripten.${EmscriptenVersion}.Python.osx-x64",
"osx-arm64": "Microsoft.NET.Runtime.Emscripten.${EmscriptenVersion}.Python.osx-x64"
}
},
"Microsoft.NET.Runtime.Emscripten.Sdk" : {
"kind": "Sdk",
"version": "${PackageVersion}",
"alias-to": {
"win-x64": "Microsoft.NET.Runtime.Emscripten.${EmscriptenVersion}.Sdk.win-x64",
"linux-x64": "Microsoft.NET.Runtime.Emscripten.${EmscriptenVersion}.Sdk.linux-x64",
"osx-x64": "Microsoft.NET.Runtime.Emscripten.${EmscriptenVersion}.Sdk.osx-x64",
"osx-arm64": "Microsoft.NET.Runtime.Emscripten.${EmscriptenVersion}.Sdk.osx-x64"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<Project>
lewing marked this conversation as resolved.
Show resolved Hide resolved
<PropertyGroup Condition="'$(RuntimeIdentifier)' == 'browser-wasm'">
<UsingBrowserRuntimeWorkload Condition="'$(RunAOTCompilation)' == 'true' or '$(UsingMicrosoftNETSdkBlazorWebAssembly)' != 'true'" >true</UsingBrowserRuntimeWorkload>
<UsingBrowserRuntimeWorkload Condition="'$(UsingBrowserRuntimeWorkload)' == ''" >$(WasmNativeWorkload)</UsingBrowserRuntimeWorkload>
</PropertyGroup>

<ImportGroup Condition="'$(RuntimeIdentifier)' == 'browser-wasm' and '$(UsingBrowserRuntimeWorkload)' == 'true'">
<Import Project="Sdk.props" Sdk="Microsoft.NET.Runtime.Emscripten.Python" Condition="!$([MSBuild]::IsOsPlatform('Linux'))" />
<Import Project="Sdk.props" Sdk="Microsoft.NET.Runtime.Emscripten.Node" />
<Import Project="Sdk.props" Sdk="Microsoft.NET.Runtime.Emscripten.Sdk" />
</ImportGroup>
</Project>
47 changes: 0 additions & 47 deletions eng/nuget/descriptions.json

This file was deleted.