-
-
Notifications
You must be signed in to change notification settings - Fork 53
301 lines (291 loc) · 8.39 KB
/
build.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
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
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
name: build
on: [push]
jobs:
Emscripten:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Install Dependencies
shell: cmd
run: |
git clone https://github.com/emscripten-core/emsdk.git
cd emsdk
call emsdk.bat install latest-upstream
call emsdk.bat activate latest-upstream
cd ..
- name: Download SDL2
run: C:\msys64\usr\bin\wget.exe -O SDL2-version_22.zip -q https://github.com/emscripten-ports/SDL2/archive/version_22.zip
- name: Install SDL2
run: |
mkdir InstallLibs
mkdir InstallLibs\include
mkdir InstallLibs\include\SDL2
7z x SDL2-version_22.zip -oInstallLibs
copy InstallLibs\SDL2-version_22\include\*.* InstallLibs\include\SDL2
- name: Build
shell: cmd
run: |
cd Assets
python BuildAssetBundles.py
cd ..
mkdir Bin\BuiltIn
copy Bin\BuiltIn.zip Bin\BuiltIn
call emsdk\emsdk_env.bat
cmake -DCMAKE_TOOLCHAIN_FILE=emsdk\upstream\emscripten\cmake\Modules\Platform\Emscripten.cmake -S . -B ./PrjEmscripten -G "MinGW Makefiles" -DCMAKE_SH="CMAKE_SH-NOTFOUND"
mingw32-make -C PrjEmscripten
- name: Package
shell: cmd
run: |
mkdir Build
type Version.txt
set /p CONFIG_VERSION=<Version.txt
set file_version=%CONFIG_VERSION:.=_%
set output=SkylichtDemo_%file_version%_Emscripten.zip
dir Bin
#- name: Result
# uses: actions/upload-artifact@v1
# with:
# name: SkylichtDemo_Emscripten
# path: Build
# Universal_Windows_Platform:
# runs-on: windows-latest
# steps:
# - uses: actions/checkout@v1
# - name: Build
# shell: cmd
# run: |
# cd Assets
# python BuildAssetBundles.py
# cd ..
# mkdir PrjUWP
# mkdir PrjUWP\Projects
# cmake -S . -B ./PrjUWP -G "Visual Studio 16 2019" -A x64 -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION=10.0
# cmake --build ./PrjUWP --config "Release"
Linux-Static:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Dependencies
run: |
sudo apt-get update -y -qq
sudo apt-get install -y libglfw3-dev libopenal-dev libx11-dev
- name: Build
run: |
cmake -S. -BPrjLinux
cd Assets
python BuildAssetBundles.py
cd ..
make -C PrjLinux
- name: Unit Test
run: |
cd PrjLinux
ctest
cd ..
- name: Package
run: |
mkdir Build
ls -l Bin
version=$(cat "Version.txt")
file_version=${version//./_}
output=../Build/SkylichtDemo_${file_version}_Linux.zip
#- name: Result
# uses: actions/upload-artifact@v1
# with:
# name: SkylichtDemo_Linux
# path: Build
Linux-Shared:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Dependencies
run: |
sudo apt-get update -y -qq
sudo apt-get install -y libglfw3-dev libopenal-dev libx11-dev
- name: Build
run: |
cmake -S. -BPrjLinux -DBUILD_SHARED_LIBS=ON
cd Assets
python BuildAssetBundles.py
cd ..
make -C PrjLinux
- name: Unit Test
run: |
cd PrjLinux
ctest
cd ..
- name: Package
run: |
mkdir Build
ls -l Bin
version=$(cat "Version.txt")
file_version=${version//./_}
output=../Build/SkylichtDemo_${file_version}_Linux.zip
#- name: Result
# uses: actions/upload-artifact@v1
# with:
# name: SkylichtDemo_Linux_Shared
# path: Build
MacOS:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: Restore LFS cache
uses: actions/cache@v3
id: lfs-macos-cache
with:
path: .git/lfs
key: lfs-macos-cache-v1
- name: Git LFS Pull
run: git lfs pull
- name: Build
run: |
brew install libomp
cd Assets
python BuildAssetBundles.py
cd ..
cmake -S . -B ./PrjMac -G Xcode -DCMAKE_OSX_ARCHITECTURES=x86_64
cd PrjMac
xcodebuild -configuration Release
cd ..
- name: Unit Test
run: |
cd PrjMac
ctest -C Release
cat Testing/Temporary/LastTest.log
cd ..
- name: Package
run: |
mkdir Build
ls -l Bin/Release
version=$(cat "Version.txt")
file_version=${version//./_}
output=SkylichtDemo_${file_version}_MacOS.zip
#- name: Result
# uses: actions/upload-artifact@v1
# with:
# name: SkylichtDemo_MacOS
# path: Build
IOS:
runs-on: macos-latest
env:
PLATFORM: SIMULATORARM64
steps:
- uses: actions/checkout@v2
- name: Restore LFS cache
uses: actions/cache@v3
id: lfs-ios-cache
with:
path: .git/lfs
key: lfs-ios-cache-v1
- name: Git LFS Pull
run: git lfs pull
- name: Build
run: |
cd Assets
chmod +x ../Tools/PVRTexTool/darwin/PVRTexToolCLI
pip install tinydb
pip install Pillow
python BuildTextureCompressETC.py
python BuildAssetBundles.py
cd ..
cmake -S . -B ./PrjIOS -G Xcode -DCMAKE_TOOLCHAIN_FILE=./ios.cmake -DPLATFORM=${PLATFORM}
cd PrjIOS
cmake --build . --config "Release"
cd ..
- name: Package
run: |
ls -l Bin/${PLATFORM}/Release
version=$(cat "Version.txt")
file_version=${version//./_}
output=SkylichtDemo_${file_version}_IOS.zip
#- name: Result
# uses: actions/upload-artifact@v1
# with:
# name: SkylichtDemo_IOS
# path: Build
Windows-Static:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Build
shell: cmd
run: |
cd Assets
python BuildAssetBundles.py
cd ..
cmake -S . -B ./PrjVisualStudio -G "Visual Studio 17 2022" -A x64
cmake --build ./PrjVisualStudio --config "Release"
- name: Unit Test
run: |
cd PrjVisualStudio
ctest -C Release
cat Testing/Temporary/LastTest.log
cd ..
- name: Package
run: |
dir Bin\Release
Windows-Shared:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Build
shell: cmd
run: |
cd Assets
python BuildAssetBundles.py
cd ..
cmake -S . -B ./PrjVisualStudio -G "Visual Studio 17 2022" -A x64 -DBUILD_SHARED_LIBS=ON
cmake --build ./PrjVisualStudio --config "Release"
- name: Unit Test
run: |
cd PrjVisualStudio
ctest -C Release
cat Testing/Temporary/LastTest.log
cd ..
- name: Package
run: |
dir Bin\Release
Windows-Shared-Smallest:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Build Bundles
shell: cmd
run: |
cd Assets
python BuildAssetBundles.py
cd ..
- name: Generate Project
run: >-
cmake
-S .
-B ./PrjVisualStudio
-G "Visual Studio 17 2022"
-A x64
-DBUILD_SHARED_LIBS=ON
-DBUILD_IMGUI=OFF
-DBUILD_FREETYPE=OFF
-DBUILD_SKYLICHT_AUDIO=OFF
-DBUILD_SKYLICHT_COMPONENTS=OFF
-DBUILD_SKYLICHT_COLLISION=OFF
-DBUILD_SKYLICHT_UI=OFF
-DBUILD_SKYLICHT_CRYPTO=OFF
-DBUILD_SKYLICHT_NETWORK=OFF
-DBUILD_SKYLICHT_PHYSIC=OFF
-DBUILD_SPINE_RUNTIMES=OFF
-DBUILD_SKYLICHT_GRAPH=OFF
-DBUILD_EXAMPLES=OFF
-DBUILD_EDITOR_TOOL=OFF
-DBUILD_EDITOR_GUI_LIB=OFF
- name: Build Project
run: |
cmake --build ./PrjVisualStudio --config "Release"
- name: Unit Test
run: |
cd PrjVisualStudio
ctest -C Release
cat Testing/Temporary/LastTest.log
cd ..
- name: Package
run: |
dir Bin\Release