From a73657939b0c2cb06e5435b6c23298d6009bc001 Mon Sep 17 00:00:00 2001 From: jcant0n Date: Tue, 3 Sep 2024 21:29:30 +0200 Subject: [PATCH] Updated to net 8.0 and create CI workflow. --- .github/workflows/CI.yml | 47 +++++++++++++++++++ .github/workflows/cd.yml | 10 ++-- .../Evergine.Bindings.WebGPU.csproj | 2 +- WebGPUGen/HelloTriangle/HelloTriangle.csproj | 2 +- WebGPUGen/WebGPUGen.sln | 14 +----- 5 files changed, 55 insertions(+), 20 deletions(-) create mode 100644 .github/workflows/CI.yml diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml new file mode 100644 index 0000000..2b5a0cc --- /dev/null +++ b/.github/workflows/CI.yml @@ -0,0 +1,47 @@ +name: CI +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +env: + nugetOutputPath: ${{ 'nupkgs' }} + +jobs: + build_and_publish: + runs-on: windows-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-dotnet@v4 + with: + dotnet-version: 8.x + - uses: nuget/setup-nuget@v2 + with: + nuget-version: "6.x" + - name: Generate Bindings + id: build_bindings + shell: pwsh + run: | + ./Generate-Bindings.ps1 + - name: Generate NuGet packages + id: build_nugets + shell: pwsh + run: | + ./Generate-NuGets.ps1 -revision ${{ github.run_number }} -outputfolder ${{ env.nugetOutputPath }} + - name: SendGrid Mail Action + if: ${{ failure() }} + uses: mmichailidis/sendgrid-mail-action@v1.1 + with: + # The token for sendgrid + sendgrid-token: ${{ secrets.WAVE_SENDGRID_TOKEN }} + # List of emails separated by comma that the email will go + mail: ${{ secrets.EVERGINE_EMAILREPORT_LIST }} + # The email that will be shown as sender + from: ${{ secrets.EVERGINE_EMAIL }} + # The subject of the email + subject: WebGPU.Net CD build has failed + # Defines if it should be one email with multiple address or multiple emails with a single address + individual: false + # The body of the mail. The placeholders that can be used are $EVENT$, $ISSUE$, $ACTION$ + text: something went wrong when building WebGPU.Net diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index ee5572d..cbf31fc 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -15,13 +15,11 @@ jobs: build_and_publish: runs-on: windows-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-dotnet@v3 # 7.x is needed to support pointers to managed memory + - uses: actions/checkout@v4 + - uses: actions/setup-dotnet@v4 with: - dotnet-version: | - 6.x - 8.x - - uses: nuget/setup-nuget@v1 + dotnet-version: 8.x + - uses: nuget/setup-nuget@v2 with: nuget-version: "6.x" - name: Generate Bindings diff --git a/WebGPUGen/Evergine.Bindings.WebGPU/Evergine.Bindings.WebGPU.csproj b/WebGPUGen/Evergine.Bindings.WebGPU/Evergine.Bindings.WebGPU.csproj index bc6ae75..73fb0c3 100644 --- a/WebGPUGen/Evergine.Bindings.WebGPU/Evergine.Bindings.WebGPU.csproj +++ b/WebGPUGen/Evergine.Bindings.WebGPU/Evergine.Bindings.WebGPU.csproj @@ -12,7 +12,7 @@ - net6.0 + net8.0 enable enable True diff --git a/WebGPUGen/HelloTriangle/HelloTriangle.csproj b/WebGPUGen/HelloTriangle/HelloTriangle.csproj index ef37ecb..a05e4af 100644 --- a/WebGPUGen/HelloTriangle/HelloTriangle.csproj +++ b/WebGPUGen/HelloTriangle/HelloTriangle.csproj @@ -2,7 +2,7 @@ Exe - net6.0-windows + net8.0-windows7.0 true True diff --git a/WebGPUGen/WebGPUGen.sln b/WebGPUGen/WebGPUGen.sln index 46547ab..f91130f 100644 --- a/WebGPUGen/WebGPUGen.sln +++ b/WebGPUGen/WebGPUGen.sln @@ -5,19 +5,9 @@ VisualStudioVersion = 17.5.33516.290 MinimumVisualStudioVersion = 10.0.40219.1 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WebGPUGen", "WebGPUGen\WebGPUGen.csproj", "{C1653A53-2DAA-4DB7-AAE0-167A5D3F7E0C}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{66704B13-9A43-452D-9048-87CA2141B725}" - ProjectSection(SolutionItems) = preProject - ..\.gitignore = ..\.gitignore - ..\azure-pipelines-pr.yml = ..\azure-pipelines-pr.yml - ..\azure-pipelines.yml = ..\azure-pipelines.yml - ..\Directory.Build.props = ..\Directory.Build.props - ..\Generate-NuGets.ps1 = ..\Generate-NuGets.ps1 - ..\README.md = ..\README.md - EndProjectSection +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Evergine.Bindings.WebGPU", "Evergine.Bindings.WebGPU\Evergine.Bindings.WebGPU.csproj", "{EBBA34FA-0B31-4971-BB6F-FE3B055DE5D4}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Evergine.Bindings.WebGPU", "Evergine.Bindings.WebGPU\Evergine.Bindings.WebGPU.csproj", "{EBBA34FA-0B31-4971-BB6F-FE3B055DE5D4}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HelloTriangle", "HelloTriangle\HelloTriangle.csproj", "{11F45330-6F71-45A7-B08F-9A14C67F24A0}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HelloTriangle", "HelloTriangle\HelloTriangle.csproj", "{11F45330-6F71-45A7-B08F-9A14C67F24A0}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution