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
54 changes: 7 additions & 47 deletions .github/workflows/delayed-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,48 +19,6 @@ on:
- Release

jobs:
prepare_linux:
name: 🐧 Prepare Linux
runs-on: ubuntu-22.04
timeout-minutes: 15
outputs:
restoreCacheKey: ${{ steps.dotnet-restore.outputs.restoreCacheKey }}
steps:
- name: Checkout
uses: codebeltnet/git-checkout@v1

- name: Install .NET
uses: codebeltnet/install-dotnet@v1
with:
includePreview: true

- id: dotnet-restore
name: Restore Dependencies
uses: codebeltnet/dotnet-restore@v2
with:
useRestoreCache: true

prepare_windows:
name: 🪟 Prepare Windows
runs-on: windows-2022
timeout-minutes: 15
outputs:
restoreCacheKey: ${{ steps.dotnet-restore.outputs.restoreCacheKey }}
steps:
- name: Checkout
uses: codebeltnet/git-checkout@v1

- name: Install .NET
uses: codebeltnet/install-dotnet@v1
with:
includePreview: true

- id: dotnet-restore
name: Restore Dependencies
uses: codebeltnet/dotnet-restore@v2
with:
useRestoreCache: true

build:
name: 🛠️ Build
runs-on: ubuntu-22.04
Expand All @@ -69,7 +27,6 @@ jobs:
matrix:
configuration: [Debug, Release]
framework: [net9.0, net8.0, netstandard2.0]
needs: [prepare_linux]
outputs:
version: ${{ steps.minver-calculate.outputs.version }}
projects: ${{ steps.projects.outputs.result }}
Expand Down Expand Up @@ -113,14 +70,16 @@ jobs:
fi
shell: bash

- name: Restore Dependencies
uses: codebeltnet/dotnet-restore@v2

- id: dotnet-build
name: Build for ${{ matrix.framework }} (${{ matrix.configuration }})
uses: codebeltnet/dotnet-build@v2
with:
projects: ${{ steps.projects.outputs.result }}
configuration: ${{ matrix.configuration }}
framework: ${{ matrix.framework }}
restoreCacheKey: ${{ needs.prepare_linux.outputs.restoreCacheKey }}
uploadBuildArtifactName: 'DelayedBuild.${{ matrix.framework }}.${{ matrix.configuration }}'

pack:
Expand All @@ -130,7 +89,7 @@ jobs:
strategy:
matrix:
configuration: [Debug, Release]
needs: [prepare_linux, build]
needs: [build]
steps:
- name: Checkout
uses: codebeltnet/git-checkout@v1
Expand All @@ -146,10 +105,11 @@ jobs:
configuration: ${{ matrix.configuration }}
uploadPackedArtifact: true
version: ${{ needs.build.outputs.version }}
restoreCacheKey: ${{ needs.prepare_linux.outputs.restoreCacheKey }}
downloadBuildArtifactPattern: 'DelayedBuild.*.${{ matrix.configuration }}'
uploadPackedArtifactName: 'NuGet-Delayed-${{ matrix.configuration }}'
projects: ${{ needs.build.outputs.projects }}
projects: >-
src/**/Cuemon.Core.App.csproj
src/**/Cuemon.Extensions.Globalization.csproj

deploy:
if: github.event_name != 'pull_request'
Expand Down
61 changes: 57 additions & 4 deletions .github/workflows/pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,48 @@ jobs:
uploadPackedArtifact: true
version: ${{ needs.build.outputs.version }}
restoreCacheKey: ${{ needs.prepare_linux.outputs.restoreCacheKey }}
projects: ${{ needs.build.outputs.projects }}
projects: >-
src/**/Cuemon.AspNetCore.csproj
src/**/Cuemon.AspNetCore.App.csproj
src/**/Cuemon.AspNetCore.Authentication.csproj
src/**/Cuemon.AspNetCore.Mvc.csproj
src/**/Cuemon.AspNetCore.Razor.TagHelpers.csproj
src/**/Cuemon.Core.csproj
src/**/Cuemon.Data.csproj
src/**/Cuemon.Data.Integrity.csproj
src/**/Cuemon.Data.SqlClient.csproj
src/**/Cuemon.Diagnostics.csproj
src/**/Cuemon.Extensions.AspNetCore.csproj
src/**/Cuemon.Extensions.AspNetCore.Authentication.csproj
src/**/Cuemon.Extensions.AspNetCore.Mvc.csproj
src/**/Cuemon.Extensions.AspNetCore.Mvc.Formatters.Text.Json.csproj
src/**/Cuemon.Extensions.AspNetCore.Mvc.Formatters.Xml.csproj
src/**/Cuemon.Extensions.AspNetCore.Mvc.RazorPages.csproj
src/**/Cuemon.Extensions.AspNetCore.Text.Json.csproj
src/**/Cuemon.Extensions.AspNetCore.Xml.csproj
src/**/Cuemon.Extensions.Collections.Generic.csproj
src/**/Cuemon.Extensions.Collections.Specialized.csproj
src/**/Cuemon.Extensions.Core.csproj
src/**/Cuemon.Extensions.Data.csproj
src/**/Cuemon.Extensions.Data.Integrity.csproj
src/**/Cuemon.Extensions.DependencyInjection.csproj
src/**/Cuemon.Extensions.Diagnostics.csproj
src/**/Cuemon.Extensions.Hosting.csproj
src/**/Cuemon.Extensions.IO.csproj
src/**/Cuemon.Extensions.Net.csproj
src/**/Cuemon.Extensions.Reflection.csproj
src/**/Cuemon.Extensions.Runtime.Caching.csproj
src/**/Cuemon.Extensions.Text.csproj
src/**/Cuemon.Extensions.Text.Json.csproj
src/**/Cuemon.Extensions.Threading.csproj
src/**/Cuemon.Extensions.Xml.csproj
src/**/Cuemon.IO.csproj
src/**/Cuemon.Net.csproj
src/**/Cuemon.Resilience.csproj
src/**/Cuemon.Runtime.Caching.csproj
src/**/Cuemon.Security.Cryptography.csproj
src/**/Cuemon.Threading.csproj
src/**/Cuemon.Xml.csproj

test:
name: 🧪 Test
Expand Down Expand Up @@ -262,7 +303,7 @@ jobs:
projects: ${{ matrix.project }}
configuration: ${{ matrix.configuration }}
restoreCacheKey: ${{ runner.os == 'Linux' && needs.prepare_linux.outputs.restoreCacheKey || needs.prepare_windows.outputs.restoreCacheKey }}
buildSwitches: -p:SkipSignAssembly=true
buildSwitches: ${{ contains(matrix.project, 'Cuemon.Extensions.Globalization.Tests') && '-p:SkipSignAssembly=false' || '-p:SkipSignAssembly=true' }}
testArguments: -- RunConfiguration.DisableAppDomain=true
env:
CONNECTIONSTRINGS__ADVENTUREWORKS: ${{ secrets.DB_ADVENTUREWORKS }}
Expand Down Expand Up @@ -296,6 +337,13 @@ jobs:
useRestoreCache: true
restoreCacheKey: ${{ needs.prepare_linux.outputs.restoreCacheKey }}

- name: Download cuemon.snk file
uses: codebeltnet/gcp-download-file@v1
with:
serviceAccountKey: ${{ secrets.GCP_TOKEN }}
bucketName: ${{ secrets.GCP_BUCKETNAME }}
objectName: cuemon.snk

- name: Run SonarCloud Analysis
uses: codebeltnet/sonarcloud-scan@v1
with:
Expand All @@ -308,7 +356,6 @@ jobs:
uses: codebeltnet/dotnet-build@v2
with:
uploadBuildArtifact: false
buildSwitches: -p:SkipSignAssembly=true

- name: Finalize SonarCloud Analysis
uses: codebeltnet/sonarcloud-scan-finalize@v1
Expand Down Expand Up @@ -353,11 +400,17 @@ jobs:
- name: Prepare CodeQL SAST Analysis
uses: codebeltnet/codeql-scan@v1

- name: Download cuemon.snk file
uses: codebeltnet/gcp-download-file@v1
with:
serviceAccountKey: ${{ secrets.GCP_TOKEN }}
bucketName: ${{ secrets.GCP_BUCKETNAME }}
objectName: cuemon.snk

- name: Build
uses: codebeltnet/dotnet-build@v2
with:
uploadBuildArtifact: false
buildSwitches: -p:SkipSignAssembly=true

- name: Finalize CodeQL SAST Analysis
uses: codebeltnet/codeql-scan-finalize@v1
Expand Down
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<IsWindows>$([MSBuild]::IsOSPlatform('Windows'))</IsWindows>
<IsMainAuthor Condition="'$(EMAIL)' == 'michael@geekle.io'">true</IsMainAuthor>
<SkipSignAssembly>false</SkipSignAssembly>
<LangVersion>preview</LangVersion>
<LangVersion>latest</LangVersion>
</PropertyGroup>

<PropertyGroup Condition="'$(CI)' == 'true'">
Expand Down
2 changes: 1 addition & 1 deletion Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<PackageVersion Include="Codebelt.Extensions.Xunit" Version="9.0.0" />
<PackageVersion Include="Codebelt.Extensions.Xunit.Hosting" Version="9.0.0" />
<PackageVersion Include="Codebelt.Extensions.Xunit.Hosting.AspNetCore" Version="9.0.0" />
<PackageVersion Include="Codebelt.Extensions.YamlDotNet" Version="9.0.0-rc.1" />
<PackageVersion Include="Codebelt.Extensions.YamlDotNet" Version="9.0.0" />
<PackageVersion Include="Meziantou.Xunit.ParallelTestFramework" Version="2.3.0" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="8.0.0" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1203,4 +1203,9 @@
<PackageReference Include="Codebelt.Extensions.YamlDotNet" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Cuemon.Extensions.IO\Cuemon.Extensions.IO.csproj" />
<ProjectReference Include="..\Cuemon.Extensions.Reflection\Cuemon.Extensions.Reflection.csproj" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\Cuemon.Extensions.Core\Cuemon.Extensions.Core.csproj" />
<ProjectReference Include="..\..\src\Cuemon.Extensions.Globalization\Cuemon.Extensions.Globalization.csproj" />
</ItemGroup>

Expand Down
Loading