🤘 2022 #91
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] | |
pull_request: | |
branches: [master] | |
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/[email protected] | |
- name: Check out repo | |
uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- name: Install Mono | |
shell: cmd | |
run: choco install mono | |
- name: Setup dotnet | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: "5.0.100" | |
- name: change dirs | |
run: | | |
ls | |
- name: Generate third party solutions | |
shell: cmd | |
run: | | |
cd Engine/ThirdParty | |
call GenerateSolutions.bat | |
cd ../../ | |
- name: Generate a Game project | |
shell: cmd | |
run: cd Project && call GenerateSolution.bat && cd ../ | |
- name: Compile Tools | |
if: ${{ matrix.buildconfig == 'Game_Win64' }} | |
shell: cmd | |
run: msbuild Stack.sln /property:Configuration="Editor_Release" | |
- name: Compile Project | |
shell: cmd | |
run: msbuild Stack.sln /property:Configuration="${{matrix.buildconfig}}" | |
- name: Copy Assets | |
shell: cmd | |
run: call CopyAssets.bat | |
- name: Copy Editor Assets | |
shell: cmd | |
continue-on-error: true | |
run: | | |
robocopy ".build/Release/Assets" ".build\\Editor_Release\\Assets" *.* /w:0 /r:1 /v /E | |
robocopy "Engine/Tools" ".build\\Editor_Release\\Engine\\Tools" *.* /w:0 /r:1 /v /E | |
- name: Archive Editor | |
if: ${{ matrix.buildconfig == 'Editor_Release' }} | |
uses: actions/upload-artifact@v2 | |
with: | |
name: Stack v${{github.run_number}} - Editor | |
path: | | |
.build/${{matrix.buildconfig}} | |
!.build/${{matrix.buildconfig}}/AppX | |
!.build/${{matrix.buildconfig}}/Tools/**/*.* | |
!.build/${{matrix.buildconfig}}/*.lib | |
!.build/${{matrix.buildconfig}}/*.pdb | |
!.build/${{matrix.buildconfig}}/*.exp | |
!.build/${{matrix.buildconfig}}/*.log | |
.build/${{matrix.buildconfig}}/Tools/Optick.exe | |
.build/${{matrix.buildconfig}}/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: cmd | |
continue-on-error: true | |
run: | | |
robocopy ".build/Editor_Release/Assets" ".build\\Game_Win64\\Assets" *.* /w:0 /r:1 /v /E | |
- name: Archive Build | |
if: ${{ matrix.buildconfig == 'Game_Win64' }} | |
uses: actions/upload-artifact@v2 | |
with: | |
name: Stack v${{github.run_number}} - ${{matrix.buildconfig}} | |
path: | | |
.build/${{matrix.buildconfig}} | |
.build/${{matrix.buildconfig}}/Assets | |
!.build/${{matrix.buildconfig}}/AppX | |
!.build/${{matrix.buildconfig}}/*.lib | |
!.build/${{matrix.buildconfig}}/*.pdb | |
!.build/${{matrix.buildconfig}}/*.exp | |
!.build/${{matrix.buildconfig}}/*.log | |
!.build/${{matrix.buildconfig}}/**/*.png | |
!.build/${{matrix.buildconfig}}/**/*.jpg | |
!.build/${{matrix.buildconfig}}/**/*.frag | |
!.build/${{matrix.buildconfig}}/**/*.vert | |
!.build/${{matrix.buildconfig}}/**/*.var | |
!.build/${{matrix.buildconfig}}/**/*.sh | |
- name: Copy Tools Assets | |
shell: cmd | |
continue-on-error: true | |
run: | | |
robocopy "Engine/Tools/HUB/Assets" ".build\\Editor_Release\\Assets" *.* /w:0 /r:1 /v /E | |
robocopy "Engine/Tools/HUB" ".build\\Editor_Release" *.exe /w:0 /r:1 /v /E | |
- name: Archive Tools | |
if: ${{ matrix.buildconfig == 'Editor_Release' }} | |
uses: actions/upload-artifact@v2 | |
with: | |
name: HUB v${{github.run_number}} | |
path: | | |
.build/${{matrix.buildconfig}}/HUB.exe | |
.build/${{matrix.buildconfig}}/Assets/Close.png | |
.build/${{matrix.buildconfig}}/Assets/Minimize.png | |
.build/${{matrix.buildconfig}}/Assets/VS.png | |
.build/${{matrix.buildconfig}}/Assets/LOGO.png | |
.build/${{matrix.buildconfig}}/shaderc.exe | |
.build/${{matrix.buildconfig}}/texturec.exe | |
.build/${{matrix.buildconfig}}/*.dll | |
!.build/${{matrix.buildconfig}}/AppX | |
!.build/${{matrix.buildconfig}}/Tools/**/*.* | |
!.build/${{matrix.buildconfig}}/*.lib | |
!.build/${{matrix.buildconfig}}/*.pdb | |
!.build/${{matrix.buildconfig}}/*.exp | |
!.build/${{matrix.buildconfig}}/*.log | |
.build/${{matrix.buildconfig}}/Tools/Optick.exe | |
.build/${{matrix.buildconfig}}/Tools/Win64/*.* |