From 1aa5e7ccf8d1c1a621e2581793c67c6f619f920d Mon Sep 17 00:00:00 2001 From: cnkz Date: Tue, 9 Jan 2024 17:27:08 +0100 Subject: [PATCH] workflows --- .github/workflows/build-windows.yml | 5 +-- .github/workflows/publish-nuget.yml | 18 -------- .github/workflows/ubuntu-coreclr-6.0.yml | 30 ------------- .github/workflows/ubuntu-coreclr-7.0.yml | 30 ------------- .github/workflows/ubuntu-coreclr-8.0.yml | 30 ------------- .github/workflows/windows-coreclr-6.0.yml | 45 ------------------- .github/workflows/windows-coreclr-7.0.yml | 45 ------------------- .github/workflows/windows-coreclr-8.0.yml | 44 ------------------ README.md | 10 ++--- .../ManagedObjectSize.ObjectPool.csproj | 2 +- .../ManagedObjectSize.csproj | 2 +- src/version.json | 2 +- 12 files changed, 8 insertions(+), 255 deletions(-) delete mode 100644 .github/workflows/publish-nuget.yml delete mode 100644 .github/workflows/ubuntu-coreclr-6.0.yml delete mode 100644 .github/workflows/ubuntu-coreclr-7.0.yml delete mode 100644 .github/workflows/ubuntu-coreclr-8.0.yml delete mode 100644 .github/workflows/windows-coreclr-6.0.yml delete mode 100644 .github/workflows/windows-coreclr-7.0.yml delete mode 100644 .github/workflows/windows-coreclr-8.0.yml diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml index fcdda9f..dcd97f5 100644 --- a/.github/workflows/build-windows.yml +++ b/.github/workflows/build-windows.yml @@ -11,9 +11,8 @@ jobs: strategy: fail-fast: false matrix: - configuration: [ Release ] - #dotnet-version: [ '6.0.x', '7.0.x', '8.0.x' ] - dotnet-version: [ '8.0.x' ] + configuration: [ Release, Debug ] + dotnet-version: [ '6.0.x', '7.0.x', '8.0.x' ] runs-on: windows-latest diff --git a/.github/workflows/publish-nuget.yml b/.github/workflows/publish-nuget.yml deleted file mode 100644 index 41de393..0000000 --- a/.github/workflows/publish-nuget.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: Publish to NuGet - -# Only trigger, when the build workflow succeeded -on: - workflow_run: - workflows: ["Windows-CoreCLR-8.0"] - types: - - completed -jobs: - publish: - name: publish - runs-on: windows-latest - steps: - - uses: actions/checkout@v3 - - name: Publish ManagedObjectSize - run: dotnet nuget push -k ${{secrets.NUGET_API_KEY}} --source https://api.nuget.org/v3/index.json --skip-duplicate --no-symbols src\ManagedObjectSize\bin\Release\*.nupkg - - name: Publish ManagedObjectSize.ObjectPool - run: dotnet nuget push -k ${{secrets.NUGET_API_KEY}} --source https://api.nuget.org/v3/index.json --skip-duplicate --no-symbols src\ManagedObjectSize.ObjectPool\bin\Release\*.nupkg diff --git a/.github/workflows/ubuntu-coreclr-6.0.yml b/.github/workflows/ubuntu-coreclr-6.0.yml deleted file mode 100644 index 454a371..0000000 --- a/.github/workflows/ubuntu-coreclr-6.0.yml +++ /dev/null @@ -1,30 +0,0 @@ -# This workflow will build a .NET project -# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net - -name: Ubuntu-CoreCLR-6.0 - -on: workflow_dispatch - # push: - # branches: [ "main" ] - # pull_request: - # branches: [ "main" ] - -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - name: Setup .NET - uses: actions/setup-dotnet@v3 - with: - dotnet-version: 6.0.x - - name: Restore dependencies - run: dotnet restore src/ManagedObjectSize.sln - - name: Build - run: dotnet build --no-restore src/ManagedObjectSize.sln - - name: Test - run: dotnet test --no-build --verbosity normal src/ManagedObjectSize.Tests/ManagedObjectSize.Tests.csproj diff --git a/.github/workflows/ubuntu-coreclr-7.0.yml b/.github/workflows/ubuntu-coreclr-7.0.yml deleted file mode 100644 index 4bf2c3f..0000000 --- a/.github/workflows/ubuntu-coreclr-7.0.yml +++ /dev/null @@ -1,30 +0,0 @@ -# This workflow will build a .NET project -# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net - -name: Ubuntu-CoreCLR-7.0 - -on: workflow_dispatch - # push: - # branches: [ "main" ] - # pull_request: - # branches: [ "main" ] - -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - name: Setup .NET - uses: actions/setup-dotnet@v3 - with: - dotnet-version: 7.0.x - - name: Restore dependencies - run: dotnet restore src/ManagedObjectSize.sln - - name: Build - run: dotnet build --no-restore src/ManagedObjectSize.sln - - name: Test - run: dotnet test --no-build --verbosity normal src/ManagedObjectSize.Tests/ManagedObjectSize.Tests.csproj diff --git a/.github/workflows/ubuntu-coreclr-8.0.yml b/.github/workflows/ubuntu-coreclr-8.0.yml deleted file mode 100644 index 2de1e80..0000000 --- a/.github/workflows/ubuntu-coreclr-8.0.yml +++ /dev/null @@ -1,30 +0,0 @@ -# This workflow will build a .NET project -# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net - -name: Ubuntu-CoreCLR-8.0 - -on: workflow_dispatch - # push: - # branches: [ "main" ] - # pull_request: - # branches: [ "main" ] - -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - name: Setup .NET - uses: actions/setup-dotnet@v3 - with: - dotnet-version: 8.0.x - - name: Restore dependencies - run: dotnet restore src/ManagedObjectSize.sln - - name: Build - run: dotnet build --no-restore src/ManagedObjectSize.sln - - name: Test - run: dotnet test --no-build --verbosity normal src/ManagedObjectSize.Tests/ManagedObjectSize.Tests.csproj diff --git a/.github/workflows/windows-coreclr-6.0.yml b/.github/workflows/windows-coreclr-6.0.yml deleted file mode 100644 index bfcc69c..0000000 --- a/.github/workflows/windows-coreclr-6.0.yml +++ /dev/null @@ -1,45 +0,0 @@ -name: Windows-CoreCLR-6.0 - -on: workflow_dispatch - # push: - # branches: [ "main" ] - # pull_request: - # branches: [ "main" ] - -jobs: - - build: - - strategy: - matrix: - configuration: [Debug, Release] - - runs-on: windows-latest # For a list of available runner types, refer to - # https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on - - env: - Solution_Name: src\ManagedObjectSize.sln - Test_Project_Path: src\ManagedObjectSize.Tests\ManagedObjectSize.Tests.csproj - - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Install .NET Core - uses: actions/setup-dotnet@v3 - with: - dotnet-version: 6.0.x - - - name: Setup MSBuild.exe - uses: microsoft/setup-msbuild@v1.0.2 - - - name: Execute unit tests - run: dotnet test $env:Test_Project_Path - - - name: Restore the application - run: msbuild $env:Solution_Name /t:Restore /p:Configuration=$env:Configuration - env: - Configuration: ${{ matrix.configuration }} - diff --git a/.github/workflows/windows-coreclr-7.0.yml b/.github/workflows/windows-coreclr-7.0.yml deleted file mode 100644 index dfb3609..0000000 --- a/.github/workflows/windows-coreclr-7.0.yml +++ /dev/null @@ -1,45 +0,0 @@ -name: Windows-CoreCLR-7.0 - -on: workflow_dispatch - # push: - # branches: [ "main" ] - # pull_request: - # branches: [ "main" ] - -jobs: - - build: - - strategy: - matrix: - configuration: [Debug, Release] - - runs-on: windows-latest # For a list of available runner types, refer to - # https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on - - env: - Solution_Name: src\ManagedObjectSize.sln - Test_Project_Path: src\ManagedObjectSize.Tests\ManagedObjectSize.Tests.csproj - - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Install .NET Core - uses: actions/setup-dotnet@v3 - with: - dotnet-version: 7.0.x - - - name: Setup MSBuild.exe - uses: microsoft/setup-msbuild@v1.0.2 - - - name: Execute unit tests - run: dotnet test $env:Test_Project_Path - - - name: Restore the application - run: msbuild $env:Solution_Name /t:Restore /p:Configuration=$env:Configuration - env: - Configuration: ${{ matrix.configuration }} - diff --git a/.github/workflows/windows-coreclr-8.0.yml b/.github/workflows/windows-coreclr-8.0.yml deleted file mode 100644 index 9441e1b..0000000 --- a/.github/workflows/windows-coreclr-8.0.yml +++ /dev/null @@ -1,44 +0,0 @@ -name: Windows-CoreCLR-8.0 - -on: workflow_dispatch - # push: - # branches: [ "main" ] - # pull_request: - # branches: [ "main" ] - -jobs: - - build: - - strategy: - matrix: - configuration: [Debug, Release] - - runs-on: windows-latest # For a list of available runner types, refer to - # https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on - - env: - Solution_Name: src\ManagedObjectSize.sln - Test_Project_Path: src\ManagedObjectSize.Tests\ManagedObjectSize.Tests.csproj - - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Install .NET Core - uses: actions/setup-dotnet@v3 - with: - dotnet-version: 8.0.x - - - name: Setup MSBuild.exe - uses: microsoft/setup-msbuild@v1.0.2 - - - name: Execute unit tests - run: dotnet test $env:Test_Project_Path - - - name: Restore the application - run: msbuild $env:Solution_Name /t:Restore /p:Configuration=$env:Configuration - env: - Configuration: ${{ matrix.configuration }} diff --git a/README.md b/README.md index 972b4ce..bffc291 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,8 @@ # ManagedObjectSize +[![Windows](https://github.com/cklutz/ManagedObjectSize/actions/workflows/build-windows.yml/badge.svg)](https://github.com/cklutz/ManagedObjectSize/actions/workflows/build-windows.yml) +[![Ubuntu](https://github.com/cklutz/ManagedObjectSize/actions/workflows/build-ubuntu.yml/badge.svg)](https://github.com/cklutz/ManagedObjectSize/actions/workflows/build-ubuntu.yml) + _This library depends on internals of the CoreCLR. Currently tested with version 6.0, 7.0 and 8.0, there is no guarantee it will work with future versions. You would be ill adviced, would you use this functionality for anything else than diagnostics or other, non vital to the core of your application, features._ Attempts to calculate the size of managed options (heap size) from within an application. Basically, compare this library to the SOS `!ObjSize` WinDBG extension, but callable @@ -20,13 +23,6 @@ The algorithm and ideas are based largely on work from - [ClrMD](https://github.com/microsoft/clrmd) - The dotnet [runtime](https://github.com/dotnet/runtime) -[![Windows CoreCLR 6.0](https://github.com/cklutz/ManagedObjectSize/actions/workflows/windows-coreclr-6.0.yml/badge.svg)](https://github.com/cklutz/ManagedObjectSize/actions/workflows/windows-coreclr-6.0.yml) -[![Windows CoreCLR 7.0](https://github.com/cklutz/ManagedObjectSize/actions/workflows/windows-coreclr-7.0.yml/badge.svg)](https://github.com/cklutz/ManagedObjectSize/actions/workflows/windows-coreclr-7.0.yml) -[![Windows CoreCLR 8.0](https://github.com/cklutz/ManagedObjectSize/actions/workflows/windows-coreclr-8.0.yml/badge.svg)](https://github.com/cklutz/ManagedObjectSize/actions/workflows/windows-coreclr-8.0.yml) - -[![Ubuntu CoreCLR 6.0](https://github.com/cklutz/ManagedObjectSize/actions/workflows/ubuntu-coreclr-6.0.yml/badge.svg)](https://github.com/cklutz/ManagedObjectSize/actions/workflows/ubuntu-coreclr-6.0.yml) -[![Ubuntu CoreCLR 7.0](https://github.com/cklutz/ManagedObjectSize/actions/workflows/ubuntu-coreclr-7.0.yml/badge.svg)](https://github.com/cklutz/ManagedObjectSize/actions/workflows/ubuntu-coreclr-7.0.yml) -[![Ubuntu CoreCLR 8.0](https://github.com/cklutz/ManagedObjectSize/actions/workflows/ubuntu-coreclr-8.0.yml/badge.svg)](https://github.com/cklutz/ManagedObjectSize/actions/workflows/ubuntu-coreclr-8.0.yml) diff --git a/src/ManagedObjectSize.ObjectPool/ManagedObjectSize.ObjectPool.csproj b/src/ManagedObjectSize.ObjectPool/ManagedObjectSize.ObjectPool.csproj index 99f49f5..2c5ebc9 100644 --- a/src/ManagedObjectSize.ObjectPool/ManagedObjectSize.ObjectPool.csproj +++ b/src/ManagedObjectSize.ObjectPool/ManagedObjectSize.ObjectPool.csproj @@ -8,7 +8,7 @@ true ManagedObjectSize.ObjectPool - 0.0.6 + 0.0.7 Christian Klutz Adapts Microsoft.Extensions.ObjectPool to be used with ManagedObjectSize package. diff --git a/src/ManagedObjectSize/ManagedObjectSize.csproj b/src/ManagedObjectSize/ManagedObjectSize.csproj index 1941c46..a8e201d 100644 --- a/src/ManagedObjectSize/ManagedObjectSize.csproj +++ b/src/ManagedObjectSize/ManagedObjectSize.csproj @@ -8,7 +8,7 @@ true ManagedObjectSize - 0.0.6 + 0.0.7 Christian Klutz Attempts to calculate the memory size of managed objects from within the application itself. diff --git a/src/version.json b/src/version.json index 6485cd2..9fd3c2f 100644 --- a/src/version.json +++ b/src/version.json @@ -1,6 +1,6 @@ { "$schema": "https://raw.githubusercontent.com/AArnott/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json", - "version": "0.0.6", + "version": "0.0.7", "nugetPackageVersion": { "semVer": 2 }