@@ -15,90 +15,129 @@ jobs:
1515 include :
1616 - platform : Windows
1717 os : windows-latest
18+ haxe_setup :
1819 build_cmd : haxelib run lime build windows
19- setup_libs : ./install-haxelibs.bat
2020 extra_libs :
2121 pre_build_commands :
22- post_build_commands :
2322 artifact_path : export/release/windows/bin
2423
2524 - platform : Windows x32
2625 os : windows-latest
26+ haxe_setup :
2727 build_cmd : haxelib run lime build windows -32 -D 32bits -D HXCPP_M32
28- setup_libs : ./install-haxelibs.bat
2928 extra_libs :
3029 pre_build_commands :
31- post_build_commands :
3230 artifact_path : export/32bit/windows/bin
3331
32+ - platform : Nintendo Switch
33+ os : ubuntu-latest
34+ haxe_setup : |
35+ apt-get update
36+ apt-get install -y wget git neko libgc-dev
37+
38+ wget https://github.com/HaxeFoundation/haxe/releases/download/4.3.4/haxe-4.3.4-linux64.tar.gz
39+ mkdir haxe_temp
40+ tar -xf haxe-4.3.4-linux64.tar.gz -C haxe_temp
41+ cp -r haxe_temp/haxe_*/* /usr/local/bin/
42+
43+ mkdir -p ~/haxelib
44+ haxelib --always --quiet setup ~/haxelib
45+ haxelib --global --always --quiet update haxelib
46+ build_cmd : haxelib run lime build Project.xml switch --app-version="4.0.0-${{ github.run_id}}" -D officialBuild
47+ extra_libs : |
48+ dkp-pacman -Sy --noconfirm
49+
50+ dkp-pacman -S --needed --noconfirm \
51+
52+ switch-bzip2 switch-cmake switch-curl switch-flac \
53+ switch-freetype switch-glad switch-glm switch-harfbuzz \
54+ switch-libdrm_nouveau switch-libjpeg-turbo switch-libmodplug \
55+ switch-libogg switch-libopus switch-libpng switch-libvorbis \
56+ switch-libvorbisidec switch-libwebp switch-mesa switch-mpg123 \
57+ switch-openal-soft switch-opusfile switch-pkg-config switch-sdl2 \
58+ switch-sdl2_gfx switch-sdl2_image switch-sdl2_mixer \
59+ switch-sdl2_net switch-sdl2_ttf switch-tools switch-zlib \
60+ switch-liblua51
61+
62+ haxelib --always --quiet install format
63+ haxelib --always --quiet install hxp
64+ haxelib --always --quiet git lime https://github.com/Slushi-Github/lime-nx.git
65+ haxelib --always --quiet git hxcpp https://github.com/Slushi-Github/hxcpp-nx.git
66+ haxelib --always --quiet git hx_libnx https://github.com/Slushi-Github/hx_libnx.git
67+ pre_build_commands : |
68+ cd ~/haxelib/hxcpp/git/tools/hxcpp
69+ haxe compile.hxml
70+ cd -
71+
72+ haxelib run lime rebuild switch
73+ artifact_path : export/release/switch/bin/*.nro
74+
3475 - platform : Linux
3576 os : ubuntu-22.04
77+ haxe_setup :
3678 build_cmd : haxelib run lime build linux
37- setup_libs : sh ./install-haxelibs.sh
3879 extra_libs : |
3980 sudo apt-get update
4081 sudo apt-get install -y libvlc-dev libvlccore-dev dpkg-dev file desktop-file-utils gtk-update-icon-cache
4182 pre_build_commands :
42- post_build_commands :
4383 artifact_path : export/release/linux/bin
4484
4585 - platform : Android
4686 os : ubuntu-latest
87+ haxe_setup :
4788 build_cmd : haxelib run lime build android
48- setup_libs : sh ./install-haxelibs.sh
4989 extra_libs :
5090 pre_build_commands : |
5191 haxelib run lime config ANDROID_SDK $ANDROID_HOME
5292 haxelib run lime config ANDROID_NDK_ROOT $ANDROID_NDK_LATEST_HOME
5393 haxelib run lime config JAVA_HOME $JAVA_HOME_17_X64
5494 haxelib run lime config ANDROID_SETUP true
55- post_build_commands :
5695 artifact_path : export/release/android/bin/app/build/outputs/apk/release/*.apk
5796
5897 - platform : MacOS
5998 os : macos-15
99+ haxe_setup :
60100 build_cmd : haxelib run lime build macos --app-version="4.0.0-${{ github.run_id}}"
61- setup_libs : sh ./install-haxelibs.sh
62101 pre_build_commands :
63- post_build_commands :
64102 artifact_path : export/release/macos/bin
65103
66104 - platform : MacOS x64
67105 os : macos-15-intel
106+ haxe_setup :
68107 build_cmd : haxelib run lime build macos --app-version="4.0.0-${{ github.run_id}}"
69- setup_libs : sh ./install-haxelibs.sh
70108 pre_build_commands :
71- post_build_commands :
72109 artifact_path : export/release/macos/bin
73110
74111 steps :
75112 - name : Pull the New Commit
76113 uses : actions/checkout@v4.1.7
77114
78115 - name : Setup Haxe
116+ if : ${{ !matrix.haxe_setup }}
79117 uses : krdlab/setup-haxe@master
80118 with :
81119 haxe-version : 4.3.7
82120
121+ - name : Custom Haxe Setup
122+ if : ${{ matrix.haxe_setup }}
123+ run : ${{ matrix.haxe_setup }}
124+
125+ - name : Install Main Libraries
126+ run : |
127+ haxelib --global git hmm https://github.com/ALE-Psych-Crew/hmm
128+ haxelib --global run hmm setup
129+
83130 - name : Install Extra Libraries
84131 if : ${{ matrix.extra_libs }}
85132 run : ${{ matrix.extra_libs }}
86133
87- - name : Install Main Libraries
88- run : ${{ matrix.setup_libs }}
89-
90134 - name : Pre-Build Commands
91135 if : ${{ matrix.pre_build_commands }}
92136 run : ${{ matrix.pre_build_commands }}
93137
94138 - name : Build for ${{ matrix.platform }}
95139 run : ${{ matrix.build_cmd }}
96140
97- - name : Post-Build Commands
98- if : ${{ matrix.post_build_commands }}
99- shell : bash
100- run : ${{ matrix.post_build_commands }}
101-
102141 - name : Upload Game
103142 uses : actions/upload-artifact@v4
104143 with :
0 commit comments