From 4f6119daf98186a4d1e35f485d4843ab21dd9b0c Mon Sep 17 00:00:00 2001 From: Sergio Pedri Date: Sun, 3 Apr 2022 18:04:59 +0200 Subject: [PATCH] Add ComputeSharp.Core.msbuildproj package project --- .github/workflows/dotnet.yml | 35 ++++++++++++------ ComputeSharp.sln | 6 ++- .../ComputeSharp.Sample.NuGet.csproj | 1 + .../ComputeSharp.Sample.NuGet/nuget.config | 1 + .../ComputeSharp.Core.Package.msbuildproj | 22 +++++++++++ .../icon.png | Bin .../icon_highres.png | Bin .../ComputeSharp.Dynamic.Package.msbuildproj | 2 +- .../ComputeSharp.Package.msbuildproj | 8 +++- src/ComputeSharp.Uwp/ComputeSharp.Uwp.csproj | 2 +- .../ComputeSharp.WinUI.csproj | 2 +- 11 files changed, 62 insertions(+), 17 deletions(-) create mode 100644 src/ComputeSharp.Core.Package/ComputeSharp.Core.Package.msbuildproj rename src/{ComputeSharp.Package => ComputeSharp.Core.Package}/icon.png (100%) rename src/{ComputeSharp.Package => ComputeSharp.Core.Package}/icon_highres.png (100%) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 1d2b6b8f..90e01571 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -156,9 +156,9 @@ jobs: run: dotnet build samples\ComputeSharp.SwapChain\ComputeSharp.SwapChain.csproj -c Release shell: cmd - # Buils the .msbuildproj project to generate the NuGet package. - # This workflow also uploads the resulting package as an artifact. - build-package: + # Build the .msbuildproj projects to generate the NuGet packages. + # This workflow also uploads the resulting packages as artifacts. + build-packages: if: success() needs: [build-solution-debug, build-solution-release] runs-on: windows-2022 @@ -169,6 +169,14 @@ jobs: uses: actions/setup-dotnet@v1 with: dotnet-version: 6.0.x + - name: Build ComputeSharp.Core package + run: dotnet build src\ComputeSharp.Core.Package\ComputeSharp.Core.Package.msbuildproj -c Release /p:ContinuousIntegrationBuild=True + shell: cmd + - name: Upload ComputeSharp.Core package artifact + uses: actions/upload-artifact@v2 + with: + name: ComputeSharp.Core.nupkg + path: src\ComputeSharp.Core.Package\bin\Release\*.nupkg - name: Build ComputeSharp package run: dotnet build src\ComputeSharp.Package\ComputeSharp.Package.msbuildproj -c Release /p:ContinuousIntegrationBuild=True shell: cmd @@ -186,12 +194,12 @@ jobs: name: ComputeSharp.Dynamic.nupkg path: src\ComputeSharp.Dynamic.Package\bin\Release\*.nupkg - # Download the NuGet package generated in the previous job and use it - # to build and run the sample project referencing it. This is used as - # a test to ensure the NuGet package works in a consuming project. - verify-package: + # Download the NuGet packages generated in the previous job and use them + # to build and run the sample project referencing them. This is used as + # a test to ensure the NuGet packages work in a consuming project. + verify-packages: if: success() - needs: [build-package] + needs: [build-packages] runs-on: windows-2022 steps: - name: Git checkout @@ -203,6 +211,11 @@ jobs: - name: Create local NuGet feed run: mkdir src\ComputeSharp.Package\bin\Release shell: cmd + - name: Download ComputeSharp.Core package artifact + uses: actions/download-artifact@v2 + with: + name: ComputeSharp.Core.nupkg + path: src\ComputeSharp.Core.Package\bin\Release\ComputeSharp.Core.nupkg - name: Download ComputeSharp package artifact uses: actions/download-artifact@v2 with: @@ -237,7 +250,7 @@ jobs: # regardless of whether the app is shipping with R2R, self-contained, etc. verify-package-native-libs: if: success() - needs: [verify-package] + needs: [verify-packages] runs-on: windows-2022 steps: - name: Git checkout @@ -254,7 +267,7 @@ jobs: # This workflow also uploads the resulting package as an artifact. build-package-winui: if: success() - needs: [verify-package] + needs: [verify-packages] runs-on: windows-2022 steps: - name: Git checkout @@ -281,7 +294,7 @@ jobs: # This workflow also uploads the resulting package as an artifact, like the WinUI one. build-package-uwp: if: success() - needs: [verify-package] + needs: [verify-packages] runs-on: windows-2022 steps: - name: Git checkout diff --git a/ComputeSharp.sln b/ComputeSharp.sln index 68f242f5..4058d71a 100644 --- a/ComputeSharp.sln +++ b/ComputeSharp.sln @@ -30,9 +30,11 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComputeSharp.SourceGenerato EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "NuGet", "NuGet", "{FB17EF84-9208-47AC-921F-680CB1DAD8BA}" ProjectSection(SolutionItems) = preProject + src\ComputeSharp.Core.Package\ComputeSharp.Core.Package.msbuildproj = src\ComputeSharp.Core.Package\ComputeSharp.Core.Package.msbuildproj src\ComputeSharp.Dynamic.Package\ComputeSharp.Dynamic.Package.msbuildproj = src\ComputeSharp.Dynamic.Package\ComputeSharp.Dynamic.Package.msbuildproj src\ComputeSharp.Package\ComputeSharp.Package.msbuildproj = src\ComputeSharp.Package\ComputeSharp.Package.msbuildproj - src\ComputeSharp.Package\icon.png = src\ComputeSharp.Package\icon.png + src\ComputeSharp.Core.Package\icon.png = src\ComputeSharp.Core.Package\icon.png + src\ComputeSharp.Core.Package\icon_highres.png = src\ComputeSharp.Core.Package\icon_highres.png EndProjectSection EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComputeSharp.Sample", "samples\ComputeSharp.Sample\ComputeSharp.Sample.csproj", "{7048DEEA-0A6F-46A0-B951-B682A8F1CB75}" @@ -85,7 +87,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComputeSharp.Core", "src\Co EndProject Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "ComputeSharp.Core.NetStandard", "src\ComputeSharp.Core.NetStandard\ComputeSharp.Core.NetStandard.shproj", "{3ACACF03-6B20-40BA-B8EC-11AC1624D2C9}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ComputeSharp.Core.SourceGenerators", "src\ComputeSharp.Core.SourceGenerators\ComputeSharp.Core.SourceGenerators.csproj", "{BFB003D1-788B-48DE-8065-39479C162CB0}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComputeSharp.Core.SourceGenerators", "src\ComputeSharp.Core.SourceGenerators\ComputeSharp.Core.SourceGenerators.csproj", "{BFB003D1-788B-48DE-8065-39479C162CB0}" EndProject Global GlobalSection(SharedMSBuildProjectFiles) = preSolution diff --git a/samples/ComputeSharp.Sample.NuGet/ComputeSharp.Sample.NuGet.csproj b/samples/ComputeSharp.Sample.NuGet/ComputeSharp.Sample.NuGet.csproj index dd2769fd..5551dc7c 100644 --- a/samples/ComputeSharp.Sample.NuGet/ComputeSharp.Sample.NuGet.csproj +++ b/samples/ComputeSharp.Sample.NuGet/ComputeSharp.Sample.NuGet.csproj @@ -7,6 +7,7 @@ + diff --git a/samples/ComputeSharp.Sample.NuGet/nuget.config b/samples/ComputeSharp.Sample.NuGet/nuget.config index c3f2b513..0c191ad9 100644 --- a/samples/ComputeSharp.Sample.NuGet/nuget.config +++ b/samples/ComputeSharp.Sample.NuGet/nuget.config @@ -1,6 +1,7 @@ + diff --git a/src/ComputeSharp.Core.Package/ComputeSharp.Core.Package.msbuildproj b/src/ComputeSharp.Core.Package/ComputeSharp.Core.Package.msbuildproj new file mode 100644 index 00000000..aa6080cc --- /dev/null +++ b/src/ComputeSharp.Core.Package/ComputeSharp.Core.Package.msbuildproj @@ -0,0 +1,22 @@ + + + + net6.0 + + + + ComputeSharp.Core + ComputeSharp.Core + A library containing basic primitives to support ComputeSharp (this package is not supposed to be referenced directly by developers) + + + + + + + + + + + + \ No newline at end of file diff --git a/src/ComputeSharp.Package/icon.png b/src/ComputeSharp.Core.Package/icon.png similarity index 100% rename from src/ComputeSharp.Package/icon.png rename to src/ComputeSharp.Core.Package/icon.png diff --git a/src/ComputeSharp.Package/icon_highres.png b/src/ComputeSharp.Core.Package/icon_highres.png similarity index 100% rename from src/ComputeSharp.Package/icon_highres.png rename to src/ComputeSharp.Core.Package/icon_highres.png diff --git a/src/ComputeSharp.Dynamic.Package/ComputeSharp.Dynamic.Package.msbuildproj b/src/ComputeSharp.Dynamic.Package/ComputeSharp.Dynamic.Package.msbuildproj index 4705f643..cb63e3af 100644 --- a/src/ComputeSharp.Dynamic.Package/ComputeSharp.Dynamic.Package.msbuildproj +++ b/src/ComputeSharp.Dynamic.Package/ComputeSharp.Dynamic.Package.msbuildproj @@ -11,7 +11,7 @@ - + diff --git a/src/ComputeSharp.Package/ComputeSharp.Package.msbuildproj b/src/ComputeSharp.Package/ComputeSharp.Package.msbuildproj index 3cf4d1dd..e23b4715 100644 --- a/src/ComputeSharp.Package/ComputeSharp.Package.msbuildproj +++ b/src/ComputeSharp.Package/ComputeSharp.Package.msbuildproj @@ -11,12 +11,18 @@ - + + + PackageVersion=$(PackageVersion) + + + PackageVersion=$(PackageVersion) + \ No newline at end of file diff --git a/src/ComputeSharp.Uwp/ComputeSharp.Uwp.csproj b/src/ComputeSharp.Uwp/ComputeSharp.Uwp.csproj index 06046c44..cf837b3a 100644 --- a/src/ComputeSharp.Uwp/ComputeSharp.Uwp.csproj +++ b/src/ComputeSharp.Uwp/ComputeSharp.Uwp.csproj @@ -27,7 +27,7 @@ - + diff --git a/src/ComputeSharp.WinUI/ComputeSharp.WinUI.csproj b/src/ComputeSharp.WinUI/ComputeSharp.WinUI.csproj index cdb1b032..6062ddd5 100644 --- a/src/ComputeSharp.WinUI/ComputeSharp.WinUI.csproj +++ b/src/ComputeSharp.WinUI/ComputeSharp.WinUI.csproj @@ -19,7 +19,7 @@ - +