-
Notifications
You must be signed in to change notification settings - Fork 1
179 lines (154 loc) · 4.84 KB
/
windows-x64.yml
File metadata and controls
179 lines (154 loc) · 4.84 KB
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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
name: Windows x64
on:
push:
branches: [ "**" ]
pull_request:
jobs:
build-debug:
name: Build Debug
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
path: repository
submodules: recursive
- name: Clean submodules (Local)
shell: pwsh
run: |
cd repository
git submodule foreach --recursive git reset --hard
git submodule foreach --recursive git clean -fdx
git submodule sync --recursive
git submodule update --init --force --recursive
- name: Setup MSBuild
uses: microsoft/setup-msbuild@v2
- name: Clone vcpkg
shell: pwsh
run: |
if (-not (Test-Path "vcpkg")) {
git clone https://github.com/microsoft/vcpkg.git
}
- name: Bootstrap vcpkg
shell: pwsh
run: |
.\vcpkg\bootstrap-vcpkg.bat
- name: Integrate vcpkg
shell: pwsh
run: .\vcpkg\vcpkg integrate install
- name: Install dependencies
shell: pwsh
run: |
$content = Get-Content repository/interstellar/vcpkg.conf | Out-String
$packages = $content.Split(" ", [System.StringSplitOptions]::RemoveEmptyEntries)
foreach ($package in $packages) {
$trim = $package.Trim()
Write-Host "Installing package: '$trim'"
.\vcpkg\vcpkg install $trim --triplet x64-windows-static
}
env:
VCPKG_DEFAULT_TRIPLET: x64-windows-static
- name: Install Premake5
shell: pwsh
run: |
if (-Not (Test-Path premake-core)) {
git clone --depth=1 https://github.com/premake/premake-core.git
}
cd premake-core
.\Bootstrap.bat vs2022
Move-Item .\bin\release\premake5.exe ..\repository\
cd ..
- name: Initialize Premake
shell: pwsh
run: |
cd repository
.\premake5.exe vs2022
cd ..
env:
VCPKG_ROOT: ${{ github.workspace }}/vcpkg
- name: Build
shell: pwsh
run: |
cd repository\build
msbuild interstellar.sln /p:Configuration=Debug /p:Platform=x64
cd ..\..
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: debug_x64_windows
path: repository\bin\x64\Debug\*
if-no-files-found: warn
build-release:
name: Build Release
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
path: repository
submodules: recursive
- name: Clean submodules (Local)
shell: pwsh
run: |
cd repository
git submodule foreach --recursive git reset --hard
git submodule foreach --recursive git clean -fdx
git submodule sync --recursive
git submodule update --init --force --recursive
- name: Setup MSBuild
uses: microsoft/setup-msbuild@v2
- name: Clone vcpkg
shell: pwsh
run: |
if (-not (Test-Path "vcpkg")) {
git clone https://github.com/microsoft/vcpkg.git
}
- name: Bootstrap vcpkg
shell: pwsh
run: |
.\vcpkg\bootstrap-vcpkg.bat
- name: Integrate vcpkg
shell: pwsh
run: .\vcpkg\vcpkg integrate install
- name: Install dependencies
shell: pwsh
run: |
$content = Get-Content repository/interstellar/vcpkg.conf | Out-String
$packages = $content.Split(" ", [System.StringSplitOptions]::RemoveEmptyEntries)
foreach ($package in $packages) {
$trim = $package.Trim()
Write-Host "Installing package: '$trim'"
.\vcpkg\vcpkg install $trim --triplet x64-windows-static
}
env:
VCPKG_DEFAULT_TRIPLET: x64-windows-static
- name: Install Premake5
shell: pwsh
run: |
if (-Not (Test-Path premake-core)) {
git clone --depth=1 https://github.com/premake/premake-core.git
}
cd premake-core
.\Bootstrap.bat vs2022
Move-Item .\bin\release\premake5.exe ..\repository\
cd ..
- name: Initialize Premake
shell: pwsh
run: |
cd repository
.\premake5.exe vs2022
cd ..
env:
VCPKG_ROOT: ${{ github.workspace }}/vcpkg
- name: Build
shell: pwsh
run: |
cd repository\build
msbuild interstellar.sln /p:Configuration=Release /p:Platform=x64
cd ..\..
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: release_x64_windows
path: repository\bin\x64\Release\*
if-no-files-found: warn