Skip to content

Commit

Permalink
source link and symbol package (#79)
Browse files Browse the repository at this point in the history
* source link and symbol package

* fix travis ci
  • Loading branch information
hanabi1224 authored and richardschneider committed Jun 12, 2019
1 parent 38c2aae commit 6812916
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 34 deletions.
7 changes: 4 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
dist: xenial
language: csharp
sudo: required
mono: none
dotnet: 2.0.0
dist: xenial
dotnet: 2.2.300
os:
- linux
- osx

script:
- dotnet restore
- dotnet build -c Release --no-restore --framework netstandard2 ./src
- dotnet test -c Release --no-restore --framework netcoreapp2.0 ./test
- dotnet test -c Release --no-restore --framework netcoreapp2.1 ./test
28 changes: 13 additions & 15 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ install:
- choco install gitversion.portable -y
- npm install gh-pages -g
- choco install docfx -y
- nuget install -OutputDirectory packages -Version 4.6.519 OpenCover
- nuget install -OutputDirectory packages -Version 0.6.0 coveralls.net
# No longer signing the assembly
#- nuget install secure-file -ExcludeVersion
#- if defined snk_secret secure-file\tools\secure-file -decrypt src\ipfs.ci.snk.enc -secret %snk_secret% -out src\ipfs.dev.snk
Expand All @@ -55,10 +53,8 @@ before_build:

build_script:
- dotnet build -c %CONFIGURATION% -p:Version=%GitVersion_MajorMinorPatch% -p:AssemblyVersion=%GitVersion_MajorMinorPatch%
- dotnet pack -c %CONFIGURATION% --no-build --no-restore -p:Version=%GitVersion_MajorMinorPatch% -p:AssemblyVersion=%GitVersion_MajorMinorPatch%

after_build:
- cmd: appveyor PushArtifact "src\bin\%CONFIGURATION%\Ipfs.Core.%GitVersion_MajorMinorPatch%.nupkg"
# Build documentation in doc\_site
- cmd: builddocs.cmd
- cmd: 7z a -tzip docs.zip doc\_site
Expand All @@ -70,17 +66,19 @@ test_script:

after_test:
# Generate coverage report
- packages\OpenCover.4.6.519\tools\OpenCover.Console.exe
-register:user -filter:"+[Ipfs*]* -[*Tests]* -[Ipfs.Core]Ipfs.Cryptography.SHA3*"
-target:"c:\Program Files\dotnet\dotnet.exe"
-targetargs:"test -c Release --no-build --no-restore --framework netcoreapp2.0 test"
-output:coverage.xml
-mergeoutput
-hideskipped:File
-oldStyle
- if defined COVERALLS_REPO_TOKEN
packages\coveralls.net.0.6.0\tools\csmacnz.coveralls.exe
--opencover -i ./coverage.xml --useRelativePaths --serviceName appveyor --jobId %APPVEYOR_BUILD_NUMBER%
- dotnet test -c %CONFIGURATION% -f netcoreapp2.1 --no-build --no-restore test /p:CollectCoverage=true
- choco install codecov -y
- codecov -f "test/coverage.opencover.xml"
- dotnet tool install --global coveralls.net --version 1.0.0
- if defined COVERALLS_REPO_TOKEN
csmacnz.coveralls.exe
--opencover -i test/coverage.opencover.xml --useRelativePaths --serviceName appveyor --jobId %APPVEYOR_BUILD_NUMBER%

artifacts:
- path: 'src/**/*.nupkg'
name: nupkg
- path: 'src/**/*.snupkg'
name: snupkg

# publish NuGet package on tag build
deploy:
Expand Down
43 changes: 32 additions & 11 deletions src/IpfsCore.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,21 @@
<TargetFrameworks>netstandard14;netstandard2;net45</TargetFrameworks>
<AssemblyName>Ipfs.Core</AssemblyName>
<RootNamespace>Ipfs</RootNamespace>
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\$(AssemblyName).xml</DocumentationFile>
<DebugType>full</DebugType>

<DebugType>portable</DebugType>

<!-- developer build is always 0.42 -->
<AssemblyVersion>0.42</AssemblyVersion>
<Version>0.42</Version>

<!-- Nuget specs -->
<PackageId>Ipfs.Core</PackageId>
<Authors>Richard Schneider</Authors>
<Title>IPFS Core Objects</Title>
<Description>Core objects and interfaces for IPFS.
<Description>
Core objects and interfaces for IPFS.

The InterPlanetary File System is the permanent web. It is a new hypermedia distribution protocol, addressed by content and identities. IPFS enables the creation of completely distributed applications. It aims to make the web faster, safer, and more open.</Description>
The InterPlanetary File System is the permanent web. It is a new hypermedia distribution protocol, addressed by content and identities. IPFS enables the creation of completely distributed applications. It aims to make the web faster, safer, and more open.
</Description>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
<PackageReleaseNotes>https://github.com/richardschneider/net-ipfs-core/releases</PackageReleaseNotes>
<Copyright>© 2015-2018 Richard Schneider</Copyright>
Expand All @@ -27,17 +28,37 @@ The InterPlanetary File System is the permanent web. It is a new hypermedia dist
<PackageProjectUrl>https://github.com/richardschneider/net-ipfs-core</PackageProjectUrl>
<PackageIconUrl>https://github.com/ipfs/logo/blob/master/platform-icons/osx-menu-bar.png</PackageIconUrl>

<GeneratePackageOnBuild Condition=" '$(Configuration)' == 'Release' ">true</GeneratePackageOnBuild>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>

<PropertyGroup>
<!-- Optional: Publish the repository URL in the built .nupkg (in the NuSpec <Repository> element) -->
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<!-- Optional: Embed source files that are not tracked by the source control manager in the PDB -->
<EmbedUntrackedSources>false</EmbedUntrackedSources>
<!-- Optional: Build symbol package (.snupkg) to distribute the PDB containing Source Link -->
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<AllowedOutputExtensionsInPackageBuildOutputFolder>.pdb;$(AllowedOutputExtensionsInPackageBuildOutputFolder)</AllowedOutputExtensionsInPackageBuildOutputFolder>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Common.Logging" Version="3.4.1" />
<PackageReference Include="Common.Logging.Core" Version="3.4.1" />
<PackageReference Include="Google.Protobuf" Version="3.7.0" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.1" />
<PackageReference Include="Google.Protobuf" Version="3.8.0" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.2" />
<PackageReference Include="Portable.BouncyCastle" Version="1.8.5" />
<PackageReference Include="SimpleBase" Version="1.3.1" />
<PackageReference Include="SimpleBase" Version="1.4.1" />
<PackageReference Include="Grpc.Tools" Version="1.21.0" PrivateAssets="All" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0-beta2-19270-01" PrivateAssets="All" />
</ItemGroup>


<ItemGroup>
<Protobuf Include="**/*.proto" />
<EmbeddedResource Include="**/*.proto" />
</ItemGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard14'">
<DefineConstants>NETSTANDARD14</DefineConstants>
</PropertyGroup>
Expand Down
19 changes: 14 additions & 5 deletions test/IpfsCoreTests.csproj
Original file line number Diff line number Diff line change
@@ -1,17 +1,26 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net45;netcoreapp1.1;netcoreapp2.0</TargetFrameworks>
<TargetFrameworks>net45;netcoreapp1.1;netcoreapp2.1</TargetFrameworks>

<IsPackable>false</IsPackable>
<DebugType>full</DebugType>
<DebugType>portable</DebugType>
<RootNamespace>Ipfs</RootNamespace>
</PropertyGroup>

<PropertyGroup>
<!-- https://github.com/tonerdo/coverlet -->
<!-- Do not collect by default -->
<CollectCoverage>false</CollectCoverage>
<CoverletOutputFormat>opencover</CoverletOutputFormat>
<!--<Exclude>[xunit.*]*</Exclude>-->
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
<PackageReference Include="MSTest.TestAdapter" Version="1.4.0" />
<PackageReference Include="MSTest.TestFramework" Version="1.4.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.1.1" PrivateAssets="all" />
<PackageReference Include="MSTest.TestAdapter" Version="1.4.0" PrivateAssets="all" />
<PackageReference Include="MSTest.TestFramework" Version="1.4.0" PrivateAssets="all" />
<PackageReference Include="coverlet.msbuild" Version="2.6.2" PrivateAssets="all" />
</ItemGroup>

<ItemGroup>
Expand Down

0 comments on commit 6812916

Please sign in to comment.