Repository navigation
182 lines (177 loc) · 6.62 KB
/
Copy pathdebug-macos.yml
File metadata and controls
182 lines (177 loc) · 6.62 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
name: Mac OS Debug Builds
on:
workflow_dispatch:
env:
HAXE_VERSION: 4.3.7
HXCPP_COMPILE_CACHE: ${{ github.workspace }}/.hxcpp_cache
jobs:
intel_debug_build:
name: Mac OS x64 Debug Build
permissions: write-all
runs-on: macos-26
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
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
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
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: Tar files
run: tar -zcvf CodenameEngine.tar.gz CodenameEngine.app
- name: Uploading Universal Mac OS bundle (entire build)
uses: actions/upload-artifact@v7
with:
name: Codename Engine Debug
path: CodenameEngine.tar.gz