-
Notifications
You must be signed in to change notification settings - Fork 0
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
Showing
11 changed files
with
137 additions
and
2 deletions.
There are no files selected for viewing
File renamed without changes.
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,45 @@ | ||
name: .NET | ||
|
||
on: | ||
push: | ||
branches: [ "master" ] | ||
pull_request: | ||
branches: [ "master" ] | ||
workflow_dispatch: | ||
|
||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Setup .NET | ||
uses: actions/setup-dotnet@v2 | ||
with: | ||
dotnet-version: 6.0.x | ||
- name: Restore dependencies | ||
run: dotnet restore ./src/ | ||
- name: Build | ||
run: dotnet build ./src/ --no-restore | ||
- name: Test | ||
run: dotnet test ./src/ --no-build --verbosity normal | ||
|
||
publish: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
environment: nuget | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Setup .NET | ||
uses: actions/setup-dotnet@v2 | ||
with: | ||
dotnet-version: 6.0.x | ||
- name: Build | ||
run: dotnet pack --configuration Release ./src/ -o ./ | ||
- name: Publish | ||
env: | ||
API_KEY: ${{ secrets.NUGET_API_KEY }} | ||
run: dotnet nuget push --api-key $API_KEY --source https://api.nuget.org/v3/index.json *.nupkg | ||
|
File renamed without changes.
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,14 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<TargetFramework>net6.0</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\..\src\PicoProfiler\PicoProfiler.csproj" /> | ||
</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,37 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio Version 17 | ||
VisualStudioVersion = 17.8.34322.80 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PicoSampleApp", "PicoSampleApp.csproj", "{CAB0DF19-22C1-4D00-AFF3-8B289B0880BF}" | ||
EndProject | ||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PicoProfiler.Logging", "..\..\src\PicoProfiler.Logging\PicoProfiler.Logging.csproj", "{BEECD099-7C81-4133-8FCE-1C56B1BDED88}" | ||
EndProject | ||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PicoProfiler", "..\..\src\PicoProfiler\PicoProfiler.csproj", "{F56EF65C-0B2B-4364-9ADB-092FD1BDF715}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{CAB0DF19-22C1-4D00-AFF3-8B289B0880BF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{CAB0DF19-22C1-4D00-AFF3-8B289B0880BF}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{CAB0DF19-22C1-4D00-AFF3-8B289B0880BF}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{CAB0DF19-22C1-4D00-AFF3-8B289B0880BF}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{BEECD099-7C81-4133-8FCE-1C56B1BDED88}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{BEECD099-7C81-4133-8FCE-1C56B1BDED88}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{BEECD099-7C81-4133-8FCE-1C56B1BDED88}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{BEECD099-7C81-4133-8FCE-1C56B1BDED88}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{F56EF65C-0B2B-4364-9ADB-092FD1BDF715}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{F56EF65C-0B2B-4364-9ADB-092FD1BDF715}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{F56EF65C-0B2B-4364-9ADB-092FD1BDF715}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{F56EF65C-0B2B-4364-9ADB-092FD1BDF715}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(ExtensibilityGlobals) = postSolution | ||
SolutionGuid = {CF720C8F-3DB6-475E-81AE-D9567D54D46D} | ||
EndGlobalSection | ||
EndGlobal |
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,19 @@ | ||
using PicoProfiler.ConsoleOutput; | ||
|
||
namespace PicoSampleApp; | ||
|
||
internal class Program | ||
{ | ||
static async Task Main(string[] args) | ||
{ | ||
await RunConsoleSample(); | ||
} | ||
|
||
private static async Task RunConsoleSample() | ||
{ | ||
using var _ = PicoProfilerConsoleOutput.Start(); | ||
await MyTimeConsumingWork(); | ||
} | ||
|
||
private static async Task MyTimeConsumingWork() => await Task.Delay(TimeSpan.FromMilliseconds(374)); | ||
} |
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 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