-
Notifications
You must be signed in to change notification settings - Fork 6
130 lines (104 loc) · 3.66 KB
/
main.yml
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
# "Borrowed" the Windows part of the workflow from: https://github.com/CrowPlexus/Forever-Engine-Legacy/blob/master/.github/workflows/main.yml
# Android workflow stuff also "borrowed" from: https://github.com/MAJigsaw77/UTF/blob/main/.github/workflows/main.yml
name: Action build
on:
push:
pull_request:
workflow_dispatch:
jobs:
windowsBuild:
runs-on: windows-latest
steps:
- name: Checkout latest commit
uses: actions/checkout@main
with:
submodules: true
- name: Install & Setup Haxe
uses: krdlab/setup-haxe@master
with:
haxe-version: 4.3.4
- name: Install Libraries
run: |
haxe -cp ./actions -D analyzer-optimize -main Main --interp
haxelib git hxcpp https://github.com/HaxeFoundation/hxcpp.git --quiet
haxelib run lime rebuild hxcpp
haxelib set hxcpp git
- name: Build
run: haxelib run lime build windows -D analyzer-optimize
- name: Upload Artifact
uses: actions/upload-artifact@main
with:
name: Maru-Funkin-Windows
path: export/release/windows/bin
if-no-files-found: error
linuxBuild:
runs-on: ubuntu-latest
steps:
- name: Checkout latest commit
uses: actions/checkout@main
with:
submodules: true
- name: Install & Setup Haxe
uses: krdlab/setup-haxe@master
with:
haxe-version: 4.3.4
- name: Installing Dependencies
run: sudo apt-get update && sudo apt-get upgrade && sudo apt-get install libvlc-dev libvlccore-dev vlc-bin vlc
- name: Install Libraries
run: |
haxe -cp ./actions -D analyzer-optimize -main Main --interp
haxelib git hxcpp https://github.com/HaxeFoundation/hxcpp.git --quiet
haxelib run lime rebuild hxcpp
haxelib set hxcpp git
- name: Build
run: haxelib run lime build linux -D analyzer-optimize
- name: Upload Artifact
uses: actions/upload-artifact@main
with:
name: Maru-Funkin-Linux
path: export/release/linux/bin
if-no-files-found: error
androidBuild:
runs-on: ubuntu-latest
steps:
- name: Checkout latest commit
uses: actions/checkout@main
with:
submodules: true
- name: Install & Setup Haxe
uses: krdlab/setup-haxe@master
with:
haxe-version: 4.3.4
- name: Setup Android NDK
id: setup-ndk
uses: nttld/setup-ndk@main
with:
ndk-version: r21e
- name: Setup Java
uses: actions/setup-java@main
with:
java-version: '11'
distribution: 'temurin'
- name: Install Libraries
run: |
haxe -cp ./actions -D analyzer-optimize -main Main --interp
haxelib git hxcpp https://github.com/HaxeFoundation/hxcpp.git --quiet
haxelib run lime rebuild hxcpp
haxelib set hxcpp git
- name: Configure Android
run: |
haxelib run lime setup -alias -y
haxelib run lime config ANDROID_SDK $ANDROID_HOME
haxelib run lime config ANDROID_NDK_ROOT $ANDROID_NDK_HOME
haxelib run lime config JAVA_HOME $JAVA_HOME
haxelib run lime config ANDROID_SETUP true
env:
ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}
- name: Build
run: haxelib run lime build android -D analyzer-optimize
- name: Upload Artifact
uses: actions/upload-artifact@main
with:
name: Maru-Funkin-Android
path: export/release/android/bin/app/build/outputs/apk/debug
if-no-files-found: error