-
Notifications
You must be signed in to change notification settings - Fork 4
106 lines (90 loc) · 3.67 KB
/
UWP.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
name: UWP
on:
push:
branches: [master, motivation]
pull_request:
branches: [master, motivation]
workflow_dispatch:
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-2022]
configuration:
- Debug
- Release
- Retail
type:
- Game_UWP
include:
- os: windows-2022
shell: cmd
compiler: cl
target: Windows
steps:
- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@v2
- 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: Generate a new project
shell: cmd
run: cd Project && call GenerateSolution.bat && cd ../
- name: Compile Tools
shell: cmd
run: msbuild EmptyProject.sln /property:Configuration="Editor_Release"
- name: Compile Project
shell: cmd
run: msbuild EmptyProject.sln /property:Configuration="${{matrix.type}}_${{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\\Tools" Optick.exe /w:0 /r:1 /v /E ; if ($lastexitcode -lt 8) { $global:LASTEXITCODE = $null }
robocopy "Engine/Tools/Win64" ".build\\Editor_Release\\Tools\\Win64" *.* /w:0 /r:1 /v /E ; if ($lastexitcode -lt 8) { $global:LASTEXITCODE = $null }
- name: Cook Assets
shell: cmd
run: |
cd ".build/Editor_Release/"
call Havana.exe -CompileAssets
cd ../../
- name: Copy Cooked Assets
shell: pwsh
continue-on-error: true
run: |
robocopy ".build/Editor_Release/Assets" ".build\\${{matrix.type}}_${{matrix.configuration}}\\Assets" *.* /w:0 /r:1 /v /E ; if ($lastexitcode -lt 8) { $global:LASTEXITCODE = $null }
- name: Archive Build
uses: actions/upload-artifact@v4
with:
name: Heap v${{github.run_number}} - ${{matrix.type}} - ${{matrix.configuration}}
path: |
.build/${{matrix.type}}_${{matrix.configuration}}
.build/${{matrix.type}}_${{matrix.configuration}}/Assets
!.build/${{matrix.type}}_${{matrix.configuration}}/*.lib
!.build/${{matrix.type}}_${{matrix.configuration}}/*.pdb
!.build/${{matrix.type}}_${{matrix.configuration}}/*.exp
!.build/${{matrix.type}}_${{matrix.configuration}}/*.log
!.build/${{matrix.type}}_${{matrix.configuration}}/**/*.png
!.build/${{matrix.type}}_${{matrix.configuration}}/**/*.jpg
!.build/${{matrix.type}}_${{matrix.configuration}}/**/*.frag
!.build/${{matrix.type}}_${{matrix.configuration}}/**/*.vert
!.build/${{matrix.type}}_${{matrix.configuration}}/**/*.var
!.build/${{matrix.type}}_${{matrix.configuration}}/**/*.sh