Bump target frameworks of C# programs from netcoreapp1.0 to netcoreapp2.1 (#5838)
* Bump target frameworks from netcoreapp1.0 to netcoreapp2.2. Move global.json up to root of repo, change SDK ver to 2.2.100 Change .net core sdk in dockerfile for kokoro to ver 2.2.100 * Re-add curl install * Change all exe target to 2.1 * Fix incorrect versions in global.json and Dockerfile * Downgrade version to 2.1 to match exe targets * introduce separate testing Dockerfile for C# * revert changes to the shared Dockerfile * use netcoreapp2.1 for C# conformance tests * use language specific dockerfile for testing C# * Edit compatibility tests script to use parameters instead of file copies * install dotnet SDK on windows before running the tests * update csharp_EXTRA_DISTpull/5802/head
parent
59284450fa
commit
15fab9109d
14 changed files with 86 additions and 30 deletions
@ -0,0 +1,21 @@ |
||||
#!/usr/bin/env powershell |
||||
# Install dotnet SDK based on the SDK version from global.json |
||||
|
||||
Set-StrictMode -Version 2 |
||||
$ErrorActionPreference = 'Stop' |
||||
|
||||
# avoid "Unknown error on a send" in Invoke-WebRequest |
||||
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 |
||||
|
||||
$InstallScriptUrl = 'https://dot.net/v1/dotnet-install.ps1' |
||||
$InstallScriptPath = Join-Path "$env:TEMP" 'dotnet-install.ps1' |
||||
$GlobalJsonPath = Join-Path $PSScriptRoot '..' | Join-Path -ChildPath 'global.json' |
||||
|
||||
# Resolve SDK version from global.json file |
||||
$GlobalJson = Get-Content -Raw $GlobalJsonPath | ConvertFrom-Json |
||||
$SDKVersion = $GlobalJson.sdk.version |
||||
|
||||
# Download install script |
||||
Write-Host "Downloading install script: $InstallScriptUrl => $InstallScriptPath" |
||||
Invoke-WebRequest -Uri $InstallScriptUrl -OutFile $InstallScriptPath |
||||
&$InstallScriptPath -Version $SDKVersion |
@ -0,0 +1,36 @@ |
||||
FROM debian:stretch |
||||
|
||||
# Install dependencies. We start with the basic ones require to build protoc |
||||
# and the C++ build |
||||
RUN apt-get update && apt-get install -y \ |
||||
autoconf \ |
||||
autotools-dev \ |
||||
build-essential \ |
||||
bzip2 \ |
||||
ccache \ |
||||
curl \ |
||||
gcc \ |
||||
git \ |
||||
libc6 \ |
||||
libc6-dbg \ |
||||
libc6-dev \ |
||||
libgtest-dev \ |
||||
libtool \ |
||||
make \ |
||||
parallel \ |
||||
time \ |
||||
wget \ |
||||
&& apt-get clean |
||||
|
||||
# dotnet SDK prerequisites |
||||
RUN apt-get update && apt-get install -y libunwind8 libicu57 && apt-get clean |
||||
|
||||
# Install dotnet SDK via install script |
||||
RUN wget -q https://dot.net/v1/dotnet-install.sh && \ |
||||
chmod u+x dotnet-install.sh && \ |
||||
./dotnet-install.sh --version 2.1.504 && \ |
||||
ln -s /root/.dotnet/dotnet /usr/local/bin |
||||
|
||||
RUN wget -q www.nuget.org/NuGet.exe -O /usr/local/bin/nuget.exe |
||||
|
||||
ENV DOTNET_SKIP_FIRST_TIME_EXPERIENCE true |
Loading…
Reference in new issue