-
Notifications
You must be signed in to change notification settings - Fork 5
145 lines (121 loc) · 4.2 KB
/
main.yml
File metadata and controls
145 lines (121 loc) · 4.2 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
name: Build
on:
push:
workflow_dispatch:
jobs:
build:
strategy:
matrix:
include:
- target: windows
name: Build for Windows
runs-on: windows-latest
- target: macos
name: Build for MacOS
runs-on: macos-latest
- target: linux
name: Build for Linux
runs-on: ubuntu-latest
- target: ios
name: Build for iOS
runs-on: macos-26
- target: android
name: Build for Android
runs-on: ubuntu-latest
runs-on:
- ${{matrix.runs-on}}
steps:
- name: Checkout Repository
uses: funkincrew/ci-checkout@main
- name: Setup Haxe
uses: funkincrew/ci-haxe@master
with:
haxe-version: 4.3.7
- name: Install HMM with Funkin' Patches
run: |
haxelib --never --global git haxelib https://github.com/FunkinCrew/haxelib.git funkin-patches --skip-dependencies
haxelib --never --global git hmm https://github.com/FunkinCrew/hmm funkin-patches
haxelib --never newrepo
- name: Restore HMM Cache
id: hmm-cache
uses: actions/cache@main
with:
path: .haxelib
key: ${{matrix.target}}-hmm
- name: Install Dependencies using HMM
run: haxelib --global run hmm install -q
- name: Restore HXCPP Cache
uses: actions/cache@main
with:
path: ${{runner.temp}}/hxcpp_cache
key: ${{matrix.target}}-hxcpp
- name: Configure HXCPP Cache
shell: bash
run: |
echo "HXCPP_COMPILE_CACHE=${{runner.temp}}/hxcpp_cache" >> "$GITHUB_ENV"
echo 'HXCPP_CACHE_MB="4096"' >> "$GITHUB_ENV"
- name: Compile HXCPP Build Tools
run: |
cd .haxelib/hxcpp/git/tools/hxcpp
haxe compile.hxml
cd ../../../../..
haxelib run hxcpp cache list
- name: Install Linux Dependencies
if: ${{runner.os == 'Linux'}}
run: |
sudo apt-get -y install libvlc-dev libvlccore-dev
- name: Setup Android NDK
uses: nttld/setup-ndk@main
if: ${{matrix.target == 'android'}}
id: ndk
with:
ndk-version: r21e
- name: Setup Java
uses: actions/setup-java@main
if: ${{matrix.target == 'android'}}
with:
distribution: 'temurin'
java-version: '17'
- name: Configure Android
if: ${{matrix.target == 'android'}}
run: |
haxelib run lime config ANDROID_SDK $ANDROID_HOME
haxelib run lime config ANDROID_NDK_ROOT ${{steps.ndk.outputs.ndk-path}}
haxelib run lime config JAVA_HOME $JAVA_HOME
haxelib run lime config ANDROID_SETUP true
- name: Compile the Application
if: ${{matrix.target != 'ios'}}
run: haxelib run lime build ${{matrix.target}}
- name: Compile the Application (No Signing)
if: ${{matrix.target == 'ios'}}
run: haxelib run lime build ios -nosign
- name: Format Artifact String
uses: ASzc/change-string-case-action@v6
id: artifact-string
with:
string: ${{matrix.target}}
- name: Zip up IPA File
if: ${{matrix.target == 'ios'}}
run: |
cd export/release/ios/build/Release-iphoneos
mkdir Payload
mv *.app Payload
zip -r TechNotDripEngine.ipa Payload
- name: Upload Artifact
if: ${{ matrix.target != 'ios' && matrix.target != 'android' }}
uses: actions/upload-artifact@v4
with:
name: TechNotDrip-Engine_${{steps.artifact-string.outputs.uppercase}}
path: export/release/${{matrix.target}}/bin/
- name: Upload Artifact (on iOS)
if: ${{ matrix.target == 'ios' }}
uses: actions/upload-artifact@v4
with:
name: TechNotDrip-Engine_IOS
path: export/release/ios/build/Release-iphoneos/*.ipa
- name: Upload Artifact (on Android)
if: ${{ matrix.target == 'android' }}
uses: actions/upload-artifact@v4
with:
name: TechNotDrip-Engine_ANDROID
path: export/release/android/bin/app/build/outputs/apk/debug/*.apk