Skip to content

Commit

Permalink
ARROW-4839: [C#] Add NuGet package metadata and instructions.
Browse files Browse the repository at this point in the history
  • Loading branch information
eerhardt committed Mar 13, 2019
1 parent 0fb9e58 commit 5c31e1d
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 10 deletions.
2 changes: 2 additions & 0 deletions ci/appveyor-csharp-build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,6 @@ pushd csharp

dotnet test || exit /B

dotnet pack -c Release || exit /B

popd
28 changes: 25 additions & 3 deletions csharp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,17 +135,39 @@ This implementation is under development and may not be suitable for use in prod

# Build

Install the latest `.NET Core SDK` from https://dotnet.microsoft.com/download.

dotnet build

# Docker Build
## NuGet Build

To build the NuGet package run the following command to build a debug flavor, preview package into the **artifacts** folder.

dotnet pack

When building the officially released version run: (see Note below about current `git` repository)

dotnet pack -c Release -p:VersionSuffix=''

Which will build the final/stable package.

NOTE: When building the officially released version, ensure that your `git` repository has the `origin` remote set to `https://github.com/apache/arrow.git`, which will ensure Source Link is set correctly. See https://github.com/dotnet/sourcelink/blob/master/docs/README.md for more information.

There are two output artifacts:
1. `Apache.Arrow.<version>.nupkg` - this contains the exectuable assemblies
2. `Apache.Arrow.<version>.snupkg` - this contains the debug symbols files

Both of these artifacts can then be uploaded to https://www.nuget.org/packages/manage/upload.

## Docker Build

Build from the Apache Arrow project root.

docker build -f csharp/build/docker/Dockerfile .

# Testing
## Testing

dotnet test test/Apache.Arrow.Tests
dotnet test

All build artifacts are placed in the **artifacts** folder in the project root.

Expand Down
35 changes: 28 additions & 7 deletions csharp/src/Apache.Arrow/Apache.Arrow.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,44 @@

<Import Project="../../build/Common.props" />

<!-- Compile properties -->
<PropertyGroup>
<TargetFrameworks>netstandard1.3;netcoreapp2.1</TargetFrameworks>
<LangVersion>7.2</LangVersion>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Authors>Apache</Authors>
<DefineConstants>$(DefineConstants);UNSAFE_BYTEBUFFER;BYTEBUFFER_NO_BOUNDS_CHECK;ENABLE_SPAN_T</DefineConstants>
</PropertyGroup>

<!-- AssemblyInfo properties -->
<PropertyGroup>
<Product>Apache Arrow library</Product>
<Copyright>2018 Apache Software Foundation</Copyright>
<PackageProjectUrl>https://fzcorp.visualstudio.com/digital-products</PackageProjectUrl>
<RepositoryUrl>https://fzcorp.visualstudio.com/digital-products/_git/fz-arrow</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageTags>apache arrow</PackageTags>
<Company>Apache</Company>
<Version>0.0.1</Version>
<DefineConstants>$(DefineConstants);UNSAFE_BYTEBUFFER;BYTEBUFFER_NO_BOUNDS_CHECK;ENABLE_SPAN_T</DefineConstants>
<VersionPrefix>0.13.0</VersionPrefix>
<VersionSuffix>preview</VersionSuffix>
</PropertyGroup>

<!-- NuGet properties -->
<PropertyGroup>
<Authors>Apache</Authors>
<Description>Apache Arrow is a cross-language development platform for in-memory data. It specifies a standardized language-independent columnar memory format for flat and hierarchical data, organized for efficient analytic operations on modern hardware. It also provides computational libraries and zero-copy streaming messaging and interprocess communication.</Description>
<PackageIconUrl>https://www.apache.org/images/feather.png</PackageIconUrl>
<PackageLicenseFile>LICENSE.txt</PackageLicenseFile>
<PackageProjectUrl>https://arrow.apache.org/</PackageProjectUrl>
<PackageTags>apache arrow</PackageTags>
<RepositoryType>git</RepositoryType>
<RepositoryUrl>https://github.com/apache/arrow</RepositoryUrl>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="System.Buffers" Version="4.5.0" />
<PackageReference Include="System.Memory" Version="4.5.1" />
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="4.5.1" />
<PackageReference Include="System.Text.Encoding" Version="4.3.0" />

<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0-beta2-18618-05" PrivateAssets="All" />
</ItemGroup>

<ItemGroup>
Expand All @@ -40,6 +57,10 @@
</EmbeddedResource>
</ItemGroup>

<ItemGroup>
<Content Include="..\..\..\LICENSE.txt" Pack="true" PackagePath="" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp2.1'">
<Compile Remove="Extensions\StreamExtensions.netstandard.cs" />
</ItemGroup>
Expand Down
5 changes: 5 additions & 0 deletions csharp/test/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<Project>
<PropertyGroup>
<IsPackable>false</IsPackable>
</PropertyGroup>
</Project>

0 comments on commit 5c31e1d

Please sign in to comment.