-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve performance and drop support for old frameworks (#2068)
* Remove WebSocket4Net extension library * Remove UWP support * Drop support for all old frameworks * Update CI * Update CI * Update CI * Update CI * Remove obsolete code * Set default protocol version to 5.0.0 * Remove obsolete tests * Remove old dependencies * Reset release notes * Move server to dedicated project * Fix unit tests * Update and cleanup nuget packages * Fix unit tests Refactor code * No longer throw exception when receiving non success CONNACK * Enable nuget signing * Enable nuget signing * Enable nuget signing * Enable nuget signing * Enable nuget signing * Enable nuget signing * Enable nuget signing * Enable nuget signing * Enable code signing * Enable code signing * Enable code signing * Fix client endpoint handling * Improve CI * Fix CI * Fix CI * Fix CI * Fix CI * Import changes from version 4 * Cleanup target frameworks and remove obsolete code * Drop support for dotnet7.0 * Remove managed client * Version5 auditmode (#2016) Added NuGet audit mode and some other settings to get informed about security issues. * Address warnings from analyzers * Support for ReadOnlySequence as payload (#2046) * use ReadOnlySequence as payload * fix build * fix build * skip sign in forks * remove unnecessary owner * tests and extensions * remove test * simplify WritePacketBuffer, remove unused helper * Adjust namespaces * Fix build errors * Import latest fixes from main branch * Adjust namespaces --------- Co-authored-by: SeppPenner <[email protected]> Co-authored-by: Martin Regen <[email protected]>
- Loading branch information
1 parent
e18a91a
commit 980a5d0
Showing
459 changed files
with
11,849 additions
and
16,314 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
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 |
---|---|---|
|
@@ -3,62 +3,120 @@ name: CI | |
on: [push, pull_request] | ||
|
||
env: | ||
VERSION: "4.3.6.${{github.run_number}}" | ||
VERSION: "5.0.0.${{github.run_number}}" | ||
PACKAGE_SUFFIX: "-beta" | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: windows-2022 | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Setup Windows SDK | ||
uses: GuillaumeFalourd/setup-windows10-sdk-action@v1 | ||
- name: Setup .NET SDK | ||
uses: actions/setup-dotnet@v4 | ||
with: | ||
sdk-version: 18362 | ||
dotnet-version: | | ||
8.0.x | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Build package | ||
run: dotnet build MQTTnet.sln --configuration Release /p:FileVersion=${{ env.VERSION }} /p:AssemblyVersion=${{ env.VERSION }} /p:PackageVersion=${{ env.VERSION }}${{ env.PACKAGE_SUFFIX }} | ||
|
||
- name: Upload nuget packages | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: nugets | ||
path: | | ||
${{ github.workspace }}/Source/**/*.nupkg | ||
${{ github.workspace }}/Source/**/*.snupkg | ||
test: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Setup .NET SDK | ||
uses: actions/setup-dotnet@v1.9.0 | ||
uses: actions/setup-dotnet@v4 | ||
with: | ||
dotnet-version: | | ||
3.1.x | ||
6.0.x | ||
7.0.x | ||
8.0.x | ||
- name: Setup MSBuild | ||
uses: microsoft/[email protected] | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Checkout Code | ||
uses: actions/checkout@v2 | ||
- name: Execute tests | ||
run: dotnet test --framework net8.0 Source/MQTTnet.Tests/MQTTnet.Tests.csproj | ||
|
||
- name: Setup Signing Certificate | ||
run: | | ||
$secret = '${{ secrets.SNC_BASE64 }}' | ||
$decoded = [System.Convert]::FromBase64CharArray($secret, 0, $secret.Length) | ||
Set-Content -Path ${{ github.workspace }}\certificate.snk -Value $decoded -AsByteStream | ||
sign: | ||
needs: build | ||
runs-on: windows-latest # Code signing must run on a Windows agent for Authenticode signing (dll/exe) | ||
if: github.repository == 'dotnet/MQTTnet' | ||
steps: | ||
- name: Setup .NET SDK | ||
uses: actions/setup-dotnet@v4 | ||
with: | ||
dotnet-version: | | ||
6.0.x | ||
- name: Restore nuget packages | ||
run: msbuild MQTTnet.sln /t:Restore /p:Configuration="Release" /verbosity:m | ||
- name: Download nuget packages | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: nugets | ||
path: nugets | ||
|
||
- name: Install sign CLI tool | ||
run: dotnet tool install --tool-path . sign --version 0.9.0-beta.23127.3 | ||
|
||
- name: Sign nugets | ||
shell: pwsh | ||
run: > | ||
./sign code azure-key-vault ` | ||
"**/*.nupkg" ` | ||
--base-directory "${{ github.workspace }}\nugets" ` | ||
--publisher-name "MQTTnet" ` | ||
--description "MQTTnet" ` | ||
--description-url "https://github.com/dotnet/MQTTnet" ` | ||
--azure-key-vault-tenant-id "${{ secrets.AZURE_TENANT_ID }}" ` | ||
--azure-key-vault-client-id "${{ secrets.AZURE_CLIENT_ID }}" ` | ||
--azure-key-vault-client-secret "${{ secrets.AZURE_CLIENT_SECRET }}" ` | ||
--azure-key-vault-certificate "${{ secrets.KEY_VAULT_CERTIFICATE_ID }}" ` | ||
--azure-key-vault-url "${{ secrets.KEY_VAULT_URL }}" | ||
- name: Upload signed nuget packages | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: signed-nugets | ||
path: | | ||
${{ github.workspace }}\nugets\**\*.nupkg | ||
${{ github.workspace }}\nugets\**\*.snupkg | ||
- name: Build solution | ||
run: msbuild MQTTnet.sln /t:Build /p:Configuration="Release" /verbosity:m /p:FileVersion=${{ env.VERSION }} /p:AssemblyVersion=${{ env.VERSION }} /p:PackageVersion=${{ env.VERSION }} /p:SignAssembly=true /p:AssemblyOriginatorKeyFile=${{ github.workspace }}\certificate.snk | ||
publish-myget: | ||
if: ${{ github.event_name == 'push' }} | ||
needs: sign | ||
runs-on: ubuntu-latest | ||
|
||
- name: Collect nuget Packages | ||
uses: actions/upload-artifact@v2 | ||
steps: | ||
- name: Download signed nuget packages | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: nuget Packages | ||
path: | | ||
**\*.nupkg | ||
**\*.snupkg | ||
name: signed-nugets | ||
path: nugets | ||
|
||
- name: Setup VSTest | ||
uses: darenm/Setup-VSTest@v1 | ||
- name: Publish myget.com nugets | ||
run: dotnet nuget push ${{ github.workspace }}/nugets/**/*.nupkg -k ${{ secrets.MYGET_API_KEY }} -s https://www.myget.org/F/mqttnet/api/v3/index.json --skip-duplicate | ||
|
||
- name: Core Tests | ||
run: vstest.console.exe Source\MQTTnet.Tests\bin\Release\net7.0\MQTTnet.Tests.dll | ||
publish-nuget: | ||
if: ${{ github.event_name == 'release' }} | ||
needs: sign | ||
runs-on: ubuntu-latest | ||
|
||
- name: ASP.NET Tests | ||
run: vstest.console.exe Source\MQTTnet.AspNetCore.Tests\bin\Release\netcoreapp3.1\MQTTnet.AspNetCore.Tests.dll | ||
steps: | ||
- name: Download signed nuget packages | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: signed-nugets | ||
path: nugets | ||
|
||
- name: Publish MyGet nugets | ||
if: ${{ github.event_name == 'push' }} | ||
run: dotnet nuget push **/*.nupkg -k ${{ secrets.MYGET_API_KEY }} -s https://www.myget.org/F/mqttnet/api/v3/index.json --skip-duplicate | ||
- name: Publish nuget.org nugets | ||
run: dotnet nuget push ${{ github.workspace }}/nugets/**/*.nupkg -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json --skip-duplicate |
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
Oops, something went wrong.