-
-
Notifications
You must be signed in to change notification settings - Fork 0
114 lines (90 loc) · 3.69 KB
/
Copy pathSwitchBuild.yml
File metadata and controls
114 lines (90 loc) · 3.69 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
name: Vupx Engine project example build
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
container: devkitpro/devkita64:latest
steps:
- name: Checkout Project Repository
uses: actions/checkout@v4
- name: Install Haxe 4.3.7
run: |
apt-get update
apt-get install -y wget git neko libgc-dev
echo === DOWNLOADING HAXE FROM GITHUB ===
wget https://github.com/HaxeFoundation/haxe/releases/download/4.3.7/haxe-4.3.7-linux64.tar.gz
mkdir haxe_temp
tar -xf haxe-4.3.7-linux64.tar.gz -C haxe_temp
cp -r haxe_temp/haxe_*/* /usr/local/bin/
echo =========
echo === UPDATING HAXELIB ===
mkdir -p ./.haxelib
haxelib --always --quiet setup .haxelib
haxelib --global --always --quiet update haxelib
echo =========
echo === HAXE VERSION ===
haxe --version
echo =========
- name: Install DevKitPro dependencies
run: |
echo === SYNCING DEVKITPRO REPOS ===
dkp-pacman -Sy --noconfirm
echo === INSTALLING SWITCH LIBRARIES ===
dkp-pacman -S --needed --noconfirm \
switch-bzip2 switch-cmake switch-curl switch-flac \
switch-freetype switch-glad switch-glm switch-harfbuzz \
switch-libdrm_nouveau switch-libjpeg-turbo switch-libmodplug \
switch-libogg switch-libopus switch-libpng switch-libvorbis \
switch-libvorbisidec switch-libwebp switch-mesa switch-mpg123 \
switch-openal-soft switch-opusfile switch-pkg-config switch-sdl2 \
switch-sdl2_gfx switch-sdl2_image switch-sdl2_mixer \
switch-sdl2_net switch-sdl2_ttf switch-tools switch-zlib
- name: Build HaxeNXCompiler
run: |
git clone https://github.com/Slushi-Github/HaxeNXCompiler.git compiler_source
echo === INSTALLING STANDARD HXCPP FOR COMPILER ===
haxelib --global --always --quiet install hxcpp
echo =========
cd compiler_source
echo === BUILDING HaxeNXCompiler ===
haxe build.hxml
echo =========
mv export/HaxeNXCompiler ../HaxeNXCompiler
cd ..
chmod +x HaxeNXCompiler
echo === COMPILER VERSION ===
./HaxeNXCompiler --version
echo =========
- name: Compile project to Nintendo Switch
run: |
cd examples/ProjectExample
echo === INSTALLING LIBRARIES FOR VUPX ENGINE ===
mkdir -p ./.haxelib
haxelib --quiet setup .haxelib
haxelib --always --quiet git hxcpp https://github.com/Slushi-Github/hxcpp-nx.git
haxelib --always --quiet git hx_libnx https://github.com/Slushi-Github/hx_libnx.git
haxelib --always --quiet git vupxengine https://github.com/Slushi-Github/Vupx-Engine.git
echo =========
echo === SETUP CUSTOM HXCPP ===
cd .haxelib/hxcpp/git/tools/hxcpp
haxe compile.hxml
cd ../../../../../
echo =========
echo === COMPILING PROJECT===
../../HaxeNXCompiler --compile
echo =========
- name: Verify Build Success
run: |
if ! ls examples/ProjectExample/output/SwitchFiles/*.nro 1> /dev/null 2>&1; then
echo "::error::.nro file not found."
exit 1
fi
- name: Upload Build files
uses: actions/upload-artifact@v4
with:
name: ProjectExample_Switch
path: examples/ProjectExample/output/SwitchFiles/*.nro