1+ name : Debug Builds
2+
3+ on :
4+ push :
5+ branches : [main]
6+ pull_request :
7+ branches : [main]
8+
9+ workflow_dispatch :
10+
11+ jobs :
12+
13+ windows :
14+ permissions : write-all
15+ runs-on : windows-latest
16+
17+ steps :
18+ - name : Checking Latest Commit
19+ uses : actions/checkout@main
20+ with :
21+ submodules : true
22+
23+ - name : Setup Haxe
24+ uses : krdlab/setup-haxe@master
25+ with :
26+ haxe-version : 4.3.7
27+
28+ - name : Run Cache
29+ uses : actions/cache@v4.3.0
30+ with :
31+ # not caching the bin folder to prevent asset duplication and stuff like that
32+ key : windows-debug-cache
33+ path : |
34+ .haxelib/
35+ export/debug/windows/haxe/
36+ export/debug/windows/obj/
37+ restore-keys : windows-debug-cache
38+
39+ - name : Install Libraries
40+ run : |
41+ haxelib --global update haxelib
42+ haxelib fixrepo
43+ haxelib install hmm
44+ haxelib run hmm install
45+
46+ - name : Building HXCPP
47+ run : |
48+ cd ./.haxelib/hxcpp/git/tools/hxcpp
49+ haxe compile.hxml
50+ cd ../../../../../
51+
52+ - name : Compile Engine
53+ run : haxelib run lime build windows -debug
54+
55+ - name : Upload Artifact
56+ uses : actions/upload-artifact@main
57+ with :
58+ name : Kitty Windows Build
59+ path : export/debug/windows/bin
60+ overwrite : true
61+ include-hidden-files : true
62+ if-no-files-found : error
63+
64+ - name : Clearing Cache
65+ uses : actions/github-script@v6
66+ with :
67+ script : |
68+ const caches = await github.rest.actions.getActionsCacheList({
69+ owner: context.repo.owner,
70+ repo: context.repo.repo,
71+ })
72+ for (const cache of caches.data.actions_caches) {
73+ if (cache.key == 'windows-debug-cache') {
74+ console.log('Clearing ' + cache.key + '...')
75+ await github.rest.actions.deleteActionsCacheById({
76+ owner: context.repo.owner,
77+ repo: context.repo.repo,
78+ cache_id: cache.id,
79+ })
80+ console.log('Cache cleared.')
81+ }
82+ }
83+
84+ - name : Run New Cache
85+ uses : actions/cache@v4.3.0
86+ with :
87+ # not caching the bin folder to prevent asset duplication and stuff like that
88+ key : windows-debug-cache
89+ path : |
90+ .haxelib/
91+ export/debug/windows/haxe/
92+ export/debug/windows/obj/
93+ restore-keys : windows-debug-cache
94+
95+ # mac:
96+ # permissions: write-all
97+ # runs-on: macos-15
98+
99+ # steps:
100+ # - name: Checking Latest Commit
101+ # uses: actions/checkout@main
102+ # with:
103+ # submodules: true
104+
105+ # - name: Setup Haxe
106+ # uses: krdlab/setup-haxe@master
107+ # with:
108+ # haxe-version: 4.3.7
109+
110+ # - name: Run Cache
111+ # uses: actions/cache@v4.3.0
112+ # with:
113+ # # not caching the bin folder to prevent asset duplication and stuff like that
114+ # key: mac-debug-cache
115+ # path: |
116+ # .haxelib/
117+ # export/debug/mac/haxe/
118+ # export/debug/mac/obj/
119+ # restore-keys: mac-debug-cache
120+
121+ # - name: Install Libraries
122+ # run: |
123+ # haxelib --global update haxelib
124+ # haxelib fixrepo
125+ # haxelib install hmm
126+ # haxelib run hmm install
127+
128+ # - name: Building HXCPP
129+ # run: |
130+ # cd ./.haxelib/hxcpp/git/tools/hxcpp
131+ # haxe compile.hxml
132+ # cd ../../../../../
133+
134+ # - name: Building the game
135+ # run: haxelib run lime build mac -debug
136+
137+ # - name: Upload Artifact
138+ # uses: actions/upload-artifact@main
139+ # with:
140+ # name: Kitty Mac Build
141+ # path: export/debug/macos/bin
142+ # overwrite: true
143+ # include-hidden-files: true
144+ # if-no-files-found: error
145+
146+ # - name: Clearing Cache
147+ # uses: actions/github-script@v6
148+ # with:
149+ # script: |
150+ # const caches = await github.rest.actions.getActionsCacheList({
151+ # owner: context.repo.owner,
152+ # repo: context.repo.repo,
153+ # })
154+ # for (const cache of caches.data.actions_caches) {
155+ # if (cache.key == 'mac-debug-cache') {
156+ # console.log('Clearing ' + cache.key + '...')
157+ # await github.rest.actions.deleteActionsCacheById({
158+ # owner: context.repo.owner,
159+ # repo: context.repo.repo,
160+ # cache_id: cache.id,
161+ # })
162+ # console.log('Cache cleared.')
163+ # }
164+ # }
165+
166+ # - name: Run New Cache
167+ # uses: actions/cache@v4.3.0
168+ # with:
169+ # # not caching the bin folder to prevent asset duplication and stuff like that
170+ # key: mac-debug-cache
171+ # path: |
172+ # .haxelib/
173+ # export/debug/mac/haxe/
174+ # export/debug/mac/obj/
175+ # restore-keys: mac-debug-cache
176+
177+ # linux:
178+ # permissions: write-all
179+ # runs-on: ubuntu-latest
180+
181+ # steps:
182+ # - name: Checking Latest Commit
183+ # uses: actions/checkout@main
184+ # with:
185+ # submodules: true
186+
187+ # - name: Setup Haxe
188+ # uses: krdlab/setup-haxe@master
189+ # with:
190+ # haxe-version: 4.3.7
191+
192+ # - name: Run Cache
193+ # uses: actions/cache@v4.3.0
194+ # with:
195+ # # not caching the bin folder to prevent asset duplication and stuff like that
196+ # key: linux-debug-cache
197+ # path: |
198+ # .haxelib/
199+ # export/debug/linux/haxe/
200+ # export/debug/linux/obj/
201+ # restore-keys: linux-debug-cache
202+
203+ # - name: Installing Dependencies
204+ # run: sudo apt-get update && sudo apt-get upgrade && sudo apt-get install libvlc-dev libvlccore-dev vlc-bin vlc libxrandr-dev
205+
206+ # - name: Install Libraries
207+ # run: |
208+ # haxelib --global update haxelib
209+ # haxelib fixrepo
210+ # haxelib install hmm
211+ # haxelib run hmm install
212+
213+ # - name: Building HXCPP
214+ # run: |
215+ # cd ./.haxelib/hxcpp/git/tools/hxcpp
216+ # haxe compile.hxml
217+ # cd ../../../../../
218+
219+ # - name: Building the game
220+ # run: haxelib run lime build linux -debug
221+
222+ # - name: Upload Artifact
223+ # uses: actions/upload-artifact@main
224+ # with:
225+ # name: Kitty Linux Build
226+ # path: export/debug/linux/bin
227+ # overwrite: true
228+ # include-hidden-files: true
229+ # if-no-files-found: error
230+
231+ # - name: Clearing Cache
232+ # uses: actions/github-script@v6
233+ # with:
234+ # script: |
235+ # const caches = await github.rest.actions.getActionsCacheList({
236+ # owner: context.repo.owner,
237+ # repo: context.repo.repo,
238+ # })
239+ # for (const cache of caches.data.actions_caches) {
240+ # if (cache.key == 'linux-debug-cache') {
241+ # console.log('Clearing ' + cache.key + '...')
242+ # await github.rest.actions.deleteActionsCacheById({
243+ # owner: context.repo.owner,
244+ # repo: context.repo.repo,
245+ # cache_id: cache.id,
246+ # })
247+ # console.log('Cache cleared.')
248+ # }
249+ # }
250+ # - name: Run New Cache
251+ # uses: actions/cache@v4.3.0
252+ # with:
253+ # # not caching the bin folder to prevent asset duplication and stuff like that
254+ # key: linux-debug-cache
255+ # path: |
256+ # .haxelib/
257+ # export/debug/linux/haxe/
258+ # export/debug/linux/obj/
259+ # restore-keys: linux-debug-cache
0 commit comments