Skip to content

Commit 9feddde

Browse files
committed
jarvis, completely rewrite the workflow
Signed-off-by: TechnikTil <[email protected]>
1 parent 0b537f1 commit 9feddde

File tree

3 files changed

+87
-232
lines changed

3 files changed

+87
-232
lines changed

.github/workflows/main.yml

Lines changed: 82 additions & 179 deletions
Original file line numberDiff line numberDiff line change
@@ -5,234 +5,137 @@ on:
55
workflow_dispatch:
66

77
jobs:
8-
buildWindows:
9-
name: Build Windows Application
10-
runs-on: windows-latest
11-
8+
build:
9+
name: Build Game
10+
strategy:
11+
matrix:
12+
include:
13+
- target: windows
14+
runs-on: windows-latest
15+
16+
- target: macos
17+
runs-on: macos-latest
18+
19+
- target: linux
20+
runs-on: ubuntu-latest
21+
22+
- target: ios
23+
runs-on: macos-26
24+
25+
- target: android
26+
runs-on: ubuntu-latest
27+
runs-on:
28+
- ${{matrix.runs-on}}
1229
steps:
13-
- name: Download Source Code
14-
uses: actions/checkout@v4
30+
- name: Checkout Repository
31+
uses: funkincrew/ci-checkout@main
1532

1633
- name: Setup Haxe
17-
uses: krdlab/setup-haxe@master
34+
uses: funkincrew/ci-haxe@master
1835
with:
1936
haxe-version: 4.3.7
2037

21-
- name: Retrieve Haxelib Cache
22-
id: windows-haxelib-cache
23-
uses: actions/cache@v4
38+
- name: Install HMM with Funkin' Patches
39+
run: |
40+
haxelib --debug --never --global git haxelib https://github.com/FunkinCrew/haxelib.git funkin-patches --skip-dependencies
41+
haxelib --debug --never --global git hmm https://github.com/FunkinCrew/hmm funkin-patches
42+
haxelib --debug --never newrepo
43+
44+
- name: Restore HMM Cache
45+
id: hmm-cache
46+
uses: actions/cache@main
2447
with:
25-
path: |
26-
C:/haxelib/**
27-
.haxelib/**
28-
key: ${{ runner.os }}-haxelib-cache
48+
path: .haxelib
49+
key: ${{runner.os}}-hmm
2950

30-
- name: Install Haxe Libraries using HMM
31-
run: |
32-
haxelib install hmm --quiet
33-
haxelib run hmm install
51+
- name: Install Dependencies using HMM
52+
run: haxelib --global run hmm install -q
3453

3554
- name: Compile HXCPP Build Tools
3655
run: |
3756
cd .haxelib/hxcpp/git/tools/hxcpp
3857
haxe compile.hxml
3958
cd ../../../../..
4059
41-
- name: Compile Application
42-
run: haxelib run lime build windows
43-
44-
- name: Upload Artifact
45-
uses: actions/upload-artifact@v4
46-
with:
47-
name: TechNotDrip-Engine_WINDOWS
48-
path: export/release/windows/bin/
49-
50-
buildMacOS:
51-
name: Build MacOS Application
52-
runs-on: macos-latest
53-
54-
steps:
55-
- name: Download Source Code
56-
uses: actions/checkout@v4
57-
58-
- name: Setup Haxe
59-
uses: krdlab/setup-haxe@master
60-
with:
61-
haxe-version: 4.3.7
62-
63-
- name: Retrieve Haxelib Cache
64-
id: macos-haxelib-cache
60+
- name: Restore hxcpp cache
6561
uses: actions/cache@v4
6662
with:
67-
path: |
68-
~/haxelib/**
69-
.haxelib/**
70-
key: ${{ runner.os }}-haxelib-cache
63+
path: ${{runner.temp}}/hxcpp_cache
64+
key: ${{runner.os}}-hxcpp
7165

72-
- name: Install Haxe Libraries using HMM
66+
- name: Configure HXCPP Cache
67+
shell: bash
7368
run: |
74-
haxelib install hmm --quiet
75-
haxelib run hmm install
76-
77-
- name: Compile Application
78-
run: haxelib run lime build macos
69+
echo "HXCPP_COMPILE_CACHE=${{runner.temp}}/hxcpp_cache" >> "$GITHUB_ENV"
70+
echo 'HXCPP_CACHE_MB="4096"' >> "$GITHUB_ENV"
71+
haxelib run hxcpp cache list
7972
80-
- name: Upload Artifact
81-
uses: actions/upload-artifact@v4
82-
with:
83-
name: TechNotDrip-Engine_MACOS
84-
path: export/release/macos/bin/
85-
86-
buildLinux:
87-
name: Build Linux Application
88-
runs-on: ubuntu-latest
89-
90-
steps:
91-
- name: Download Source Code
92-
uses: actions/checkout@v4
93-
94-
- name: Setup Haxe
95-
uses: krdlab/setup-haxe@master
96-
with:
97-
haxe-version: 4.3.7
98-
99-
- name: Retrieve Haxelib Cache
100-
id: linux-haxelib-cache
101-
uses: actions/cache@v4
102-
with:
103-
path: |
104-
~/haxelib/**
105-
.haxelib/**
106-
key: ${{ runner.os }}-haxelib-cache
107-
108-
- name: Install Haxe Libraries using HMM
73+
- name: Install Linux Dependencies
74+
if: ${{runner.os == 'Linux'}}
10975
run: |
110-
sudo apt install -qq libvlccore-dev libvlc-dev -y
111-
haxelib install hmm --quiet
112-
haxelib run hmm install
113-
114-
- name: Compile HXCPP Build Tools
115-
run: |
116-
cd .haxelib/hxcpp/git/tools/hxcpp
117-
haxe compile.hxml
118-
cd ../../../../..
119-
120-
- name: Compile Application
121-
run: haxelib run lime build linux
122-
123-
- name: Upload Artifact
124-
uses: actions/upload-artifact@v4
125-
with:
126-
name: TechNotDrip-Engine_LINUX
127-
path: export/release/linux/bin/
128-
129-
buildAndroid:
130-
name: Build Android Application
131-
runs-on: ubuntu-latest
132-
133-
steps:
134-
- name: Download Source Code
135-
uses: actions/checkout@v4
136-
137-
- name: Setup Haxe
138-
uses: krdlab/setup-haxe@master
139-
with:
140-
haxe-version: 4.3.7
76+
sudo apt-get -y install libvlc-dev libvlccore-dev
14177
14278
- name: Setup Android NDK
143-
uses: nttld/setup-ndk@v1
79+
uses: nttld/setup-ndk@main
80+
if: ${{matrix.target == 'android'}}
14481
id: ndk
14582
with:
14683
ndk-version: r21e
14784

14885
- name: Setup Java
149-
uses: actions/setup-java@v4
86+
uses: actions/setup-java@main
87+
if: ${{matrix.target == 'android'}}
15088
with:
151-
distribution: 'oracle'
89+
distribution: 'temurin'
15290
java-version: '17'
15391

154-
- name: Retrieve Haxelib Cache
155-
id: android-haxelib-cache
156-
uses: actions/cache@v4
157-
with:
158-
path: |
159-
~/haxelib/**
160-
.haxelib/**
161-
key: android-haxelib-cache
162-
163-
- name: Install Haxe Libraries using HMM
164-
run: |
165-
sudo apt install libvlccore-dev libvlc-dev -y -q
166-
haxelib install hmm --quiet
167-
haxelib run hmm install
168-
169-
- name: Compile HXCPP Build Tools
170-
run: |
171-
cd .haxelib/hxcpp/git/tools/hxcpp
172-
haxe compile.hxml
173-
cd ../../../../..
174-
17592
- name: Configure Android
93+
if: ${{matrix.target == 'android'}}
17694
run: |
17795
haxelib run lime config ANDROID_SDK $ANDROID_HOME
178-
haxelib run lime config ANDROID_NDK_ROOT ${{ steps.ndk.outputs.ndk-path }}
96+
haxelib run lime config ANDROID_NDK_ROOT ${{steps.ndk.outputs.ndk-path}}
17997
haxelib run lime config JAVA_HOME $JAVA_HOME
18098
haxelib run lime config ANDROID_SETUP true
18199
182-
- name: Compile Application
183-
run: haxelib run lime build android
184-
185-
- name: Upload Artifact
186-
uses: actions/upload-artifact@v4
187-
with:
188-
name: TechNotDrip-Engine_ANDROID
189-
path: export/release/android/bin/app/build/outputs/apk/debug/*.apk
190-
191-
buildiOS:
192-
name: Build iOS Application
193-
runs-on: macos-latest
194-
195-
steps:
196-
- name: Download Source Code
197-
uses: actions/checkout@v4
100+
- name: Compile the Application
101+
if: ${{matrix.target != 'ios'}}
102+
run: haxelib run lime build ${{matrix.target}}
198103

199-
- name: Setup Haxe
200-
uses: krdlab/setup-haxe@master
201-
with:
202-
haxe-version: 4.3.7
104+
- name: Compile the Application (No Signing)
105+
if: ${{matrix.target == 'ios'}}
106+
run: haxelib run lime build ios -nosign
203107

204-
- name: Retrieve Haxelib Cache
205-
id: ios-haxelib-cache
206-
uses: actions/cache@v4
108+
- name: Format Artifact String
109+
uses: ASzc/change-string-case-action@v6
110+
id: artifact-string
207111
with:
208-
path: |
209-
~/haxelib/**
210-
.haxelib/**
211-
key: ios-haxelib-cache
212-
213-
- name: Install Haxe Libraries using HMM
214-
run: |
215-
haxelib install hmm --quiet
216-
haxelib run hmm install
217-
218-
- name: Compile HXCPP Build Tools
219-
run: |
220-
cd .haxelib/hxcpp/git/tools/hxcpp
221-
haxe compile.hxml
222-
cd ../../../../..
223-
224-
- name: Compile Application
225-
run: haxelib run lime build ios -nosign
112+
string: ${{matrix.target}}
226113

227114
- name: Zip up IPA File
115+
if: ${{matrix.target == 'ios'}}
228116
run: |
229117
cd export/release/ios/build/Release-iphoneos
230118
mkdir Payload
231119
mv *.app Payload
232-
zip -r TechNotDrip.ipa Payload
120+
zip -r TechNotDripEngine.ipa Payload
233121
234122
- name: Upload Artifact
123+
if: ${{ matrix.target != 'ios' && matrix.target != 'android' }}
124+
uses: actions/upload-artifact@v4
125+
with:
126+
name: TechNotDrip-Engine_${{steps.artifact-string.outputs.uppercase}}
127+
path: export/release/${{matrix.target}}/bin/
128+
129+
- name: Upload Artifact (on iOS)
130+
if: ${{ matrix.target == 'ios' }}
235131
uses: actions/upload-artifact@v4
236132
with:
237133
name: TechNotDrip-Engine_IOS
238134
path: export/release/ios/build/Release-iphoneos/*.ipa
135+
136+
- name: Upload Artifact (on Android)
137+
if: ${{ matrix.target == 'android' }}
138+
uses: actions/upload-artifact@v4
139+
with:
140+
name: TechNotDrip-Engine_ANDROID
141+
path: export/release/android/bin/app/build/outputs/apk/debug/*.apk

hmm.json

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,18 @@
1313
{
1414
"name": "flixel-addons",
1515
"type": "git",
16-
"dir": null,
1716
"ref": "technotdrip-engine",
1817
"url": "https://github.com/TilNotDrip/flixel-addons"
1918
},
2019
{
2120
"name": "flixel-controls",
2221
"type": "git",
23-
"dir": null,
2422
"ref": "aa6aa1e8bf50c071907f3282696685ce60418725",
2523
"url": "https://github.com/Geokureli/FlxControls"
2624
},
2725
{
2826
"name": "flxanimate",
2927
"type": "git",
30-
"dir": null,
3128
"ref": "ef85c132044d897a04c5008da29674d88f83c4d6",
3229
"url": "https://github.com/Dot-Stuff/flxanimate"
3330
},
@@ -39,14 +36,12 @@
3936
{
4037
"name": "funkin.vis",
4138
"type": "git",
42-
"dir": null,
4339
"ref": "1966f8fbbbc509ed90d4b520f3c49c084fc92fd6",
4440
"url": "https://github.com/FunkinCrew/funkVis"
4541
},
4642
{
4743
"name": "grig.audio",
4844
"type": "git",
49-
"dir": null,
5045
"ref": "57f5d47f2533fd0c3dcd025a86cb86c0dfa0b6d2",
5146
"url": "https://gitlab.com/haxe-grig/grig.audio.git"
5247
},
@@ -58,7 +53,6 @@
5853
{
5954
"name": "hxcpp",
6055
"type": "git",
61-
"dir": null,
6256
"ref": "86d4b1a07ddadf162a0c48487f1e1b17d7bbcd64",
6357
"url": "https://github.com/HaxeFoundation/hxcpp"
6458
},
@@ -98,6 +92,11 @@
9892
"name": "thx.semver",
9993
"type": "haxelib",
10094
"version": "0.2.2"
95+
},
96+
{
97+
"name": "tink_core",
98+
"type": "haxelib",
99+
"version": "1.26.0"
101100
}
102101
]
103102
}

0 commit comments

Comments
 (0)