This repository has been archived by the owner on Oct 30, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7697fbf
commit 4ab5903
Showing
66 changed files
with
4,299 additions
and
2,450 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,83 @@ | ||
version: 2 | ||
version: 2.1 | ||
|
||
workflows: | ||
version: 2 | ||
test: | ||
jobs: | ||
- test-1.1 | ||
- test-2.0 | ||
- test-netcore-1-1 | ||
- test-netcore-2-0 | ||
- test-windows-netframework-4-5 | ||
|
||
orbs: | ||
win: circleci/[email protected] | ||
|
||
jobs: | ||
test-1.1: | ||
test-netcore-1-1: | ||
docker: | ||
- image: microsoft/dotnet:1.1-sdk | ||
steps: | ||
- checkout | ||
- run: dotnet restore | ||
- run: dotnet build src/LaunchDarkly.ServerSdk -f netstandard1.4 | ||
- run: dotnet build src/LaunchDarkly.ServerSdk -f netstandard1.6 | ||
- run: dotnet test test/LaunchDarkly.ServerSdk.Tests/LaunchDarkly.ServerSdk.Tests.csproj -f netcoreapp1.1 | ||
test-2.0: | ||
- restore_cache: | ||
keys: | ||
- netcore11-deps-{{ checksum "src/LaunchDarkly.ServerSdk/LaunchDarkly.ServerSdk.csproj" }}-{{ checksum "test/LaunchDarkly.ServerSdk.Tests/LaunchDarkly.ServerSdk.Tests.csproj" }} | ||
- run: | ||
name: install project dependencies | ||
command: dotnet restore | ||
- save_cache: | ||
key: netcore11-deps-{{ checksum "src/LaunchDarkly.ServerSdk/LaunchDarkly.ServerSdk.csproj" }}-{{ checksum "test/LaunchDarkly.ServerSdk.Tests/LaunchDarkly.ServerSdk.Tests.csproj" }} | ||
paths: | ||
- /root/.nuget/packages | ||
- run: | ||
name: build SDK for .NET Standard 1.4 | ||
command: dotnet build src/LaunchDarkly.ServerSdk -f netstandard1.4 | ||
- run: | ||
name: build SRC for .NET Standard 1.6 | ||
command: dotnet build src/LaunchDarkly.ServerSdk -f netstandard1.6 | ||
- run: | ||
name: run tests in .NET Core 1.1 | ||
command: dotnet test test/LaunchDarkly.ServerSdk.Tests/LaunchDarkly.ServerSdk.Tests.csproj -f netcoreapp1.1 | ||
|
||
test-netcore-2-0: | ||
docker: | ||
- image: microsoft/dotnet:2.0-sdk-jessie | ||
steps: | ||
- checkout | ||
- run: dotnet restore | ||
- run: dotnet build src/LaunchDarkly.ServerSdk -f netstandard2.0 | ||
- run: dotnet test test/LaunchDarkly.ServerSdk.Tests/LaunchDarkly.ServerSdk.Tests.csproj -f netcoreapp2.0 | ||
- restore_cache: | ||
keys: | ||
- netcore20-deps-{{ checksum "src/LaunchDarkly.ServerSdk/LaunchDarkly.ServerSdk.csproj" }}-{{ checksum "test/LaunchDarkly.ServerSdk.Tests/LaunchDarkly.ServerSdk.Tests.csproj" }} | ||
- run: | ||
name: install project dependencies | ||
command: dotnet restore | ||
- save_cache: | ||
key: netcore20-deps-{{ checksum "src/LaunchDarkly.ServerSdk/LaunchDarkly.ServerSdk.csproj" }}-{{ checksum "test/LaunchDarkly.ServerSdk.Tests/LaunchDarkly.ServerSdk.Tests.csproj" }} | ||
paths: | ||
- /root/.nuget/packages | ||
- run: | ||
name: build SDK for .NET Standard 2.0 | ||
command: dotnet build src/LaunchDarkly.ServerSdk -f netstandard2.0 | ||
- run: | ||
name: run tests in .NET Core 2.0 | ||
command: dotnet test test/LaunchDarkly.ServerSdk.Tests/LaunchDarkly.ServerSdk.Tests.csproj -f netcoreapp2.0 | ||
|
||
test-windows-netframework-4-5: | ||
executor: | ||
name: win/vs2019 | ||
shell: powershell.exe | ||
steps: | ||
- checkout | ||
- restore_cache: | ||
keys: | ||
- net45-deps-{{ checksum "src/LaunchDarkly.ServerSdk/LaunchDarkly.ServerSdk.csproj" }}-{{ checksum "test/LaunchDarkly.ServerSdk.Tests/LaunchDarkly.ServerSdk.Tests.csproj" }} | ||
- run: | ||
name: install project dependencies | ||
command: dotnet restore | ||
- save_cache: | ||
key: net45-deps-{{ checksum "src/LaunchDarkly.ServerSdk/LaunchDarkly.ServerSdk.csproj" }}-{{ checksum "test/LaunchDarkly.ServerSdk.Tests/LaunchDarkly.ServerSdk.Tests.csproj" }} | ||
paths: | ||
- C:\Users\circleci\.nuget\packages | ||
- run: | ||
name: build SDK for .NET Framework 4.5 | ||
command: dotnet build src/LaunchDarkly.ServerSdk -f net45 | ||
- run: | ||
name: run tests in .NET Framework 4.6 | ||
command: dotnet test test/LaunchDarkly.ServerSdk.Tests/LaunchDarkly.ServerSdk.Tests.csproj -f net46 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
|
||
/* LaunchDarkly additions to default Sandcastle styles */ | ||
|
||
/* hide search box because it is PHP-based and can't work in Github Pages */ | ||
form#SearchForm { | ||
display: none; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<PropertyGroup> | ||
<!-- The configuration and platform will be used to determine which assemblies to include from solution and | ||
project documentation sources --> | ||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
<SchemaVersion>2.0</SchemaVersion> | ||
<ProjectGuid>{0555bc4c-d824-4f83-a272-6bcac93347a1}</ProjectGuid> | ||
<SHFBSchemaVersion>2017.9.26.0</SHFBSchemaVersion> | ||
<!-- AssemblyName, Name, and RootNamespace are not used by SHFB but Visual Studio adds them anyway --> | ||
<AssemblyName>Documentation</AssemblyName> | ||
<RootNamespace>Documentation</RootNamespace> | ||
<Name>Documentation</Name> | ||
<!-- SHFB properties --> | ||
<FrameworkVersion>.NET Framework 4.5</FrameworkVersion> | ||
<OutputPath>.\build\html</OutputPath> | ||
<HtmlHelpName>Documentation</HtmlHelpName> | ||
<Language>en-US</Language> | ||
<DocumentationSources> | ||
<!-- note that the LaunchDarkly.CommonSdk files must be copied to this location by build-docs.ps1 --> | ||
<DocumentationSource sourceFile="..\src\LaunchDarkly.ServerSdk\bin\Debug\net45\LaunchDarkly.ServerSdk.xml" /> | ||
<DocumentationSource sourceFile="..\src\LaunchDarkly.ServerSdk\bin\Debug\net45\LaunchDarkly.ServerSdk.dll" /> | ||
<DocumentationSource sourceFile="..\src\LaunchDarkly.ServerSdk\bin\Debug\net45\LaunchDarkly.CommonSdk.xml" /> | ||
<DocumentationSource sourceFile="..\src\LaunchDarkly.ServerSdk\bin\Debug\net45\LaunchDarkly.CommonSdk.dll" /> | ||
</DocumentationSources> | ||
<HelpTitle>LaunchDarkly Server-Side SDK for .NET $(LD_RELEASE_VERSION)</HelpTitle> | ||
<HelpFileVersion>1.0.0.0</HelpFileVersion> | ||
<RootNamespaceContainer>True</RootNamespaceContainer> | ||
<NamespaceGrouping>False</NamespaceGrouping> | ||
<NamingMethod>MemberName</NamingMethod> | ||
<MaximumGroupParts>2</MaximumGroupParts> | ||
<Preliminary>False</Preliminary> | ||
<SdkLinkTarget>Blank</SdkLinkTarget> | ||
<HelpFileFormat>Website</HelpFileFormat> | ||
<SyntaxFilters>C#, Visual Basic</SyntaxFilters> | ||
<PresentationStyle>VS2013</PresentationStyle> | ||
<CleanIntermediates>True</CleanIntermediates> | ||
<KeepLogFile>True</KeepLogFile> | ||
<DisableCodeBlockComponent>False</DisableCodeBlockComponent> | ||
<IndentHtml>False</IndentHtml> | ||
<BuildAssemblerVerbosity>OnlyWarningsAndErrors</BuildAssemblerVerbosity> | ||
<SaveComponentCacheCapacity>100</SaveComponentCacheCapacity> | ||
<NamespaceSummaries> | ||
<NamespaceSummaryItem name="LaunchDarkly.Client" isDocumented="True" xmlns="" /> | ||
<NamespaceSummaryItem name="LaunchDarkly.Client.Files" isDocumented="True" xmlns="" /> | ||
<NamespaceSummaryItem name="LaunchDarkly.Client.Utils" isDocumented="True" xmlns="" /> | ||
<NamespaceSummaryItem name="LaunchDarkly.Common" isDocumented="True" xmlns="" /> | ||
</NamespaceSummaries> | ||
</PropertyGroup> | ||
<!-- There are no properties for these groups. AnyCPU needs to appear in order for Visual Studio to perform | ||
the build. The others are optional common platform types that may appear. --> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' "> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' "> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' "> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|Win32' "> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|Win32' "> | ||
</PropertyGroup> | ||
<!-- Import the SHFB build targets --> | ||
<Import Project="$(SHFBROOT)\SandcastleHelpFileBuilder.targets" /> | ||
<!-- The pre-build and post-build event properties must appear *after* the targets file import in order to be | ||
evaluated correctly. --> | ||
<PropertyGroup> | ||
<PreBuildEvent> | ||
</PreBuildEvent> | ||
<PostBuildEvent> | ||
</PostBuildEvent> | ||
<RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Reference Include="Common.Logging"> | ||
<HintPath>..\src\LaunchDarkly.ServerSdk\bin\Debug\net45\Common.Logging.dll</HintPath> | ||
</Reference> | ||
<Reference Include="Common.Logging.Core"> | ||
<HintPath>..\src\LaunchDarkly.ServerSdk\bin\Debug\net45\Common.Logging.Core.dll</HintPath> | ||
</Reference> | ||
<Reference Include="LaunchDarkly.Cache"> | ||
<HintPath>..\src\LaunchDarkly.ServerSdk\bin\Debug\net45\LaunchDarkly.Cache.dll</HintPath> | ||
</Reference> | ||
<Reference Include="LaunchDarkly.EventSource"> | ||
<HintPath>..\src\LaunchDarkly.ServerSdk\bin\Debug\net45\LaunchDarkly.EventSource.dll</HintPath> | ||
</Reference> | ||
<Reference Include="Newtonsoft.Json"> | ||
<HintPath>..\src\LaunchDarkly.ServerSdk\bin\Debug\net45\Newtonsoft.Json.dll</HintPath> | ||
</Reference> | ||
</ItemGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
|
||
# | ||
# This script builds HTML documentation for the SDK using Sandcastle Help File Builder. It assumes that | ||
# the Sandcastle software is already installed on the host. The Sandcastle GUI is not required, only the | ||
# core tools and the SandcastleBuilderUtils package that provides the MSBuild targets. | ||
# | ||
# The script takes no parameters; it infers the project version by looking at the .csproj file. It starts | ||
# by building the project in Debug configuration. | ||
# | ||
# Since some public APIs are provided by the LaunchDarkly.CommonSdk package, the Sandcastle project is | ||
# configured to merge that package's documentation into this one, which requires some special file | ||
# copying as seen below. | ||
# | ||
|
||
# Terminate the script if any PowerShell command fails | ||
$ErrorActionPreference = "Stop" | ||
|
||
# Terminate the script if any external command fails | ||
function ExecuteOrFail { | ||
[CmdletBinding()] | ||
param( | ||
[Parameter(Position=0,Mandatory=1)][scriptblock]$cmd, | ||
[Parameter(Position=1,Mandatory=0)][string]$errorMessage = ("Error executing command {0}" -f $cmd) | ||
) | ||
& $cmd | ||
if ($lastexitcode -ne 0) { | ||
throw ($errorMessage) | ||
} | ||
} | ||
|
||
ExecuteOrFail { dotnet clean } | ||
ExecuteOrFail { dotnet build src\LaunchDarkly.ServerSdk\LaunchDarkly.ServerSdk.csproj -f net45 } | ||
|
||
# Building the SDK causes the assemblies for all its package dependencies to be copied into bin\Debug\net45. | ||
# The .shfbproj is configured to expect them to be there. However, we also need the XML documentation file | ||
# for LaunchDarkly.CommonSdk, which isn't automatically copied. We can get it out of the NuGet package | ||
# cache, but first we need to determine what version of it we're using. | ||
$match = Select-String ` | ||
-Path src\LaunchDarkly.ServerSdk\LaunchDarkly.ServerSdk.csproj ` | ||
-Pattern "<PackageReference.*""LaunchDarkly.CommonSdk"".*""([^""]*)""" | ||
if ($match.Matches.Length -ne 1) { | ||
throw "Could not find LaunchDarkly.CommonSdk version in project file" | ||
} | ||
$commonSdkVersion = $match.Matches[0].Groups[1].Value | ||
Copy-Item ` | ||
-Path $HOME\.nuget\packages\launchdarkly.commonsdk\$commonSdkVersion\lib\net45\LaunchDarkly.CommonSdk.xml ` | ||
-Destination src\LaunchDarkly.ServerSdk\bin\Debug\net45 | ||
|
||
if (Test-Path docs\build) { | ||
Remove-Item -Path docs\build -Recurse -Force | ||
} | ||
|
||
$match = Select-String ` | ||
-Path src\LaunchDarkly.ServerSdk\LaunchDarkly.ServerSdk.csproj ` | ||
-Pattern "<Version>([^<]*)</Version>" | ||
if ($match.Matches.Length -ne 1) { | ||
throw "Could not find SDK version string in project file" | ||
} | ||
$sdkVersion = $match.Matches[0].Groups[1].Value | ||
|
||
[System.Environment]::SetEnvironmentVariable("LD_RELEASE_VERSION", $sdkVersion, "Process") | ||
|
||
try | ||
{ | ||
Push-Location | ||
Set-Location docs | ||
ExecuteOrFail { msbuild project.shfbproj } | ||
} | ||
finally | ||
{ | ||
Pop-Location | ||
} | ||
|
||
# Add our own stylesheet overrides. You're supposed to be able to put customized stylesheets in | ||
# ./styles (relative to the project file) and have them be automatically copied in, but that | ||
# doesn't seem to work, so we'll just modify the CSS file after building. | ||
Get-Content docs\launchdarkly.css | Add-Content docs\build\html\styles\branding-Website.css |
Oops, something went wrong.