-
-
Notifications
You must be signed in to change notification settings - Fork 362
365 lines (356 loc) · 13.5 KB
/
Copy pathmacos.yml
File metadata and controls
365 lines (356 loc) · 13.5 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
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
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
name: Mac OS Builds
on:
push:
workflow_dispatch:
env:
HAXE_VERSION: 4.3.7
HXCPP_COMPILE_CACHE: ${{ github.workspace }}/.hxcpp_cache
jobs:
intel_build:
name: Mac OS x64 Build
permissions: write-all
runs-on: macos-26
steps:
- name: Pulling the new commit
uses: actions/checkout@v7
with:
fetch-depth: 0
- name: Setting up Haxe
uses: krdlab/setup-haxe@v2
with:
haxe-version: ${{ env.HAXE_VERSION }}
# - name: Restore existing build cache for faster compilation
# uses: actions/cache@v6
# with:
# # not caching the bin folder to prevent asset duplication and stuff like that
# key: cache-build-mac-intel
# path: |
# .haxelib/
# export/release/macos/obj/
- name: Installing/Updating libraries
run: |
haxelib --global update haxelib
haxe -cp commandline -D analyzer-optimize --run Main setup -si
- name: Building the game
run: |
haxelib run lime setup -alias -y -nocffi
haxelib run lime rebuild hxcpp
haxelib run lime rebuild tools
arch -x86_64 haxelib run lime rebuild mac -nocolor -release
arch -x86_64 haxelib run lime build mac -DCOMPILE_EXPERIMENTAL
- name: Tar files
run: tar -zcvf CodenameEngine.tar.gz -C export/release/macos/bin .
- name: Uploading artifact (entire build)
uses: actions/upload-artifact@v7
with:
name: Codename Engine-x64
path: CodenameEngine.tar.gz
# - name: Clearing already existing cache
# uses: actions/github-script@v9
# with:
# script: |
# const caches = await github.rest.actions.getActionsCacheList({
# owner: context.repo.owner,
# repo: context.repo.repo,
# })
# for (const cache of caches.data.actions_caches) {
# if (cache.key == "cache-build-mac-intel") {
# console.log('Clearing ' + cache.key + '...')
# await github.rest.actions.deleteActionsCacheById({
# owner: context.repo.owner,
# repo: context.repo.repo,
# cache_id: cache.id,
# })
# console.log("Cache cleared.")
# }
# }
# - name: Uploading new cache
# uses: actions/cache@v6
# with:
# # caching again since for some reason it doesnt work with the first post cache shit
# key: cache-build-mac-intel
# path: |
# .haxelib/
# export/release/macos/obj/
arm_build:
name: Mac OS ARM64 Build
permissions: write-all
runs-on: macos-26
steps:
- name: Pulling the new commit
uses: actions/checkout@v7
with:
fetch-depth: 0
- name: Setting up Haxe
uses: krdlab/setup-haxe@v2
with:
haxe-version: ${{ env.HAXE_VERSION }}
# - name: Restore existing build cache for faster compilation
# uses: actions/cache@v6
# with:
# # not caching the bin folder to prevent asset duplication and stuff like that
# key: cache-build-mac-arm
# path: |
# .haxelib/
# export/release/macos/obj/
- name: Installing/Updating libraries
run: |
haxelib --global update haxelib
haxe -cp commandline -D analyzer-optimize --run Main setup -si
- name: Building the game
run: |
haxelib run lime setup -alias -y -nocffi
haxelib run lime rebuild hxcpp
haxelib run lime rebuild tools
haxelib run lime rebuild mac -nocolor -release
haxelib run lime build mac -DCOMPILE_EXPERIMENTAL
- name: Tar files
run: tar -zcvf CodenameEngine.tar.gz -C export/release/macos/bin .
- name: Uploading artifact (entire build)
uses: actions/upload-artifact@v7
with:
name: Codename Engine-ARM64
path: CodenameEngine.tar.gz
# - name: Clearing already existing cache
# uses: actions/github-script@v9
# with:
# script: |
# const caches = await github.rest.actions.getActionsCacheList({
# owner: context.repo.owner,
# repo: context.repo.repo,
# })
# for (const cache of caches.data.actions_caches) {
# if (cache.key == "cache-build-mac-arm") {
# console.log('Clearing ' + cache.key + '...')
# await github.rest.actions.deleteActionsCacheById({
# owner: context.repo.owner,
# repo: context.repo.repo,
# cache_id: cache.id,
# })
# console.log("Cache cleared.")
# }
# }
# - name: Uploading new cache
# uses: actions/cache@v6
# with:
# # caching again since for some reason it doesnt work with the first post cache shit
# key: cache-build-mac-arm
# path: |
# .haxelib/
# export/release/macos/obj/
universal_build:
name: Mac OS Universal Build
permissions: write-all
runs-on: macos-26
needs:
- intel_build
- arm_build
steps:
- name: Download Mac OS x64 Full Build
uses: actions/download-artifact@v8
with:
name: Codename Engine-x64
path: intel
- name: Download Mac OS ARM64 Full Build
uses: actions/download-artifact@v8
with:
name: Codename Engine-ARM64
path: arm
- name: Tar files (x64)
run: tar -xvf intel/CodenameEngine.tar.gz -C intel
- name: Tar files (ARM64)
run: tar -xvf arm/CodenameEngine.tar.gz -C arm
- name: Removing ARM64 and x64 artifacts
uses: geekyeggo/delete-artifact@v6
with:
name: Codename Engine-*
- name: Creating Universal App Bundle
shell: bash
run: |
BIN="CodenameEngine.app/Contents/MacOS"
INTEL="intel/CodenameEngine.app/Contents/MacOS"
ARM="arm/CodenameEngine.app/Contents/MacOS"
cp -R intel/CodenameEngine.app CodenameEngine.app
lipo -create "$INTEL/CodenameEngine" "$ARM/CodenameEngine" -output "$BIN/CodenameEngine"
lipo -create "$INTEL/lime.ndll" "$ARM/lime.ndll" -output "$BIN/lime.ndll"
- name: Uploading Universal Mac OS bundle (executable)
uses: actions/upload-artifact@v7
with:
name: Codename Engine (Executable Only)
path: CodenameEngine.app/Contents/MacOS/CodenameEngine
- name: Uploading Universal Mac OS bundle
uses: actions/upload-artifact@v7
with:
name: Codename Engine
path: CodenameEngine.app
# didnt compile debug in the same job or github would have said that job wasn't completed until debug was done too (debug uploads are not essential)
intel_debug_build:
name: Mac OS x64 Debug Build
permissions: write-all
runs-on: macos-26
needs: universal_build # since its low priority, it'll run after, so actions will concentrate first on normal builds
steps:
- name: Pulling the new commit
uses: actions/checkout@v7
- name: Setting up Haxe
uses: krdlab/setup-haxe@v2
with:
haxe-version: ${{ env.HAXE_VERSION }}
# - name: Restore existing build cache for faster compilation
# uses: actions/cache@v6
# with:
# # not caching the bin folder to prevent asset duplication and stuff like that
# key: cache-build-mac-intel-debug
# path: |
# .haxelib/
# export/debug/macos/obj/
- name: Installing/Updating libraries
run: |
haxelib --global update haxelib
haxe -cp commandline -D analyzer-optimize --run Main setup -si
- name: Building the game
run: |
haxelib run lime setup -alias -y -nocffi
haxelib run lime rebuild hxcpp
haxelib run lime rebuild tools
arch -x86_64 haxelib run lime rebuild mac -nocolor -release
arch -x86_64 haxelib run lime build mac -debug -DCOMPILE_EXPERIMENTAL
- name: Tar files
run: tar -zcvf CodenameEngine.tar.gz -C export/debug/macos/bin .
- name: Uploading artifact (entire build)
uses: actions/upload-artifact@v7
with:
name: Codename Engine-x64 Debug
path: CodenameEngine.tar.gz
# - name: Clearing already existing cache
# uses: actions/github-script@v9
# with:
# script: |
# const caches = await github.rest.actions.getActionsCacheList({
# owner: context.repo.owner,
# repo: context.repo.repo,
# })
# for (const cache of caches.data.actions_caches) {
# if (cache.key == "cache-build-mac-intel-debug") {
# console.log('Clearing ' + cache.key + '...')
# await github.rest.actions.deleteActionsCacheById({
# owner: context.repo.owner,
# repo: context.repo.repo,
# cache_id: cache.id,
# })
# console.log("Cache cleared.")
# }
# }
# - name: Uploading new cache
# uses: actions/cache@v6
# with:
# # caching again since for some reason it doesnt work with the first post cache shit
# key: cache-build-mac-intel-debug
# path: |
# .haxelib/
# export/debug/macos/obj/
arm_debug_build:
name: Mac OS ARM64 Debug Build
permissions: write-all
runs-on: macos-26
needs: universal_build # since its low priority, it'll run after, so actions will concentrate first on normal builds
steps:
- name: Pulling the new commit
uses: actions/checkout@v7
- name: Setting up Haxe
uses: krdlab/setup-haxe@v2
with:
haxe-version: ${{ env.HAXE_VERSION }}
# - name: Restore existing build cache for faster compilation
# uses: actions/cache@v6
# with:
# # not caching the bin folder to prevent asset duplication and stuff like that
# key: cache-build-mac-arm-debug
# path: |
# .haxelib/
# export/debug/macos/obj/
- name: Installing/Updating libraries
run: |
haxelib --global update haxelib
haxe -cp commandline -D analyzer-optimize --run Main setup -si
- name: Building the game
run: |
haxelib run lime setup -alias -y -nocffi
haxelib run lime rebuild hxcpp
haxelib run lime rebuild tools
haxelib run lime rebuild mac -nocolor -release
haxelib run lime build mac -debug -DCOMPILE_EXPERIMENTAL
- name: Tar files
run: tar -zcvf CodenameEngine.tar.gz -C export/debug/macos/bin .
- name: Uploading artifact (entire build)
uses: actions/upload-artifact@v7
with:
name: Codename Engine-ARM64 Debug
path: CodenameEngine.tar.gz
# - name: Clearing already existing cache
# uses: actions/github-script@v9
# with:
# script: |
# const caches = await github.rest.actions.getActionsCacheList({
# owner: context.repo.owner,
# repo: context.repo.repo,
# })
# for (const cache of caches.data.actions_caches) {
# if (cache.key == "cache-build-mac-arm-debug") {
# console.log('Clearing ' + cache.key + '...')
# await github.rest.actions.deleteActionsCacheById({
# owner: context.repo.owner,
# repo: context.repo.repo,
# cache_id: cache.id,
# })
# console.log("Cache cleared.")
# }
# }
# - name: Uploading new cache
# uses: actions/cache@v6
# with:
# # caching again since for some reason it doesnt work with the first post cache shit
# key: cache-build-mac-arm-debug
# path: |
# .haxelib/
# export/debug/macos/obj/
universal_debug_build:
name: Mac OS Universal Debug Build
permissions: write-all
runs-on: macos-26
needs:
- intel_debug_build
- arm_debug_build
steps:
- name: Download Mac OS x64 Full Build
uses: actions/download-artifact@v8
with:
name: Codename Engine-x64 Debug
path: intel
- name: Download Mac OS ARM64 Full Build
uses: actions/download-artifact@v8
with:
name: Codename Engine-ARM64 Debug
path: arm
- name: Tar files (x64)
run: tar -xvf intel/CodenameEngine.tar.gz -C intel
- name: Tar files (ARM64)
run: tar -xvf arm/CodenameEngine.tar.gz -C arm
- name: Removing ARM64 and x64 artifacts
uses: geekyeggo/delete-artifact@v6
with:
name: Codename Engine-*
- name: Creating Universal App Bundle
shell: bash
run: |
BIN="CodenameEngine.app/Contents/MacOS"
INTEL="intel/CodenameEngine.app/Contents/MacOS"
ARM="arm/CodenameEngine.app/Contents/MacOS"
cp -R intel/CodenameEngine.app CodenameEngine.app
lipo -create "$INTEL/CodenameEngine" "$ARM/CodenameEngine" -output "$BIN/CodenameEngine"
lipo -create "$INTEL/lime.ndll" "$ARM/lime.ndll" -output "$BIN/lime.ndll"
- name: Uploading Universal Mac OS bundle
uses: actions/upload-artifact@v7
with:
name: Codename Engine Debug
path: CodenameEngine.app