Skip to content
Merged
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
12 changes: 10 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ jobs:
steps:
- uses: actions/checkout@v6

- name: Powershell info
shell: pwsh
run: $PSVersionTable

- name: Install dependencies
shell: pwsh
run: ./Build/install-dependencies.ps1
Expand All @@ -33,9 +37,13 @@ jobs:
shell: pwsh
run: dotnet --info

- name: Build
- name: CI build
shell: pwsh
run: ./Build/invoke-ci-build.ps1

- name: Build artifacts
shell: pwsh
run: ./Build/invoke-ci-build.ps1 "${{ secrets.GITHUB_TOKEN }}"
run: ./Build/invoke-artifacts-build.ps1 "${{ secrets.GITHUB_TOKEN }}"

- name: Artifact nuget packages
uses: actions/upload-artifact@v6
Expand Down
10 changes: 5 additions & 5 deletions Benchmarks/Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
<PackageVersion Include="ServiceModel.Grpc.ProtoBufMarshaller" Version="$(ServiceModelGrpcVersion)" />

<PackageVersion Include="BenchmarkDotNet" Version="0.15.8" />
<PackageVersion Include="MagicOnion" Version="7.10.1" />
<PackageVersion Include="MagicOnion.Server" Version="7.10.1" />
<PackageVersion Include="Microsoft.AspNetCore.TestHost" Version="10.0.9" />
<PackageVersion Include="protobuf-net.Grpc" Version="1.2.2" />
<PackageVersion Include="protobuf-net.Grpc.AspNetCore" Version="1.2.2" />
<PackageVersion Include="MagicOnion" Version="7.10.2" />
<PackageVersion Include="MagicOnion.Server" Version="7.10.2" />
<PackageVersion Include="Microsoft.AspNetCore.TestHost" Version="10.0.11" />
<PackageVersion Include="protobuf-net.Grpc" Version="1.3.14" />
<PackageVersion Include="protobuf-net.Grpc.AspNetCore" Version="1.3.14" />
<PackageVersion Include="System.ServiceModel.Primitives" Version="10.0.652802" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion Build/.config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"isRoot": true,
"tools": {
"dotnet-ilrepack": {
"version": "2.0.44",
"version": "2.0.47",
"commands": [
"ilrepack"
],
Expand Down
9 changes: 8 additions & 1 deletion Build/build-locally.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ param (
[switch]
$SkipBuild,

[Parameter()]
[switch]
$SkipArtifacts,

[Parameter()]
[switch]
$SkipLinuxSdk,
Expand Down Expand Up @@ -48,6 +52,10 @@ if (-not $SkipBuild) {
& (Join-Path $PSScriptRoot 'invoke-ci-build.ps1')
}

if (-not $SkipArtifacts) {
& (Join-Path $PSScriptRoot 'invoke-artifacts-build.ps1')
}

if (-not $SkipLinuxSdk) {
$repository = Join-Path $PSScriptRoot '../'
$invokeBuild = Resolve-ModulePath -Name InvokeBuild -Version (Get-ModuleVersion -Name InvokeBuild)
Expand Down Expand Up @@ -79,7 +87,6 @@ if (-not $SkipWinSdk) {
& (Join-Path $PSScriptRoot 'invoke-sdk-test.ps1') -Filter $WinSdkFilter
}

# benchmarks
if (-not $SkipBenchmarks) {
& (Join-Path $PSScriptRoot 'invoke-benchmarks.ps1') -Configuration $BenchmarksConfiguration
}
32 changes: 32 additions & 0 deletions Build/invoke-artifacts-build.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#Requires -Version "7.0"
#Requires -Modules @{ ModuleName="InvokeBuild"; ModuleVersion="5.14.23" }
#Requires -Modules @{ ModuleName="ThirdPartyLibraries"; ModuleVersion="3.11.0" }
#Requires -Modules @{ ModuleName="ZipAsFolder"; ModuleVersion="1.0.0" }

[CmdletBinding()]
param (
[Parameter()]
[string]
$GithubToken
)

$ErrorActionPreference = 'Stop'
$ProgressPreference = 'SilentlyContinue'
Set-StrictMode -Version Latest

. (Join-Path $PSScriptRoot 'scripts' 'Get-FullPath.ps1')
. (Join-Path $PSScriptRoot 'scripts' 'Get-NugetPath.ps1')
. (Join-Path $PSScriptRoot 'scripts' 'Get-ReleaseVersion.ps1')
. (Join-Path $PSScriptRoot 'scripts' 'Merge-DesignTimePackage.ps1')
. (Join-Path $PSScriptRoot 'scripts' 'Merge-NugetPackages.ps1')
. (Join-Path $PSScriptRoot 'scripts' 'Remove-DirectoryRecurse.ps1')
. (Join-Path $PSScriptRoot 'scripts' 'Test-NugetPackage.ps1')
. (Join-Path $PSScriptRoot 'scripts' 'Test-NugetPackageList.ps1')
. (Join-Path $PSScriptRoot 'scripts' 'Write-ThirdPartyNotices.ps1')

Invoke-Build `
-File (Join-Path $PSScriptRoot 'tasks' 'artifact-tasks.ps1') `
-PathSources (Get-FullPath (Join-Path $PSScriptRoot '../Sources')) `
-PathThirdParty (Get-FullPath (Join-Path $PSScriptRoot 'third-party-libraries')) `
-PathBuildOut (Get-FullPath (Join-Path $PSScriptRoot '../build-out')) `
-GithubToken $GithubToken
17 changes: 1 addition & 16 deletions Build/invoke-ci-build.ps1
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
#Requires -Version "7.0"
#Requires -Modules @{ ModuleName="InvokeBuild"; ModuleVersion="5.14.23" }
#Requires -Modules @{ ModuleName="ThirdPartyLibraries"; ModuleVersion="3.11.0" }
#Requires -Modules @{ ModuleName="ZipAsFolder"; ModuleVersion="1.0.0" }

[CmdletBinding()]
param (
[Parameter()]
[string]
$GithubToken
)

$ErrorActionPreference = 'Stop'
$ProgressPreference = 'SilentlyContinue'
Expand All @@ -18,15 +9,9 @@ Set-StrictMode -Version Latest
. (Join-Path $PSScriptRoot 'scripts' 'Get-FullPath.ps1')
. (Join-Path $PSScriptRoot 'scripts' 'Get-NugetPath.ps1')
. (Join-Path $PSScriptRoot 'scripts' 'Get-ReleaseVersion.ps1')
. (Join-Path $PSScriptRoot 'scripts' 'Merge-DesignTimePackage.ps1')
. (Join-Path $PSScriptRoot 'scripts' 'Merge-NugetPackages.ps1')
. (Join-Path $PSScriptRoot 'scripts' 'Remove-DirectoryRecurse.ps1')
. (Join-Path $PSScriptRoot 'scripts' 'Test-NugetPackage.ps1')
. (Join-Path $PSScriptRoot 'scripts' 'Write-ThirdPartyNotices.ps1')

Invoke-Build `
-File (Join-Path $PSScriptRoot 'tasks' 'ci-build-tasks.ps1') `
-PathSources (Get-FullPath (Join-Path $PSScriptRoot '../Sources')) `
-PathThirdParty (Get-FullPath (Join-Path $PSScriptRoot 'third-party-libraries')) `
-PathBuildOut (Get-FullPath (Join-Path $PSScriptRoot '../build-out')) `
-GithubToken $GithubToken
-PathBuildOut (Get-FullPath (Join-Path $PSScriptRoot '../build-out'))
2 changes: 1 addition & 1 deletion Build/scripts/Get-ModuleVersion.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ function Get-ModuleVersion {
$Name
)

$sources = Get-Content (Join-Path $PSScriptRoot '../invoke-ci-build.ps1') -Raw
$sources = Get-Content (Join-Path $PSScriptRoot '../invoke-artifacts-build.ps1') -Raw
$tokens = $null
$errors = $null
$modules = [Management.Automation.Language.Parser]::ParseInput($sources, [ref]$tokens, [ref]$errors).ScriptRequirements.RequiredModules
Expand Down
24 changes: 24 additions & 0 deletions Build/scripts/Test-NugetPackageList.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
function Test-NugetPackageList {
param (
[Parameter(Mandatory)]
[string[]]
$Name,

[Parameter(Mandatory)]
[ValidateScript({ Test-Path $_ -PathType Container })]
[string]
$BuildOut
)

$found = New-Object -TypeName System.Collections.Generic.HashSet[string]
foreach ($file in (Get-ChildItem -Path $BuildOut -Filter '*.*nupkg' -File)) {
$found.Add($file.Name) | Out-Null
}

foreach ($expected in $Name) {
assert $found.Remove("$expected.nupkg") "$expected.nupkg not found"
assert $found.Remove("$expected.snupkg") "$expected.snupkg not found"
}

assert (-not $found.Count) "found unxpected $($found.Count) NuGets"
}
29 changes: 29 additions & 0 deletions Build/tasks/artifact-tasks.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
param(
[Parameter(Mandatory)]
[ValidateScript({ Test-Path $_ })]
[string]
$PathSources,

[Parameter(Mandatory)]
[ValidateScript({ Test-Path $_ })]
[string]
$PathThirdParty,

[Parameter(Mandatory)]
[string]
$PathBuildOut,

[Parameter()]
[string]
$GithubToken
)

task . ThirdPartyNotices, Pack

task ThirdPartyNotices {
Invoke-Build -File 'task-third-party-notices.ps1' -Sources $PathSources -Repository $PathThirdParty -BuildOut $PathBuildOut -GithubToken $GithubToken
}

task Pack {
Invoke-Build -File 'task-pack.ps1' -Sources $PathSources -BuildOut $PathBuildOut
}
21 changes: 2 additions & 19 deletions Build/tasks/ci-build-tasks.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,11 @@ param(
$PathSources,

[Parameter(Mandatory)]
[ValidateScript({ Test-Path $_ })]
[string]
$PathThirdParty,

[Parameter(Mandatory)]
[string]
$PathBuildOut,

[Parameter()]
[string]
$GithubToken
$PathBuildOut
)

task . Clean, Build, UnitTest, ThirdPartyNotices, Pack
task . Clean, Build, UnitTest

task Clean {
Remove-DirectoryRecurse -Path $PathBuildOut
Expand All @@ -43,12 +34,4 @@ task UnitTest {
)

Build-Parallel $builds -ShowParameter Framework -MaximumBuilds 4
}

task ThirdPartyNotices {
Invoke-Build -File 'task-third-party-notices.ps1' -Sources $PathSources -Repository $PathThirdParty -BuildOut $PathBuildOut -GithubToken $GithubToken
}

task Pack {
Invoke-Build -File 'task-pack.ps1' -Sources $PathSources -BuildOut $PathBuildOut
}
35 changes: 21 additions & 14 deletions Build/tasks/task-pack.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,30 @@ Enter-Build {
$releaseVersion = Get-ReleaseVersion -Sources $Sources
}

task . DotnetPack, JoinServiceModelGrpc, JoinServiceModelGrpcEmit, DesignTimeILMerge, Test
task . DotnetPack, TestDotnetPack, JoinServiceModelGrpc, JoinServiceModelGrpcEmit, DesignTimeILMerge, Test

task DotnetPack {
$projects = @()
foreach ($file in (Get-ChildItem -Path $Sources -Recurse -Filter *.csproj)) {
$test = Select-Xml -Path $file -XPath 'Project/PropertyGroup/IsPackable'
if ($test -and $test.Node.InnerText -eq 'true') {
$projects += $file.FullName
}
}

$builds = @()
foreach ($project in $projects) {
$builds += @{ File = 'task-dotnet-pack.ps1'; ProjectFile = $project; BuildOut = $BuildOut }
}
Invoke-Build -File 'task-dotnet-pack.ps1' -ProjectFile $Sources -BuildOut $BuildOut
}

Build-Parallel $builds -ShowParameter ProjectFile -MaximumBuilds 1
task TestDotnetPack {
Test-NugetPackageList -BuildOut $BuildOut -Name `
"ServiceModel.Grpc.$releaseVersion" `
, "ServiceModel.Grpc.AspNetCore.$releaseVersion" `
, "ServiceModel.Grpc.AspNetCore.NSwag.$releaseVersion" `
, "ServiceModel.Grpc.AspNetCore.Swashbuckle.$releaseVersion" `
, "ServiceModel.Grpc.Client.DependencyInjection.$releaseVersion" `
, "ServiceModel.Grpc.Core.$releaseVersion" `
, "ServiceModel.Grpc.Descriptions.$releaseVersion" `
, "ServiceModel.Grpc.DesignTime.$releaseVersion" `
, "ServiceModel.Grpc.Emit.$releaseVersion" `
, "ServiceModel.Grpc.Filters.$releaseVersion" `
, "ServiceModel.Grpc.Interceptors.$releaseVersion" `
, "ServiceModel.Grpc.MemoryPackMarshaller.$releaseVersion" `
, "ServiceModel.Grpc.MessagePackMarshaller.$releaseVersion" `
, "ServiceModel.Grpc.Nerdbank.MessagePackMarshaller.$releaseVersion" `
, "ServiceModel.Grpc.ProtoBufMarshaller.$releaseVersion" `
, "ServiceModel.Grpc.SelfHost.$releaseVersion"
}

task JoinServiceModelGrpc {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,18 @@
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
<metadata>
<id>Google.Protobuf</id>
<version>3.35.1</version>
<version>3.36.0</version>
<authors>Google Inc.</authors>
<license type="expression">BSD-3-Clause</license>
<licenseUrl>https://licenses.nuget.org/BSD-3-Clause</licenseUrl>
<projectUrl>https://github.com/protocolbuffers/protobuf</projectUrl>
<description>C# runtime library for Protocol Buffers - Google's data interchange format.</description>
<releaseNotes>C# proto3 support</releaseNotes>
<releaseNotes>C# proto support</releaseNotes>
<copyright>Copyright 2015, Google Inc.</copyright>
<tags>Protocol Buffers Binary Serialization Format Google proto proto3</tags>
<repository type="git" url="https://github.com/protocolbuffers/protobuf.git" commit="35cd01f9fe9afbeea38cc7b979a3b6bfcde82c03" />
<repository type="git" url="https://github.com/protocolbuffers/protobuf.git" commit="8c891823af6d8308cdd36e1930e5d9db04d5289c" />
<dependencies>
<group targetFramework=".NETFramework4.5">
<dependency id="System.Memory" version="4.5.3" exclude="Build,Analyzers" />
</group>
<group targetFramework=".NETStandard1.1">
<dependency id="NETStandard.Library" version="1.6.1" exclude="Build,Analyzers" />
<dependency id="System.Memory" version="4.5.3" exclude="Build,Analyzers" />
</group>
<group targetFramework="net5.0" />
<group targetFramework="net8.0" />
<group targetFramework=".NETStandard2.0">
<dependency id="System.Memory" version="4.5.3" exclude="Build,Analyzers" />
<dependency id="System.Runtime.CompilerServices.Unsafe" version="4.5.2" exclude="Build,Analyzers" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Google.Protobuf [3.35.1](https://www.nuget.org/packages/Google.Protobuf/3.35.1)
Google.Protobuf [3.36.0](https://www.nuget.org/packages/Google.Protobuf/3.36.0)
--------------------

Used by: AspNetCore internal, AspNetCoreNSwag internal, AspNetCoreSwashbuckle internal
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"Dependencies": [
{
"Name": "Grpc.Net.Common",
"Version": "2.80.0"
"Version": "2.83.0"
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
<metadata>
<id>Grpc.AspNetCore.Server</id>
<version>2.80.0</version>
<version>2.83.0</version>
<authors>The gRPC Authors</authors>
<license type="expression">Apache-2.0</license>
<licenseUrl>https://licenses.nuget.org/Apache-2.0</licenseUrl>
Expand All @@ -12,16 +12,16 @@
<description>gRPC support for ASP.NET Core</description>
<copyright>Copyright 2019 The gRPC Authors</copyright>
<tags>gRPC RPC HTTP/2 aspnetcore</tags>
<repository type="git" url="https://github.com/grpc/grpc-dotnet.git" commit="f22747c72676120b2bc69a1ba7c8bed995e29b1b" />
<repository type="git" url="https://github.com/grpc/grpc-dotnet.git" commit="4301104498e53898a452e8fb2fea6c0b1492b755" />
<dependencies>
<group targetFramework="net8.0">
<dependency id="Grpc.Net.Common" version="2.80.0" exclude="Build,Analyzers" />
<dependency id="Grpc.Net.Common" version="2.83.0" exclude="Build,Analyzers" />
</group>
<group targetFramework="net9.0">
<dependency id="Grpc.Net.Common" version="2.80.0" exclude="Build,Analyzers" />
<dependency id="Grpc.Net.Common" version="2.83.0" exclude="Build,Analyzers" />
</group>
<group targetFramework="net10.0">
<dependency id="Grpc.Net.Common" version="2.80.0" exclude="Build,Analyzers" />
<dependency id="Grpc.Net.Common" version="2.83.0" exclude="Build,Analyzers" />
</group>
</dependencies>
<frameworkReferences>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Grpc.AspNetCore.Server [2.80.0](https://www.nuget.org/packages/Grpc.AspNetCore.Server/2.80.0)
Grpc.AspNetCore.Server [2.83.0](https://www.nuget.org/packages/Grpc.AspNetCore.Server/2.83.0)
--------------------

Used by: AspNetCore
Expand All @@ -20,6 +20,6 @@ Dependencies 1

|Name|Version|
|----------|:----|
|[Grpc.Net.Common](../../../../packages/nuget.org/grpc.net.common/2.80.0)|2.80.0|
|[Grpc.Net.Common](../../../../packages/nuget.org/grpc.net.common/2.83.0)|2.83.0|

*This page was generated by a tool.*
Loading