Add support for building dotnet CLI on Debian.
This commit is contained in:
parent
c33c2ff127
commit
ee4bbb43ff
6 changed files with 47 additions and 14 deletions
|
@ -17,6 +17,7 @@
|
||||||
"osx.10.10-x64": {},
|
"osx.10.10-x64": {},
|
||||||
"ubuntu.14.04-x64": {},
|
"ubuntu.14.04-x64": {},
|
||||||
"centos.7-x64": {},
|
"centos.7-x64": {},
|
||||||
"rhel.7.2-x64": {}
|
"rhel.7.2-x64": {},
|
||||||
|
"debian.8.2-x64": {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -65,11 +65,20 @@ namespace Microsoft.DotNet.Cli.Build.Framework
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static bool IsDebian
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
var osname = PlatformServices.Default.Runtime.OperatingSystem;
|
||||||
|
return string.Equals(osname, "debian", StringComparison.OrdinalIgnoreCase);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static bool IsLinux
|
public static bool IsLinux
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return IsUbuntu || IsCentOS || IsRHEL;
|
return IsUbuntu || IsCentOS || IsRHEL || IsDebian;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -118,6 +127,10 @@ namespace Microsoft.DotNet.Cli.Build.Framework
|
||||||
{
|
{
|
||||||
return BuildPlatform.RHEL;
|
return BuildPlatform.RHEL;
|
||||||
}
|
}
|
||||||
|
else if (IsDebian)
|
||||||
|
{
|
||||||
|
return BuildPlatform.Debian;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return default(BuildPlatform);
|
return default(BuildPlatform);
|
||||||
|
|
|
@ -8,6 +8,7 @@ namespace Microsoft.DotNet.Cli.Build.Framework
|
||||||
OSX = 4,
|
OSX = 4,
|
||||||
Ubuntu = 5,
|
Ubuntu = 5,
|
||||||
CentOS = 6,
|
CentOS = 6,
|
||||||
RHEL = 7
|
RHEL = 7,
|
||||||
|
Debian = 8
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -260,7 +260,7 @@ namespace Microsoft.DotNet.Cli.Build
|
||||||
{
|
{
|
||||||
packageId = "toolchain.ubuntu.14.04-x64.Microsoft.DotNet.AppDep";
|
packageId = "toolchain.ubuntu.14.04-x64.Microsoft.DotNet.AppDep";
|
||||||
}
|
}
|
||||||
else if (CurrentPlatform.IsCentOS || CurrentPlatform.IsRHEL)
|
else if (CurrentPlatform.IsCentOS || CurrentPlatform.IsRHEL || CurrentPlatform.IsDebian)
|
||||||
{
|
{
|
||||||
c.Warn($"Native compilation is not yet working on {CurrentPlatform.Current}");
|
c.Warn($"Native compilation is not yet working on {CurrentPlatform.Current}");
|
||||||
return c.Success();
|
return c.Success();
|
||||||
|
@ -308,6 +308,10 @@ namespace Microsoft.DotNet.Cli.Build
|
||||||
// CentOS runtime is in the runtime.rhel.7-x64... package.
|
// CentOS runtime is in the runtime.rhel.7-x64... package.
|
||||||
packageId = "runtime.rhel.7-x64.Microsoft.NETCore.Runtime.CoreCLR";
|
packageId = "runtime.rhel.7-x64.Microsoft.NETCore.Runtime.CoreCLR";
|
||||||
}
|
}
|
||||||
|
else if (CurrentPlatform.IsDebian)
|
||||||
|
{
|
||||||
|
packageId = "runtime.debian.8.2-x64.Microsoft.NETCore.Runtime.CoreCLR";
|
||||||
|
}
|
||||||
else if (CurrentPlatform.IsOSX)
|
else if (CurrentPlatform.IsOSX)
|
||||||
{
|
{
|
||||||
packageId = "runtime.osx.10.10-x64.Microsoft.NETCore.Runtime.CoreCLR";
|
packageId = "runtime.osx.10.10-x64.Microsoft.NETCore.Runtime.CoreCLR";
|
||||||
|
|
|
@ -85,6 +85,8 @@ current_os()
|
||||||
echo "centos"
|
echo "centos"
|
||||||
elif [ "$(cat /etc/*-release | grep -cim1 rhel)" -eq 1 ]; then
|
elif [ "$(cat /etc/*-release | grep -cim1 rhel)" -eq 1 ]; then
|
||||||
echo "rhel.7"
|
echo "rhel.7"
|
||||||
|
elif [ "$(cat /etc/*-release | grep -cim1 debian)" -eq 1 ]; then
|
||||||
|
echo "debian"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
@ -106,11 +108,19 @@ check_pre_reqs() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$(uname)" = "Linux" ]; then
|
if [ "$(uname)" = "Linux" ]; then
|
||||||
[ -z "$(ldconfig -p | grep libunwind)" ] && say_err "Unable to locate libunwind. Install libunwind to continue" && _failing=true
|
|
||||||
[ -z "$(ldconfig -p | grep libssl)" ] && say_err "Unable to locate libssl. Install libssl to continue" && _failing=true
|
if ! [ -x "$(command -v ldconfig)" ]; then
|
||||||
[ -z "$(ldconfig -p | grep libcurl)" ] && say_err "Unable to locate libcurl. Install libcurl to continue" && _failing=true
|
echo "ldconfig is not in PATH, trying /sbin/ldconfig."
|
||||||
[ -z "$(ldconfig -p | grep libicu)" ] && say_err "Unable to locate libicu. Install libicu to continue" && _failing=true
|
LDCONFIG_COMMAND="/sbin/ldconfig"
|
||||||
[ -z "$(ldconfig -p | grep gettext)" ] && say_err "Unable to locate gettext. Install gettext to continue" && _failing=true
|
else
|
||||||
|
LDCONFIG_COMMAND="ldconfig"
|
||||||
|
fi
|
||||||
|
|
||||||
|
[ -z "$($LDCONFIG_COMMAND -p | grep libunwind)" ] && say_err "Unable to locate libunwind. Install libunwind to continue" && _failing=true
|
||||||
|
[ -z "$($LDCONFIG_COMMAND -p | grep libssl)" ] && say_err "Unable to locate libssl. Install libssl to continue" && _failing=true
|
||||||
|
[ -z "$($LDCONFIG_COMMAND -p | grep libcurl)" ] && say_err "Unable to locate libcurl. Install libcurl to continue" && _failing=true
|
||||||
|
[ -z "$($LDCONFIG_COMMAND -p | grep libicu)" ] && say_err "Unable to locate libicu. Install libicu to continue" && _failing=true
|
||||||
|
[ -z "$($LDCONFIG_COMMAND -p | grep gettext)" ] && say_err "Unable to locate gettext. Install gettext to continue" && _failing=true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$_failing" = true ]; then
|
if [ "$_failing" = true ]; then
|
||||||
|
|
|
@ -83,7 +83,7 @@ namespace Microsoft.DotNet.Tests.EndToEnd
|
||||||
[Fact]
|
[Fact]
|
||||||
public void TestDotnetBuildNativeRyuJit()
|
public void TestDotnetBuildNativeRyuJit()
|
||||||
{
|
{
|
||||||
if(!IsNativeCompilationSupported())
|
if (!IsNativeCompilationSupported())
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -98,8 +98,8 @@ namespace Microsoft.DotNet.Tests.EndToEnd
|
||||||
[Fact]
|
[Fact]
|
||||||
public void TestDotnetBuildNativeCpp()
|
public void TestDotnetBuildNativeCpp()
|
||||||
{
|
{
|
||||||
if(!IsNativeCompilationSupported())
|
if (!IsNativeCompilationSupported())
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -113,8 +113,8 @@ namespace Microsoft.DotNet.Tests.EndToEnd
|
||||||
[Fact]
|
[Fact]
|
||||||
public void TestDotnetCompileNativeCppIncremental()
|
public void TestDotnetCompileNativeCppIncremental()
|
||||||
{
|
{
|
||||||
if(!IsNativeCompilationSupported())
|
if (!IsNativeCompilationSupported())
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -226,6 +226,10 @@ namespace Microsoft.DotNet.Tests.EndToEnd
|
||||||
Console.WriteLine("Skipping native compilation tests on CentOS/RHEL - https://github.com/dotnet/cli/issues/453");
|
Console.WriteLine("Skipping native compilation tests on CentOS/RHEL - https://github.com/dotnet/cli/issues/453");
|
||||||
isSupported = false;
|
isSupported = false;
|
||||||
break;
|
break;
|
||||||
|
case "debian":
|
||||||
|
Console.WriteLine("Skipping native compilation tests on Debian - https://github.com/dotnet/cli/issues/1666");
|
||||||
|
isSupported = false;
|
||||||
|
break;
|
||||||
case "windows":
|
case "windows":
|
||||||
Console.WriteLine("Skipping native compilation tests on Windows x86 - https://github.com/dotnet/cli/issues/1550");
|
Console.WriteLine("Skipping native compilation tests on Windows x86 - https://github.com/dotnet/cli/issues/1550");
|
||||||
isSupported = RuntimeInformation.ProcessArchitecture != Architecture.X86;
|
isSupported = RuntimeInformation.ProcessArchitecture != Architecture.X86;
|
||||||
|
|
Loading…
Reference in a new issue