Skip to content

Commit

Permalink
Upgrade Dotnet SDK to v8 (JeanPhilippeKernel#396)
Browse files Browse the repository at this point in the history
* Upgrade Dotnet SDK to v8

* added variable

* workflow variable

* workflow variable

* passed variable explicitly

* ohh i forgot this !

* updated readme
  • Loading branch information
jnyfah authored Nov 25, 2024
1 parent d3ecd53 commit a0fa498
Show file tree
Hide file tree
Showing 10 changed files with 67 additions and 39 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/Engine-CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@ jobs:
windows:
needs: clang-format
uses: ./.github/workflows/windows-build.yml
with:
targetFramework: net8.0

macOS:
needs: clang-format
uses: ./.github/workflows/macOS-build.yml

# linux:
# uses: ./.github/workflows/linux-build.yml
with:
targetFramework: net8.0
13 changes: 8 additions & 5 deletions .github/workflows/job-cmakebuild-macOS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ name: ZEngine macOS Workflow
on:
workflow_call:
inputs:
targetFramework:
type: string
required: true
configuration:
type: string
default: 'Debug'
Expand All @@ -29,10 +32,10 @@ jobs:
with:
name: Build-macOS-${{ inputs.architecture }}-${{inputs.configuration}}
path: |
Result.Darwin.x64.${{inputs.configuration}}/Panzerfaust/${{inputs.configuration}}/net6.0/osx-${{ inputs.architecture }}/publish/
Result.Darwin.x64.${{inputs.configuration}}/Panzerfaust/${{inputs.configuration}}/${{inputs.targetFramework}}/osx-${{ inputs.architecture }}/publish/
Result.Darwin.x64.${{inputs.configuration}}/__externals/Vulkan-Loader/loader/${{ inputs.configuration }}/
Result.Darwin.x64.${{inputs.configuration}}/ZEngine/tests/${{inputs.configuration}}/
!Result.Darwin.x64.${{inputs.configuration}}/Panzerfaust/${{inputs.configuration}}/net6.0/**/Microsoft.CodeAnalysis.CSharp.resources.dll
!Result.Darwin.x64.${{inputs.configuration}}/Panzerfaust/${{inputs.configuration}}/net6.0/**/Microsoft.CodeAnalysis.CSharp.Scripting.resources.dll
!Result.Darwin.x64.${{inputs.configuration}}/Panzerfaust/${{inputs.configuration}}/net6.0/**/Microsoft.CodeAnalysis.resources.dll
!Result.Darwin.x64.${{inputs.configuration}}/Panzerfaust/${{inputs.configuration}}/net6.0/**/Microsoft.CodeAnalysis.Scripting.resources.dll
!Result.Darwin.x64.${{inputs.configuration}}/Panzerfaust/${{inputs.configuration}}/${{inputs.targetFramework}}/**/Microsoft.CodeAnalysis.CSharp.resources.dll
!Result.Darwin.x64.${{inputs.configuration}}/Panzerfaust/${{inputs.configuration}}/${{inputs.targetFramework}}/**/Microsoft.CodeAnalysis.CSharp.Scripting.resources.dll
!Result.Darwin.x64.${{inputs.configuration}}/Panzerfaust/${{inputs.configuration}}/${{inputs.targetFramework}}/**/Microsoft.CodeAnalysis.resources.dll
!Result.Darwin.x64.${{inputs.configuration}}/Panzerfaust/${{inputs.configuration}}/${{inputs.targetFramework}}/**/Microsoft.CodeAnalysis.Scripting.resources.dll
15 changes: 9 additions & 6 deletions .github/workflows/job-cmakebuild-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ name: Windows Build Workflow
on:
workflow_call:
inputs:
targetFramework:
type: string
required: true
configuration:
type: string
default: 'Debug'
Expand All @@ -26,13 +29,13 @@ jobs:
with:
name: Build-Windows-x64-${{inputs.configuration}}
path: |
Result.Windows.x64.MultiConfig/Panzerfaust/${{inputs.configuration}}/net6.0/win-x64/publish/
Result.Windows.x64.MultiConfig/Panzerfaust/${{inputs.configuration}}/${{inputs.targetFramework}}/win-x64/publish/
Result.Windows.x64.MultiConfig/ZEngine/tests/${{inputs.configuration}}/
!Result.Windows.x64.MultiConfig/Panzerfaust/${{inputs.configuration}}/net6.0/**/Microsoft.CodeAnalysis.CSharp.resources.dll
!Result.Windows.x64.MultiConfig/Panzerfaust/${{inputs.configuration}}/net6.0/**/Microsoft.CodeAnalysis.CSharp.Scripting.resources.dll
!Result.Windows.x64.MultiConfig/Panzerfaust/${{inputs.configuration}}/net6.0/**/Microsoft.CodeAnalysis.resources.dll
!Result.Windows.x64.MultiConfig/Panzerfaust/${{inputs.configuration}}/net6.0/**/Microsoft.CodeAnalysis.Scripting.resources.dll
!Result.Windows.x64.MultiConfig/Panzerfaust/${{inputs.configuration}}/net6.0/**/createdump.exe
!Result.Windows.x64.MultiConfig/Panzerfaust/${{inputs.configuration}}/${{inputs.targetFramework}}/**/Microsoft.CodeAnalysis.CSharp.resources.dll
!Result.Windows.x64.MultiConfig/Panzerfaust/${{inputs.configuration}}/${{inputs.targetFramework}}/**/Microsoft.CodeAnalysis.CSharp.Scripting.resources.dll
!Result.Windows.x64.MultiConfig/Panzerfaust/${{inputs.configuration}}/${{inputs.targetFramework}}/**/Microsoft.CodeAnalysis.resources.dll
!Result.Windows.x64.MultiConfig/Panzerfaust/${{inputs.configuration}}/${{inputs.targetFramework}}/**/Microsoft.CodeAnalysis.Scripting.resources.dll
!Result.Windows.x64.MultiConfig/Panzerfaust/${{inputs.configuration}}/${{inputs.targetFramework}}/**/createdump.exe
- name: Publish Vulkan Build Artifacts
if: ${{ inputs.configuration == 'Release'}}
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/job-deploy-macOS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ name: macOS Deploy Workflow
on:
workflow_call:
inputs:
targetFramework:
type: string
required: true
configuration:
type: string
default: 'Release'
Expand All @@ -26,4 +29,4 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: macOS-${{ inputs.architecture }}-${{ inputs.configuration }}
path: Result.Darwin.x64.${{ inputs.configuration }}/Panzerfaust/${{ inputs.configuration }}/net6.0/osx-${{ inputs.architecture }}/publish/
path: Result.Darwin.x64.${{ inputs.configuration }}/Panzerfaust/${{ inputs.configuration }}/${{inputs.targetFramework}}/osx-${{ inputs.architecture }}/publish/
5 changes: 4 additions & 1 deletion .github/workflows/job-deploy-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ name: Windows Deploy Workflow
on:
workflow_call:
inputs:
targetFramework:
type: string
required: true
configuration:
type: string
default: 'Release'
Expand All @@ -23,4 +26,4 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: Windows-x64-${{ inputs.configuration }}
path: Result.Windows.x64.MultiConfig/Panzerfaust/${{ inputs.configuration }}/net6.0/win-x64/publish/
path: Result.Windows.x64.MultiConfig/Panzerfaust/${{ inputs.configuration }}/${{inputs.targetFramework}}/win-x64/publish/
9 changes: 8 additions & 1 deletion .github/workflows/macOS-build.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
name: ZEngine macOS Build

on: workflow_call
on:
workflow_call:
inputs:
targetFramework:
type: string
required: true

jobs:
cmake-build:
Expand All @@ -12,6 +17,7 @@ jobs:
with:
configuration: ${{matrix.buildConfiguration}}
architecture: ${{ matrix.architecture }}
targetFramework: ${{inputs.targetFramework}}

test:
needs: cmake-build
Expand All @@ -33,3 +39,4 @@ jobs:
with:
configuration: Release
architecture: ${{ matrix.architecture }}
targetFramework: ${{inputs.targetFramework}}
11 changes: 9 additions & 2 deletions .github/workflows/windows-build.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
name: ZEngine Window Build

on: workflow_call
on:
workflow_call:
inputs:
targetFramework:
type: string
required: true

jobs:
cmake-build:
Expand All @@ -10,6 +15,7 @@ jobs:
uses: ./.github/workflows/job-cmakebuild-windows.yml
with:
configuration: ${{matrix.buildConfiguration}}
targetFramework: ${{inputs.targetFramework}}

test:
needs: cmake-build
Expand All @@ -24,4 +30,5 @@ jobs:
needs: test
uses: ./.github/workflows/job-deploy-windows.yml
with:
configuration: Release
configuration: Release
targetFramework: ${{inputs.targetFramework}}
22 changes: 11 additions & 11 deletions Panzerfaust/Panzerfaust.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<AvaloniaUseCompiledBindingsByDefault>true</AvaloniaUseCompiledBindingsByDefault>
Expand Down Expand Up @@ -61,21 +61,21 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Avalonia" Version="11.2.0" />
<PackageReference Include="Avalonia.Desktop" Version="11.2.0" />
<PackageReference Include="Avalonia.ReactiveUI" Version="11.2.0" />
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.2.0" />
<PackageReference Include="Avalonia.Fonts.Inter" Version="11.2.0" />
<PackageReference Include="Avalonia" Version="11.2.1" />
<PackageReference Include="Avalonia.Desktop" Version="11.2.1" />
<PackageReference Include="Avalonia.ReactiveUI" Version="11.2.1" />
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.2.1" />
<PackageReference Include="Avalonia.Fonts.Inter" Version="11.2.1" />
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.3.2" />
<PackageReference Include="Avalonia.Controls.ItemsRepeater" Version="11.1.4" />
<PackageReference Include="Avalonia.Controls.DataGrid" Version="11.2.0" />
<PackageReference Include="Avalonia.Controls.ItemsRepeater" Version="11.1.5" />
<PackageReference Include="Avalonia.Controls.DataGrid" Version="11.2.1" />


<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.2.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.1" />
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.2.1" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="9.0.0" />
<PackageReference Include="LiveChartsCore.SkiaSharpView.Avalonia" Version="2.0.0-rc2" />
<PackageReference Include="Microsoft.Extensions.Http" Version="8.0.1" />
<PackageReference Include="Microsoft.Extensions.Http" Version="9.0.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="System.Text.Json" Version="9.0.0" />

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Before building, make sure your setup is correct :
- Install [PowerShell Core](https://github.com/PowerShell/PowerShell/releases)
- Install [Python](https://www.python.org/ftp/python/3.12.4/python-3.12.4-amd64.exe)
- Install [CMake](https://cmake.org/download/) 3.20 or later.
- Install [DOTNET SDK 6](https://dotnet.microsoft.com/en-us/download/dotnet/6.0)
- Install [DOTNET SDK 8](https://dotnet.microsoft.com/en-us/download/dotnet/8.0)
- Install [LLVM](https://github.com/llvm/llvm-project/releases/download/llvmorg-18.1.8/LLVM-18.1.8-win64.exe)

### Setup macOS machine
Expand Down Expand Up @@ -52,7 +52,7 @@ Before building, make sure your setup is correct :
brew update
brew install --cask powershell
```
- Install [DOTNET SDK 6](https://dotnet.microsoft.com/en-us/download/dotnet/6.0)
- Install [DOTNET SDK 8](https://dotnet.microsoft.com/en-us/download/dotnet/8.0)

- Install ClangFormat through Homebrew:
```bash
Expand Down
15 changes: 8 additions & 7 deletions Scripts/PostBuild.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ param (
)

$ErrorActionPreference = "Stop"
$TargetFramework = 'net8.0'

[string]$RepoRoot = [IO.Path]::Combine($PSScriptRoot, "..")
[string]$OuputBuildDirectory = If($IsWindows) {
Expand Down Expand Up @@ -83,26 +84,26 @@ $ContentsToProcess = @(
Contents = @(
switch ($SystemName) {
"Windows" {
@{ From = "$OuputBuildDirectory\Tetragrama\$Configurations"; To = "$OuputBuildDirectory\Panzerfaust\$Configurations\net6.0\Editor"}
@{ From = "$OuputBuildDirectory\Tetragrama\$Configurations"; To = "$OuputBuildDirectory\Panzerfaust\$Configurations\net6.0\$Architectures\publish\Editor"}
@{ From = "$OuputBuildDirectory\Tetragrama\$Configurations"; To = "$OuputBuildDirectory\Panzerfaust\$Configurations\$TargetFramework\Editor"}
@{ From = "$OuputBuildDirectory\Tetragrama\$Configurations"; To = "$OuputBuildDirectory\Panzerfaust\$Configurations\$TargetFramework\$Architectures\publish\Editor"}
}
"Darwin" {
switch ($Architectures) {
"osx-x64" {
@{ From = "$OuputBuildDirectory\Tetragrama\$Configurations"; To = "$OuputBuildDirectory\Panzerfaust\$Configurations\net6.0\$Architectures\Editor"}
@{ From = "$OuputBuildDirectory\Tetragrama\$Configurations"; To = "$OuputBuildDirectory\Panzerfaust\$Configurations\net6.0\$Architectures\publish\Editor"}
@{ From = "$OuputBuildDirectory\Tetragrama\$Configurations"; To = "$OuputBuildDirectory\Panzerfaust\$Configurations\$TargetFramework\$Architectures\Editor"}
@{ From = "$OuputBuildDirectory\Tetragrama\$Configurations"; To = "$OuputBuildDirectory\Panzerfaust\$Configurations\$TargetFramework\$Architectures\publish\Editor"}
}
"osx-arm64" {
@{ From = "$OuputBuildDirectory\Tetragrama\$Configurations"; To = "$OuputBuildDirectory\Panzerfaust\$Configurations\net6.0\$Architectures\Editor"}
@{ From = "$OuputBuildDirectory\Tetragrama\$Configurations"; To = "$OuputBuildDirectory\Panzerfaust\$Configurations\net6.0\$Architectures\publish\Editor"}
@{ From = "$OuputBuildDirectory\Tetragrama\$Configurations"; To = "$OuputBuildDirectory\Panzerfaust\$Configurations\$TargetFramework\$Architectures\Editor"}
@{ From = "$OuputBuildDirectory\Tetragrama\$Configurations"; To = "$OuputBuildDirectory\Panzerfaust\$Configurations\$TargetFramework\$Architectures\publish\Editor"}
}
Default {
throw 'This architecture is not supported'
}
}
}
"Linux" {
@{ From = "$OuputBuildDirectory\Tetragrama\$Configurations"; To = "$OuputBuildDirectory\Panzerfaust\$Configurations\net6.0\Editor"}
@{ From = "$OuputBuildDirectory\Tetragrama\$Configurations"; To = "$OuputBuildDirectory\Panzerfaust\$Configurations\$TargetFramework\Editor"}
}
Default {
throw 'This system is not supported'
Expand Down

0 comments on commit a0fa498

Please sign in to comment.