Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ta/sc 244785/migrating dotnet client sdk #3

Closed
wants to merge 12 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 11 additions & 13 deletions .github/actions/ci/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,27 +14,25 @@ runs:
- name: Setup dotnet build tools
uses: actions/setup-dotnet@v4
with:
dotnet-version: 6.0
dotnet-version: |
6.0
7.0

- name: Restore Dependencies
shell: bash
run: dotnet restore ${{ inputs.project_file }}

- name: Build for NetStandard2.0
- name: Restore Workloads
shell: bash
run: dotnet build -p:Configuration=debug -p:TargetFramework=netstandard2.0 ${{ inputs.project_file }}
run: dotnet workload restore ${{ inputs.project_file }}

- name: Build for Net6
- name: Restore Dependencies
shell: bash
run: dotnet build -p:Configuration=debug -p:TargetFramework=net6.0 ${{ inputs.project_file }}
run: dotnet restore ${{ inputs.project_file }}

- name: Build for Net462
- name: Build
shell: bash
run: dotnet build -p:Configuration=debug -p:TargetFramework=net462 ${{ inputs.project_file }}
run: dotnet build -p:Configuration=debug ${{ inputs.project_file }}

- name: Run Unit Tests for Net6
- name: Run Unit Tests
if: ${{ inputs.test_project_file != '' }}
shell: bash
run: |
dotnet restore ${{ inputs.test_project_file }}
dotnet test --framework=net6.0 ${{ inputs.test_project_file }}
dotnet test --framework=net6.0 ${{ inputs.test_project_file }}
1 change: 1 addition & 0 deletions .github/actions/contract-tests/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,5 @@ runs:
uses: launchdarkly/gh-actions/actions/[email protected]
with:
test_service_port: 8000
extra_params: '--status-timeout=120'
token: ${{ inputs.token }}
48 changes: 48 additions & 0 deletions .github/workflows/sdk-client-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: LaunchDarkly.ClientSdk CI
on:
push:
branches: [main, 'feat/**']
paths-ignore:
- '**.md' # Do not need to run CI for markdown changes.
pull_request:
branches: [main, 'feat/**']
paths-ignore:
- '**.md'

jobs:
build-and-test:
strategy:
matrix:
# TODO: Figure out mechanism to skip iOS framework on ubuntu and windows and re-add ubuntu and windows
os: [macos-latest]
fail-fast: false
runs-on: ${{ matrix.os }}
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v4

- uses: launchdarkly/gh-actions/actions/[email protected]
name: Get secrets
with:
aws_assume_role: ${{ vars.AWS_ROLE_ARN }}

- name: Download snk
shell: bash
run: aws s3 cp s3://launchdarkly-releaser/dotnet/LaunchDarkly.ClientSdk.snk LaunchDarkly.ClientSdk.snk

- uses: ./.github/actions/ci
with:
project_file: pkgs/sdk/client/src/LaunchDarkly.ClientSdk.csproj
test_project_file: pkgs/sdk/client/test/LaunchDarkly.ClientSdk.Tests/LaunchDarkly.ClientSdk.Tests.csproj

- uses: ./.github/actions/contract-tests
with:
service_project_file: pkgs/sdk/client/contract-tests/TestService.csproj
service_dll_file: pkgs/sdk/client/contract-tests/bin/debug/net7.0/ContractTestService.dll
token: ${{ secrets.GITHUB_TOKEN }}

- uses: ./.github/actions/build-docs
with:
workspace_path: pkgs/sdk/client
9 changes: 9 additions & 0 deletions .github/workflows/sdk-server-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,17 @@ jobs:
os: [ubuntu-latest, windows-latest, macos-latest]
fail-fast: false
runs-on: ${{ matrix.os }}
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v4

- uses: launchdarkly/gh-actions/actions/[email protected]
name: Get secrets
with:
aws_assume_role: ${{ vars.AWS_ROLE_ARN }}

- uses: ./.github/actions/ci
with:
project_file: pkgs/sdk/server/src/LaunchDarkly.ServerSdk.csproj
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/telemetry-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,17 @@ jobs:
os: [ubuntu-latest, windows-latest, macos-latest]
fail-fast: false
runs-on: ${{ matrix.os }}
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v4

- uses: launchdarkly/gh-actions/actions/[email protected]
name: Get secrets
with:
aws_assume_role: ${{ vars.AWS_ROLE_ARN }}

- uses: ./.github/actions/ci
with:
project_file: pkgs/telemetry/src/LaunchDarkly.ServerSdk.Telemetry.csproj
Expand Down
8 changes: 8 additions & 0 deletions .sdk_metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,14 @@
"introduced": "8.3"
}
}
},
"dotnet-client-sdk": {
"name": ".NET Client SDK",
"type": "client-side",
"path": "pkgs/sdk/client",
"languages": [
"C#"
]
}
}
}
602 changes: 0 additions & 602 deletions CHANGELOG.md

This file was deleted.

34 changes: 0 additions & 34 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,40 +28,6 @@ For using LaunchDarkly in *client-side* .NET applications, including mobile appl

[![Twitter Follow](https://img.shields.io/twitter/follow/launchdarkly.svg?style=social&label=Follow&maxAge=2592000)](https://twitter.com/intent/follow?screen_name=launchdarkly)

## Supported .NET versions

This version of the SDK is built for the following targets:

* .NET 6.0: runs on .NET 6.0 and above (including higher major versions).
* .NET Framework 4.6.2: runs on .NET Framework 4.6.2 and above.
* .NET Standard 2.0: runs in any project that is targeted to .NET Standard 2.x rather than to a specific runtime platform.

The .NET build tools should automatically load the most appropriate build of the SDK for whatever platform your application or library is targeted to.

The only differences in the SDK between platforms are these:

* Setting a TCP connection timeout is only supported in .NET Core and .NET 6.0+. For more details, see `HttpConfigurationBuilder.ConnectTimeout`.
* The SDK requires the `System.Text.Json` API to be available; it is built into the standard runtime library in .NET Core and .NET 6.0+, but not on other platforms, so on other platforms the SDK brings in `System.Text.Json` as a NuGet package dependency.

## Getting started

Refer to the [SDK documentation](https://docs.launchdarkly.com/sdk/server-side/dotnet#getting-started) for instructions on getting started with using the SDK.

## Signing

The published version of this assembly is digitally signed with Authenticode and [strong-named](https://docs.microsoft.com/en-us/dotnet/framework/app-domains/strong-named-assemblies). Building the code locally in the default Debug configuration does not use strong-naming and does not require a key file. The public key file is in this repository at `LaunchDarkly.pk` as well as here:

```
Public Key:
0024000004800000940000000602000000240000525341310004000001000100f121bbf427e4d7
edc64131a9efeefd20978dc58c285aa6f548a4282fc6d871fbebeacc13160e88566f427497b625
56bf7ff01017b0f7c9de36869cc681b236bc0df0c85927ac8a439ecb7a6a07ae4111034e03042c
4b1569ebc6d3ed945878cca97e1592f864ba7cc81a56b8668a6d7bbe6e44c1279db088b0fdcc35
52f746b4

Public Key Token: f86add69004e6885
```

## Learn more

Read our [documentation](https://docs.launchdarkly.com) for in-depth instructions on configuring and using LaunchDarkly. You can also head straight to the [complete reference guide for this SDK](https://docs.launchdarkly.com/sdk/server-side/dotnet).
Expand Down
49 changes: 49 additions & 0 deletions pkgs/sdk/client/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Autosave files
*~

# build
[Oo]bj/
[Bb]in/
packages/
TestResults/
test-packages/

# globs
Makefile.in
*.DS_Store
*.sln.cache
*.suo
*.cache
*.pidb
*.userprefs
*.usertasks
config.log
config.make
config.status
aclocal.m4
install-sh
autom4te.cache/
*.user
*.tar.gz
tarballs/
test-results/
Thumbs.db
.vs/

# Mac bundle stuff
*.dmg
*.app

# resharper
*_Resharper.*
*.Resharper
.idea

# dotCover
*.dotCover

# private key file
*.snk

docs/build/
launchSettings.json
Loading
Loading