Skip to content

Commit

Permalink
Merge pull request grpc#7144 from jtattermusch/coreclr_packages
Browse files Browse the repository at this point in the history
Build experimental nugets with dotnet CLI
  • Loading branch information
jtattermusch authored Jun 30, 2016
2 parents cdac58b + a9208be commit ae51a39
Show file tree
Hide file tree
Showing 21 changed files with 228 additions and 29 deletions.
5 changes: 4 additions & 1 deletion src/csharp/Grpc.Auth/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@
"define": [ "SIGNED" ],
"keyFile": "../keys/Grpc.snk",
"publicSign": true,
"xmlDoc": true
"xmlDoc": true,
"compile": {
"includeFiles": [ "../Grpc.Core/Version.cs" ]
}
},
"dependencies": {
"Grpc.Core": "0.16.0-dev",
Expand Down
6 changes: 6 additions & 0 deletions src/csharp/Grpc.Core.Tests/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
"keyFile": "../keys/Grpc.snk",
"publicSign": true,
"xmlDoc": true,
"compile": {
"includeFiles": [ "../Grpc.Core/Version.cs" ]
},
"copyToOutput": {
"mappings": {
"nativelibs/windows_x64/grpc_csharp_ext.dll": "../../../vsprojects/x64/Debug/grpc_csharp_ext.dll",
Expand All @@ -25,6 +28,9 @@
"keyFile": "../keys/Grpc.snk",
"publicSign": true,
"xmlDoc": true,
"compile": {
"includeFiles": [ "../Grpc.Core/Version.cs" ]
},
"copyToOutput": {
"mappings": {
"nativelibs/windows_x64/grpc_csharp_ext.dll": "../../../vsprojects/x64/Release/grpc_csharp_ext.dll",
Expand Down
17 changes: 9 additions & 8 deletions src/csharp/Grpc.Core/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,17 @@
"requireLicenseAcceptance": false,
"tags": [ "gRPC RPC Protocol HTTP/2" ],
"files": {
"build/net45/": "Grpc.Core.targets",
"build/native/bin/windows_x86/": "../nativelibs/windows_x86/grpc_csharp_ext.dll",
"build/native/bin/windows_x64/": "../nativelibs/windows_x64/grpc_csharp_ext.dll",
"build/native/bin/linux_x86/": "../nativelibs/linux_x86/libgrpc_csharp_ext.so",
"build/native/bin/linux_x64/": "../nativelibs/linux_x64/libgrpc_csharp_ext.so",
"build/native/bin/macosx_x86/": "../nativelibs/macosx_x86/libgrpc_csharp_ext.dylib",
"build/native/bin/macosx_x64/": "../nativelibs/macosx_x64/libgrpc_csharp_ext.dylib"
"mappings": {
"build/net45/": "Grpc.Core.targets",
"build/native/bin/windows_x86/": "../nativelibs/windows_x86/grpc_csharp_ext.dll",
"build/native/bin/windows_x64/": "../nativelibs/windows_x64/grpc_csharp_ext.dll",
"build/native/bin/linux_x86/": "../nativelibs/linux_x86/libgrpc_csharp_ext.so",
"build/native/bin/linux_x64/": "../nativelibs/linux_x64/libgrpc_csharp_ext.so",
"build/native/bin/macosx_x86/": "../nativelibs/macosx_x86/libgrpc_csharp_ext.dylib",
"build/native/bin/macosx_x64/": "../nativelibs/macosx_x64/libgrpc_csharp_ext.dylib"
}
}
},
"shared": "Version.cs",
"buildOptions": {
"embed": [ "../../../etc/roots.pem" ],
"define": [ "SIGNED" ],
Expand Down
6 changes: 6 additions & 0 deletions src/csharp/Grpc.Examples.MathClient/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
"keyFile": "../keys/Grpc.snk",
"publicSign": true,
"xmlDoc": true,
"compile": {
"includeFiles": [ "../Grpc.Core/Version.cs" ]
},
"copyToOutput": {
"mappings": {
"nativelibs/windows_x64/grpc_csharp_ext.dll": "../../../vsprojects/x64/Debug/grpc_csharp_ext.dll",
Expand All @@ -25,6 +28,9 @@
"keyFile": "../keys/Grpc.snk",
"publicSign": true,
"xmlDoc": true,
"compile": {
"includeFiles": [ "../Grpc.Core/Version.cs" ]
},
"copyToOutput": {
"mappings": {
"nativelibs/windows_x64/grpc_csharp_ext.dll": "../../../vsprojects/x64/Release/grpc_csharp_ext.dll",
Expand Down
6 changes: 6 additions & 0 deletions src/csharp/Grpc.Examples.MathServer/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
"keyFile": "../keys/Grpc.snk",
"publicSign": true,
"xmlDoc": true,
"compile": {
"includeFiles": [ "../Grpc.Core/Version.cs" ]
},
"copyToOutput": {
"mappings": {
"nativelibs/windows_x64/grpc_csharp_ext.dll": "../../../vsprojects/x64/Debug/grpc_csharp_ext.dll",
Expand All @@ -25,6 +28,9 @@
"keyFile": "../keys/Grpc.snk",
"publicSign": true,
"xmlDoc": true,
"compile": {
"includeFiles": [ "../Grpc.Core/Version.cs" ]
},
"copyToOutput": {
"mappings": {
"nativelibs/windows_x64/grpc_csharp_ext.dll": "../../../vsprojects/x64/Release/grpc_csharp_ext.dll",
Expand Down
6 changes: 6 additions & 0 deletions src/csharp/Grpc.Examples.Tests/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
"keyFile": "../keys/Grpc.snk",
"publicSign": true,
"xmlDoc": true,
"compile": {
"includeFiles": [ "../Grpc.Core/Version.cs" ]
},
"copyToOutput": {
"mappings": {
"nativelibs/windows_x64/grpc_csharp_ext.dll": "../../../vsprojects/x64/Debug/grpc_csharp_ext.dll",
Expand All @@ -25,6 +28,9 @@
"keyFile": "../keys/Grpc.snk",
"publicSign": true,
"xmlDoc": true,
"compile": {
"includeFiles": [ "../Grpc.Core/Version.cs" ]
},
"copyToOutput": {
"mappings": {
"nativelibs/windows_x64/grpc_csharp_ext.dll": "../../../vsprojects/x64/Release/grpc_csharp_ext.dll",
Expand Down
6 changes: 6 additions & 0 deletions src/csharp/Grpc.HealthCheck.Tests/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
"keyFile": "../keys/Grpc.snk",
"publicSign": true,
"xmlDoc": true,
"compile": {
"includeFiles": [ "../Grpc.Core/Version.cs" ]
},
"copyToOutput": {
"mappings": {
"nativelibs/windows_x64/grpc_csharp_ext.dll": "../../../vsprojects/x64/Debug/grpc_csharp_ext.dll",
Expand All @@ -25,6 +28,9 @@
"keyFile": "../keys/Grpc.snk",
"publicSign": true,
"xmlDoc": true,
"compile": {
"includeFiles": [ "../Grpc.Core/Version.cs" ]
},
"copyToOutput": {
"mappings": {
"nativelibs/windows_x64/grpc_csharp_ext.dll": "../../../vsprojects/x64/Release/grpc_csharp_ext.dll",
Expand Down
5 changes: 4 additions & 1 deletion src/csharp/Grpc.HealthCheck/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@
"define": [ "SIGNED" ],
"keyFile": "../keys/Grpc.snk",
"publicSign": true,
"xmlDoc": true
"xmlDoc": true,
"compile": {
"includeFiles": [ "../Grpc.Core/Version.cs" ]
}
},
"dependencies": {
"Grpc.Core": "0.16.0-dev",
Expand Down
6 changes: 6 additions & 0 deletions src/csharp/Grpc.IntegrationTesting.Client/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
"keyFile": "../keys/Grpc.snk",
"publicSign": true,
"xmlDoc": true,
"compile": {
"includeFiles": [ "../Grpc.Core/Version.cs" ]
},
"copyToOutput": {
"include": "data/*",
"mappings": {
Expand All @@ -26,6 +29,9 @@
"keyFile": "../keys/Grpc.snk",
"publicSign": true,
"xmlDoc": true,
"compile": {
"includeFiles": [ "../Grpc.Core/Version.cs" ]
},
"copyToOutput": {
"include": "data/*",
"mappings": {
Expand Down
6 changes: 6 additions & 0 deletions src/csharp/Grpc.IntegrationTesting.QpsWorker/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
"keyFile": "../keys/Grpc.snk",
"publicSign": true,
"xmlDoc": true,
"compile": {
"includeFiles": [ "../Grpc.Core/Version.cs" ]
},
"copyToOutput": {
"include": "data/*",
"mappings": {
Expand All @@ -26,6 +29,9 @@
"keyFile": "../keys/Grpc.snk",
"publicSign": true,
"xmlDoc": true,
"compile": {
"includeFiles": [ "../Grpc.Core/Version.cs" ]
},
"copyToOutput": {
"include": "data/*",
"mappings": {
Expand Down
6 changes: 6 additions & 0 deletions src/csharp/Grpc.IntegrationTesting.Server/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
"keyFile": "../keys/Grpc.snk",
"publicSign": true,
"xmlDoc": true,
"compile": {
"includeFiles": [ "../Grpc.Core/Version.cs" ]
},
"copyToOutput": {
"include": "data/*",
"mappings": {
Expand All @@ -26,6 +29,9 @@
"keyFile": "../keys/Grpc.snk",
"publicSign": true,
"xmlDoc": true,
"compile": {
"includeFiles": [ "../Grpc.Core/Version.cs" ]
},
"copyToOutput": {
"include": "data/*",
"mappings": {
Expand Down
6 changes: 6 additions & 0 deletions src/csharp/Grpc.IntegrationTesting.StressClient/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
"keyFile": "../keys/Grpc.snk",
"publicSign": true,
"xmlDoc": true,
"compile": {
"includeFiles": [ "../Grpc.Core/Version.cs" ]
},
"copyToOutput": {
"include": "data/*",
"mappings": {
Expand All @@ -26,6 +29,9 @@
"keyFile": "../keys/Grpc.snk",
"publicSign": true,
"xmlDoc": true,
"compile": {
"includeFiles": [ "../Grpc.Core/Version.cs" ]
},
"copyToOutput": {
"include": "data/*",
"mappings": {
Expand Down
6 changes: 6 additions & 0 deletions src/csharp/Grpc.IntegrationTesting/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
"keyFile": "../keys/Grpc.snk",
"publicSign": true,
"xmlDoc": true,
"compile": {
"includeFiles": [ "../Grpc.Core/Version.cs" ]
},
"copyToOutput": {
"include": "data/*",
"mappings": {
Expand All @@ -26,6 +29,9 @@
"keyFile": "../keys/Grpc.snk",
"publicSign": true,
"xmlDoc": true,
"compile": {
"includeFiles": [ "../Grpc.Core/Version.cs" ]
},
"copyToOutput": {
"include": "data/*",
"mappings": {
Expand Down
5 changes: 4 additions & 1 deletion templates/src/csharp/Grpc.Auth/project.json.template
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@
"define": [ "SIGNED" ],
"keyFile": "../keys/Grpc.snk",
"publicSign": true,
"xmlDoc": true
"xmlDoc": true,
"compile": {
"includeFiles": [ "../Grpc.Core/Version.cs" ]
}
},
"dependencies": {
"Grpc.Core": "${settings.csharp_version}",
Expand Down
17 changes: 9 additions & 8 deletions templates/src/csharp/Grpc.Core/project.json.template
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,17 @@
"requireLicenseAcceptance": false,
"tags": [ "gRPC RPC Protocol HTTP/2" ],
"files": {
"build/net45/": "Grpc.Core.targets",
"build/native/bin/windows_x86/": "../nativelibs/windows_x86/grpc_csharp_ext.dll",
"build/native/bin/windows_x64/": "../nativelibs/windows_x64/grpc_csharp_ext.dll",
"build/native/bin/linux_x86/": "../nativelibs/linux_x86/libgrpc_csharp_ext.so",
"build/native/bin/linux_x64/": "../nativelibs/linux_x64/libgrpc_csharp_ext.so",
"build/native/bin/macosx_x86/": "../nativelibs/macosx_x86/libgrpc_csharp_ext.dylib",
"build/native/bin/macosx_x64/": "../nativelibs/macosx_x64/libgrpc_csharp_ext.dylib"
"mappings": {
"build/net45/": "Grpc.Core.targets",
"build/native/bin/windows_x86/": "../nativelibs/windows_x86/grpc_csharp_ext.dll",
"build/native/bin/windows_x64/": "../nativelibs/windows_x64/grpc_csharp_ext.dll",
"build/native/bin/linux_x86/": "../nativelibs/linux_x86/libgrpc_csharp_ext.so",
"build/native/bin/linux_x64/": "../nativelibs/linux_x64/libgrpc_csharp_ext.so",
"build/native/bin/macosx_x86/": "../nativelibs/macosx_x86/libgrpc_csharp_ext.dylib",
"build/native/bin/macosx_x64/": "../nativelibs/macosx_x64/libgrpc_csharp_ext.dylib"
}
}
},
"shared": "Version.cs",
"buildOptions": {
"embed": [ "../../../etc/roots.pem" ],
"define": [ "SIGNED" ],
Expand Down
5 changes: 4 additions & 1 deletion templates/src/csharp/Grpc.HealthCheck/project.json.template
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@
"define": [ "SIGNED" ],
"keyFile": "../keys/Grpc.snk",
"publicSign": true,
"xmlDoc": true
"xmlDoc": true,
"compile": {
"includeFiles": [ "../Grpc.Core/Version.cs" ]
}
},
"dependencies": {
"Grpc.Core": "${settings.csharp_version}",
Expand Down
6 changes: 6 additions & 0 deletions templates/src/csharp/build_options.include
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
"keyFile": "../keys/Grpc.snk",
"publicSign": true,
"xmlDoc": true,
"compile": {
"includeFiles": [ "../Grpc.Core/Version.cs" ]
},
"copyToOutput": {
% if includeData:
"include": "data/*",
Expand All @@ -31,6 +34,9 @@
"keyFile": "../keys/Grpc.snk",
"publicSign": true,
"xmlDoc": true,
"compile": {
"includeFiles": [ "../Grpc.Core/Version.cs" ]
},
"copyToOutput": {
% if includeData:
"include": "data/*",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,25 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

FROM microsoft/dotnet:1.0.0-preview2-sdk
FROM debian:jessie

<%include file="../../apt_get_basic.include"/>
<%include file="../../csharp_deps.include"/>

# Install dotnet SDK based on https://www.microsoft.com/net/core#debian
RUN apt-get update && apt-get install -y curl libunwind8 gettext
RUN curl -sSL -o dotnet.tar.gz https://go.microsoft.com/fwlink/?LinkID=809130
RUN mkdir -p /opt/dotnet && tar zxf dotnet.tar.gz -C /opt/dotnet
RUN ln -s /opt/dotnet/dotnet /usr/local/bin

# Trigger the population of the local package cache
ENV NUGET_XMLDOC_MODE skip
RUN mkdir warmup ${'\\'}
&& cd warmup ${'\\'}
&& dotnet new ${'\\'}
&& cd .. ${'\\'}
&& rm -rf warmup

<%include file="../../run_tests_addons.include"/>
# Define the default command.
CMD ["bash"]
Expand Down
34 changes: 33 additions & 1 deletion tools/dockerfile/test/csharp_coreclr_x64/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

FROM microsoft/dotnet:1.0.0-preview2-sdk
FROM debian:jessie

# Install Git and basic packages.
RUN apt-get update && apt-get install -y \
Expand Down Expand Up @@ -63,6 +63,38 @@ RUN apt-get update && apt-get install -y \
# Build profiling
RUN apt-get update && apt-get install -y time && apt-get clean

#================
# C# dependencies

# Update to a newer version of mono
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
RUN echo "deb http://download.mono-project.com/repo/debian wheezy main" | tee /etc/apt/sources.list.d/mono-xamarin.list
RUN echo "deb http://download.mono-project.com/repo/debian wheezy-apache24-compat main" | tee -a /etc/apt/sources.list.d/mono-xamarin.list
RUN echo "deb http://download.mono-project.com/repo/debian wheezy-libjpeg62-compat main" | tee -a /etc/apt/sources.list.d/mono-xamarin.list
RUN echo "deb http://download.mono-project.com/repo/debian wheezy-libtiff-compat main" | tee -a /etc/apt/sources.list.d/mono-xamarin.list

# Install dependencies
RUN apt-get update && apt-get -y dist-upgrade && apt-get install -y \
mono-devel \
ca-certificates-mono \
nuget \
&& apt-get clean


# Install dotnet SDK based on https://www.microsoft.com/net/core#debian
RUN apt-get update && apt-get install -y curl libunwind8 gettext
RUN curl -sSL -o dotnet.tar.gz https://go.microsoft.com/fwlink/?LinkID=809130
RUN mkdir -p /opt/dotnet && tar zxf dotnet.tar.gz -C /opt/dotnet
RUN ln -s /opt/dotnet/dotnet /usr/local/bin

# Trigger the population of the local package cache
ENV NUGET_XMLDOC_MODE skip
RUN mkdir warmup \
&& cd warmup \
&& dotnet new \
&& cd .. \
&& rm -rf warmup

# Prepare ccache
RUN ln -s /usr/bin/ccache /usr/local/bin/gcc
RUN ln -s /usr/bin/ccache /usr/local/bin/g++
Expand Down
Loading

0 comments on commit ae51a39

Please sign in to comment.