|
|
@@ -0,0 +1,76 @@
|
|
|
+name: Build Solution
|
|
|
+
|
|
|
+on:
|
|
|
+ push:
|
|
|
+ branches: [ v2_release, v2_develop ]
|
|
|
+ paths-ignore:
|
|
|
+ - '**.md'
|
|
|
+ pull_request:
|
|
|
+ branches: [ v2_release, v2_develop ]
|
|
|
+ paths-ignore:
|
|
|
+ - '**.md'
|
|
|
+ workflow_call:
|
|
|
+ outputs:
|
|
|
+ artifact-name:
|
|
|
+ description: "Name of the build artifacts"
|
|
|
+ value: ${{ jobs.build.outputs.artifact-name }}
|
|
|
+
|
|
|
+jobs:
|
|
|
+ build:
|
|
|
+ name: Build Debug & Release
|
|
|
+ runs-on: ubuntu-latest
|
|
|
+ outputs:
|
|
|
+ artifact-name: build-artifacts
|
|
|
+
|
|
|
+ timeout-minutes: 10
|
|
|
+ steps:
|
|
|
+
|
|
|
+ - name: Checkout code
|
|
|
+ uses: actions/checkout@v4
|
|
|
+
|
|
|
+ - name: Setup .NET Core
|
|
|
+ uses: actions/setup-dotnet@v4
|
|
|
+ with:
|
|
|
+ dotnet-version: 8.x
|
|
|
+ dotnet-quality: 'ga'
|
|
|
+
|
|
|
+ - name: Restore dependencies
|
|
|
+ run: dotnet restore
|
|
|
+
|
|
|
+ # Suppress CS0618 (member is obsolete) and CS0612 (member is obsolete without message)
|
|
|
+ # Using -property: syntax with URL-encoded semicolon (%3B) to avoid shell interpretation issues
|
|
|
+ - name: Build Debug
|
|
|
+ run: dotnet build --configuration Debug --no-restore -property:NoWarn=0618%3B0612
|
|
|
+
|
|
|
+ - name: Build Release Terminal.Gui
|
|
|
+ run: dotnet build Terminal.Gui/Terminal.Gui.csproj --configuration Release --no-incremental --force -property:NoWarn=0618%3B0612
|
|
|
+
|
|
|
+ - name: Pack Release Terminal.Gui
|
|
|
+ run: dotnet pack Terminal.Gui/Terminal.Gui.csproj --configuration Release --output ./local_packages -property:NoWarn=0618%3B0612
|
|
|
+
|
|
|
+ - name: Restore AOT and Self-Contained projects
|
|
|
+ run: |
|
|
|
+ dotnet restore ./Examples/NativeAot/NativeAot.csproj -f
|
|
|
+ dotnet restore ./Examples/SelfContained/SelfContained.csproj -f
|
|
|
+
|
|
|
+ - name: Restore Solution Packages
|
|
|
+ run: dotnet restore
|
|
|
+
|
|
|
+ - name: Build Release AOT and Self-Contained
|
|
|
+ run: |
|
|
|
+ dotnet build ./Examples/NativeAot/NativeAot.csproj --configuration Release -property:NoWarn=0618%3B0612
|
|
|
+ dotnet build ./Examples/SelfContained/SelfContained.csproj --configuration Release -property:NoWarn=0618%3B0612
|
|
|
+
|
|
|
+ - name: Build Release Solution
|
|
|
+ run: dotnet build --configuration Release --no-restore -property:NoWarn=0618%3B0612
|
|
|
+
|
|
|
+ - name: Upload build artifacts
|
|
|
+ uses: actions/upload-artifact@v4
|
|
|
+ with:
|
|
|
+ name: build-artifacts
|
|
|
+ path: |
|
|
|
+ **/bin/Debug/**
|
|
|
+ **/obj/Debug/**
|
|
|
+ **/bin/Release/**
|
|
|
+ **/obj/Release/**
|
|
|
+ retention-days: 1
|