Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
19 changes: 17 additions & 2 deletions build_projects/dotnet-host-build/CompileTargets.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ public class CompileTargets
{ "osx.10.11-x64", "osx.10.10-x64" },
{ "ubuntu.14.04-x64", "ubuntu.14.04-x64" },
{ "ubuntu.16.04-x64", "ubuntu.16.04-x64" },
{ "ubuntu.14.04-arm", "ubuntu.14.04-arm" },
{ "ubuntu.16.04-arm", "ubuntu.16.04-arm" },
{ "ubuntu.16.10-x64", "ubuntu.16.10-x64" },

This comment was marked as spam.

This comment was marked as spam.

{ "centos.7-x64", "rhel.7-x64" },
{ "rhel.7-x64", "rhel.7-x64" },
Expand Down Expand Up @@ -386,10 +388,23 @@ public static BuildTargetResult PackagePkgProjects(BuildTargetContext c)
var hostNugetversion = hostVersion.LatestHostVersion.ToString();
var content = $@"{c.BuildContext["CommitHash"]}{Environment.NewLine}{hostNugetversion}{Environment.NewLine}";
var pkgDir = Path.Combine(c.BuildContext.BuildDirectory, "pkg");
var packCmd = "pack." + (CurrentPlatform.IsWindows ? "cmd" : "sh");
string rid = HostPackageSupportedRids[c.BuildContext.Get<string>("TargetRID")];
File.WriteAllText(Path.Combine(pkgDir, "version.txt"), content);
Exec(Path.Combine(pkgDir, packCmd));

if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
Exec(Path.Combine(pkgDir, "pack.cmd"));
}
else
{
List<string> buildScriptArgList = new List<string>();
string buildScriptFile = Path.Combine(pkgDir, "pack.sh");

buildScriptArgList.Add("--rid");
buildScriptArgList.Add(rid);

Exec(buildScriptFile, buildScriptArgList);
}

foreach (var file in Directory.GetFiles(Path.Combine(pkgDir, "bin", "packages"), "*.nupkg"))
{
Expand Down
4 changes: 4 additions & 0 deletions build_projects/dotnet-host-build/PublishTargets.cs
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,9 @@ public static BuildTargetResult FinalizeBuild(BuildTargetContext c)
"win.arm.version",
"win.arm64.version",
"ubuntu.x64.version",
"ubuntu.14.04.arm.version",
"ubuntu.16.04.x64.version",
"ubuntu.16.04.arm.version",
"ubuntu.16.10.x64.version",
"rhel.x64.version",
"osx.x64.version",
Expand Down Expand Up @@ -190,7 +192,9 @@ private static bool CheckIfAllBuildsHavePublished()
{ "sharedfx_Windows_arm", false },
{ "sharedfx_Windows_arm64", false },
{ "sharedfx_Ubuntu_x64", false },
{ "sharedfx_Ubuntu_14_04_arm", false },
{ "sharedfx_Ubuntu_16_04_x64", false },
{ "sharedfx_Ubuntu_16_04_arm", false },
{ "sharedfx_Ubuntu_16_10_x64", false },
{ "sharedfx_RHEL_x64", false },
{ "sharedfx_OSX_x64", false },
Expand Down
21 changes: 12 additions & 9 deletions build_projects/dotnet-host-build/TestTargets.cs
Original file line number Diff line number Diff line change
Expand Up @@ -96,21 +96,24 @@ public static BuildTargetResult RunTests(BuildTargetContext c)
return c.Success();
}

private static bool IsCrossArch(string rid) {
if (!String.IsNullOrEmpty(rid))
{
return (String.Compare(rid, "win8-arm", true) == 0)
|| (String.Compare(rid, "win10-arm64", true) == 0)
|| (String.Compare(rid, "ubuntu.14.04-arm", true) == 0)
|| (String.Compare(rid, "ubuntu.16.04-arm", true) == 0);
}
return false;
}

private static List<string> RunDotnetTestOnTestProjects(BuildTargetContext c, DotNetCli dotnet, string configuration)
{
var failingTests = new List<string>();

// Fetch the target RID to determine if we support running tests or not.
string rid = c.BuildContext.Get<string>("TargetRID");
bool fIsCrossArch = false;
if (!String.IsNullOrEmpty(rid))
{
if ((String.Compare(rid, "win8-arm", true) == 0) || (String.Compare(rid, "win10-arm64", true) == 0))
{
// We dont support running native tests for cross-architecture builds yet.
fIsCrossArch = true;
}
}
bool fIsCrossArch = IsCrossArch(rid); // We dont support running native tests for cross-architecture builds yet.

foreach (var project in TestProjects)
{
Expand Down
4 changes: 3 additions & 1 deletion build_projects/shared-build-targets-utils/Utils/Crossgen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ private string GetCrossgenPathForVersion()
return ridCrossgen;
}

// TODO-ARM-Crossgen: Add ubuntu.14.04-arm and ubuntu.16.04-arm
if (_targetRID == "win8-arm")
{
ridCrossgen = Path.Combine(crossgenPackagePath, "tools", "x86_arm", $"crossgen{Constants.ExeSuffix}");
Expand Down Expand Up @@ -73,6 +74,7 @@ private string GetLibCLRJitPathForVersion()

string jitPath = Path.Combine(jitPackagePath, "runtimes", jitRid, "native", $"{Constants.DynamicLibPrefix}clrjit{Constants.DynamicLibSuffix}");

// TODO-ARM-Crossgen: Add ubuntu.14.04-arm and ubuntu.16.04-arm
if (_targetRID == "win8-arm")
{
jitPath = Path.Combine(jitPackagePath, "runtimes", "x86_arm", "native", $"{Constants.DynamicLibPrefix}clrjit{Constants.DynamicLibSuffix}");
Expand Down Expand Up @@ -228,4 +230,4 @@ public void CrossgenDirectory(string sharedFxPath, string pathToAssemblies)
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ public SharedFrameworkPublisher(

// If we are dealing with cross-targeting compilation, then specify the
// correct RID for crossgen to use when compiling SharedFramework.
// TODO-ARM-Crossgen: Add ubuntu.14.04-arm and ubuntu.16.04-arm
if ((sharedFrameworkRid == "win8-arm") || (sharedFrameworkRid == "win10-arm64"))
{
crossgenRID = sharedFrameworkRid;
Expand Down
38 changes: 29 additions & 9 deletions pkg/pack.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
#!/usr/bin/env bash

init_distro_name()
usage()
{
if [ ! -e /etc/os-release ]; then
echo "WARNING: Can not determine runtime id for current distro."
export __distro_rid=""
else
source /etc/os-release
export __distro_rid="$ID.$VERSION_ID-x64"
fi
echo "Usage: $0 --rid <Runtime Identifier>"
echo ""
echo "Options:"
echo " --rid <Runtime Identifier> Target Runtime Identifier"

exit 1
}

set -e
Expand All @@ -25,6 +24,24 @@ done
__project_dir="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
__distro_rid=

while [ "$1" != "" ]; do
lowerI="$(echo $1 | awk '{print tolower($0)}')"
case $lowerI in
-h|--help)
usage
exit 1
;;
--rid)
shift
__distro_rid=$1
;;
*)
echo "Unknown argument to pack.sh $1"
exit 1
esac
shift
done

# setup msbuild
"$__project_dir/init-tools.sh"

This comment was marked as spam.

Expand All @@ -44,7 +61,10 @@ if [ "$(uname -s)" == "Darwin" ]; then
__targets_param="TargetsOSX=true"
else
__targets_param="TargetsLinux=true"
init_distro_name
if [ -z $__distro_rid ]; then
echo "Runtime Identifier not defined"
exit 1
fi
fi

__common_parameters="/p:$__targets_param /p:DistroRid=$__distro_rid /verbosity:minimal"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,18 @@
<OSGroup>Linux</OSGroup>
<Platform>amd64</Platform>
</Project>
<Project Condition="'$(TargetsLinux)' == 'true' and '$(DistroRid)' == 'ubuntu.14.04-arm'" Include="ubuntu.14.04/Microsoft.NETCore.DotNetHost.pkgproj">
<OSGroup>Linux</OSGroup>
<Platform>arm</Platform>
</Project>
<Project Condition="'$(TargetsLinux)' == 'true' and '$(DistroRid)' == 'ubuntu.16.04-x64'" Include="ubuntu.16.04/Microsoft.NETCore.DotNetHost.pkgproj">
<OSGroup>Linux</OSGroup>
<Platform>amd64</Platform>
</Project>
<Project Condition="'$(TargetsLinux)' == 'true' and '$(DistroRid)' == 'ubuntu.16.04-arm'" Include="ubuntu.16.04/Microsoft.NETCore.DotNetHost.pkgproj">
<OSGroup>Linux</OSGroup>
<Platform>arm</Platform>
</Project>
<Project Condition="'$(TargetsLinux)' == 'true' and '$(DistroRid)' == 'ubuntu.16.10-x64'" Include="ubuntu.16.10/Microsoft.NETCore.DotNetHost.pkgproj">
<OSGroup>Linux</OSGroup>
<Platform>amd64</Platform>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,15 @@
<ProjectReference Include="ubuntu.14.04\Microsoft.NETCore.DotNetHost.pkgproj">
<Platform>amd64</Platform>
</ProjectReference>
<ProjectReference Include="ubuntu.14.04\Microsoft.NETCore.DotNetHost.pkgproj">
<Platform>arm</Platform>
</ProjectReference>
<ProjectReference Include="ubuntu.16.04\Microsoft.NETCore.DotNetHost.pkgproj">
<Platform>amd64</Platform>
</ProjectReference>
<ProjectReference Include="ubuntu.16.04\Microsoft.NETCore.DotNetHost.pkgproj">
<Platform>arm</Platform>
</ProjectReference>
<ProjectReference Include="ubuntu.16.10\Microsoft.NETCore.DotNetHost.pkgproj">
<Platform>amd64</Platform>
</ProjectReference>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,18 @@
<OSGroup>Linux</OSGroup>
<Platform>amd64</Platform>
</Project>
<Project Condition="'$(TargetsLinux)' == 'true' and '$(DistroRid)' == 'ubuntu.14.04-arm'" Include="ubuntu.14.04/Microsoft.NETCore.DotNetHostPolicy.pkgproj">
<OSGroup>Linux</OSGroup>
<Platform>arm</Platform>
</Project>
<Project Condition="'$(TargetsLinux)' == 'true' and '$(DistroRid)' == 'ubuntu.16.04-x64'" Include="ubuntu.16.04/Microsoft.NETCore.DotNetHostPolicy.pkgproj">
<OSGroup>Linux</OSGroup>
<Platform>amd64</Platform>
</Project>
<Project Condition="'$(TargetsLinux)' == 'true' and '$(DistroRid)' == 'ubuntu.16.04-arm'" Include="ubuntu.16.04/Microsoft.NETCore.DotNetHostPolicy.pkgproj">
<OSGroup>Linux</OSGroup>
<Platform>arm</Platform>
</Project>
<Project Condition="'$(TargetsLinux)' == 'true' and '$(DistroRid)' == 'ubuntu.16.10-x64'" Include="ubuntu.16.10/Microsoft.NETCore.DotNetHostPolicy.pkgproj">
<OSGroup>Linux</OSGroup>
<Platform>amd64</Platform>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,15 @@
<ProjectReference Include="ubuntu.14.04\Microsoft.NETCore.DotNetHostPolicy.pkgproj">
<Platform>amd64</Platform>
</ProjectReference>
<ProjectReference Include="ubuntu.14.04\Microsoft.NETCore.DotNetHostPolicy.pkgproj">
<Platform>arm</Platform>
</ProjectReference>
<ProjectReference Include="ubuntu.16.04\Microsoft.NETCore.DotNetHostPolicy.pkgproj">
<Platform>amd64</Platform>
</ProjectReference>
<ProjectReference Include="ubuntu.16.04\Microsoft.NETCore.DotNetHostPolicy.pkgproj">
<Platform>arm</Platform>
</ProjectReference>
<ProjectReference Include="ubuntu.16.10\Microsoft.NETCore.DotNetHostPolicy.pkgproj">
<Platform>amd64</Platform>
</ProjectReference>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,18 @@
<OSGroup>Linux</OSGroup>
<Platform>amd64</Platform>
</Project>
<Project Condition="'$(TargetsLinux)' == 'true' and '$(DistroRid)' == 'ubuntu.14.04-arm'" Include="ubuntu.14.04/Microsoft.NETCore.DotNetHostResolver.pkgproj">
<OSGroup>Linux</OSGroup>
<Platform>arm</Platform>
</Project>
<Project Condition="'$(TargetsLinux)' == 'true' and '$(DistroRid)' == 'ubuntu.16.04-x64'" Include="ubuntu.16.04/Microsoft.NETCore.DotNetHostResolver.pkgproj">
<OSGroup>Linux</OSGroup>
<Platform>amd64</Platform>
</Project>
<Project Condition="'$(TargetsLinux)' == 'true' and '$(DistroRid)' == 'ubuntu.16.04-arm'" Include="ubuntu.16.04/Microsoft.NETCore.DotNetHostResolver.pkgproj">
<OSGroup>Linux</OSGroup>
<Platform>arm</Platform>
</Project>
<Project Condition="'$(TargetsLinux)' == 'true' and '$(DistroRid)' == 'ubuntu.16.10-x64'" Include="ubuntu.16.10/Microsoft.NETCore.DotNetHostResolver.pkgproj">
<OSGroup>Linux</OSGroup>
<Platform>amd64</Platform>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,15 @@
<ProjectReference Include="ubuntu.14.04\Microsoft.NETCore.DotNetHostResolver.pkgproj">
<Platform>amd64</Platform>
</ProjectReference>
<ProjectReference Include="ubuntu.14.04\Microsoft.NETCore.DotNetHostResolver.pkgproj">
<Platform>arm</Platform>
</ProjectReference>
<ProjectReference Include="ubuntu.16.04\Microsoft.NETCore.DotNetHostResolver.pkgproj">
<Platform>amd64</Platform>
</ProjectReference>
<ProjectReference Include="ubuntu.16.04\Microsoft.NETCore.DotNetHostResolver.pkgproj">
<Platform>arm</Platform>
</ProjectReference>
<ProjectReference Include="ubuntu.16.10\Microsoft.NETCore.DotNetHostResolver.pkgproj">
<Platform>amd64</Platform>
</ProjectReference>
Expand Down