🤏 Small fixes #348
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Windows | |
on: | |
push: | |
branches: [master, motivation] | |
pull_request: | |
branches: [master, motivation] | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [windows-2022] | |
buildconfig: [Game_Win64, Editor] | |
configuration: | |
- Debug | |
- Release | |
- Retail | |
include: | |
- os: windows-2022 | |
shell: cmd | |
compiler: cl | |
target: Windows | |
steps: | |
- name: Add MSBuild to PATH | |
uses: microsoft/setup-msbuild@v2 | |
with: | |
msbuild-architecture: x64 | |
- name: Install Mono | |
shell: cmd | |
run: choco install mono --ignore-checksums | |
- name: Setup dotnet | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: "5.0.100" | |
- uses: suisei-cn/actions-download-file@818d6b7dc8fe73f2f924b6241f2b1134ca1377d9 # 1.6.0 | |
id: downloadfile | |
name: Grab the project setup file | |
with: | |
url: "https://raw.githubusercontent.com/wobbier/MitchEngine/${{github.ref_name}}/Tools/NewProjectSetup.bat" | |
target: ./ | |
- name: Generate a new project | |
shell: cmd | |
run: call NewProjectSetup.bat EmptyProject ${{github.ref_name}} | |
- name: Compile Tools | |
if: ${{ matrix.buildconfig == 'Game_Win64' }} | |
shell: cmd | |
run: msbuild EmptyProject.sln /property:Configuration="Editor_Release" | |
- name: Compile Project | |
shell: cmd | |
run: msbuild EmptyProject.sln /property:Configuration="${{matrix.buildconfig}}_${{matrix.configuration}}" | |
- name: Copy Assets | |
shell: cmd | |
run: call CopyAssets.bat | |
- name: Copy Editor Assets | |
shell: pwsh | |
continue-on-error: true | |
run: | | |
robocopy ".build/Release/Assets" ".build\\Editor_Release\\Assets" *.* /w:0 /r:1 /v /E ; if ($lastexitcode -lt 8) { $global:LASTEXITCODE = $null } | |
robocopy "Engine/Tools" ".build\\Editor_Release\\Engine\\Tools" *.* /w:0 /r:1 /v /E ; if ($lastexitcode -lt 8) { $global:LASTEXITCODE = $null } | |
- name: Archive Editor | |
if: ${{ matrix.buildconfig == 'Editor' }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: EmptyProject v${{github.run_number}} - Editor ${{ matrix.configuration }} | |
path: | | |
.build/${{matrix.buildconfig}}_${{matrix.configuration}} | |
!.build/${{matrix.buildconfig}}_${{matrix.configuration}}/AppX | |
!.build${{matrix.buildconfig}}_${{matrix.configuration}}/Tools/**/*.* | |
!.build${{matrix.buildconfig}}_${{matrix.configuration}}/*.lib | |
!.build${{matrix.buildconfig}}_${{matrix.configuration}}/*.pdb | |
!.build${{matrix.buildconfig}}_${{matrix.configuration}}/*.exp | |
!.build${{matrix.buildconfig}}_${{matrix.configuration}}/*.log | |
.build/${{matrix.buildconfig}}_${{matrix.configuration}}/Tools/Optick.exe | |
.build/${{matrix.buildconfig}}_${{matrix.configuration}}/Tools/Win64/*.* | |
- name: Cook Assets | |
if: ${{ matrix.buildconfig == 'Game_Win64' }} | |
shell: cmd | |
run: | | |
cd ".build/Editor_Release/" | |
call Havana.exe -CompileAssets | |
cd ../../ | |
- name: Copy Cooked Assets | |
if: ${{ matrix.buildconfig == 'Game_Win64' }} | |
shell: pwsh | |
continue-on-error: true | |
run: | | |
robocopy ".build/Editor_Release/Assets" ".build\\Game_Win64_${{matrix.configuration}}\\Assets" *.* /w:0 /r:1 /v /E ; if ($lastexitcode -lt 8) { $global:LASTEXITCODE = $null } | |
- name: Archive Build | |
if: ${{ matrix.buildconfig == 'Game_Win64' }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: EmptyProject v${{github.run_number}} - ${{matrix.buildconfig}}_${{matrix.configuration}} | |
path: | | |
.build/${{matrix.buildconfig}}_${{matrix.configuration}} | |
.build/${{matrix.buildconfig}}_${{matrix.configuration}}/Assets | |
!.build/${{matrix.buildconfig}}_${{matrix.configuration}}/AppX | |
!.build/${{matrix.buildconfig}}_${{matrix.configuration}}/*.lib | |
!.build/${{matrix.buildconfig}}_${{matrix.configuration}}/*.pdb | |
!.build/${{matrix.buildconfig}}_${{matrix.configuration}}/*.exp | |
!.build/${{matrix.buildconfig}}_${{matrix.configuration}}/*.log | |
!.build/${{matrix.buildconfig}}_${{matrix.configuration}}/**/*.png | |
!.build/${{matrix.buildconfig}}_${{matrix.configuration}}/**/*.jpg | |
!.build/${{matrix.buildconfig}}_${{matrix.configuration}}/**/*.frag | |
!.build/${{matrix.buildconfig}}_${{matrix.configuration}}/**/*.vert | |
!.build/${{matrix.buildconfig}}_${{matrix.configuration}}/**/*.var | |
!.build/${{matrix.buildconfig}}_${{matrix.configuration}}/**/*.sh | |
- name: Copy Tools Assets | |
shell: pwsh | |
continue-on-error: true | |
run: | | |
robocopy "Engine/Tools/HUB/Assets" ".build\\Editor_Release\\Assets" *.* /w:0 /r:1 /v /E ; if ($lastexitcode -lt 8) { $global:LASTEXITCODE = $null } | |
robocopy "Engine/Tools/HUB" ".build\\Editor_Release" *.exe /w:0 /r:1 /v /E ; if ($lastexitcode -lt 8) { $global:LASTEXITCODE = $null } | |
- name: Archive Tools | |
if: ${{ matrix.buildconfig == 'Editor' }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: HUB v${{github.run_number}} ${{ matrix.configuration }} | |
path: | | |
.build/${{matrix.buildconfig}}_${{matrix.configuration}}/HUB.exe | |
.build/${{matrix.buildconfig}}_${{matrix.configuration}}/Assets/Close.png | |
.build/${{matrix.buildconfig}}_${{matrix.configuration}}/Assets/Minimize.png | |
.build/${{matrix.buildconfig}}_${{matrix.configuration}}/Assets/VS.png | |
.build/${{matrix.buildconfig}}_${{matrix.configuration}}/Assets/GEN.png | |
.build/${{matrix.buildconfig}}_${{matrix.configuration}}/Assets/LOGO.png | |
.build/${{matrix.buildconfig}}_${{matrix.configuration}}/shaderc.exe | |
.build/${{matrix.buildconfig}}_${{matrix.configuration}}/texturec.exe | |
.build/${{matrix.buildconfig}}_${{matrix.configuration}}/*.dll | |
!.build/${{matrix.buildconfig}}_${{matrix.configuration}}/AppX | |
!.build/${{matrix.buildconfig}}_${{matrix.configuration}}/Tools/**/*.* | |
!.build/${{matrix.buildconfig}}_${{matrix.configuration}}/*.lib | |
!.build/${{matrix.buildconfig}}_${{matrix.configuration}}/*.pdb | |
!.build/${{matrix.buildconfig}}_${{matrix.configuration}}/*.exp | |
!.build/${{matrix.buildconfig}}_${{matrix.configuration}}/*.log | |
.build/${{matrix.buildconfig}}_${{matrix.configuration}}/Tools/Optick.exe | |
.build/${{matrix.buildconfig}}_${{matrix.configuration}}/Tools/Win64/*.* |