@@ -210,3 +210,80 @@ jobs:
210210 with :
211211 name : UnleashedRecomp-Flatpak
212212 path : ./${{ env.FLATPAK_ID }}.flatpak
213+ build-macos :
214+ name : Build macOS
215+ runs-on : macos-15
216+ strategy :
217+ matrix :
218+ arch : [ "arm64" ]
219+ preset : ["macos-debug", "macos-release", "macos-relwithdebinfo"]
220+ env :
221+ CMAKE_PRESET : ${{ matrix.preset }}
222+
223+ steps :
224+ - name : Checkout Repository
225+ uses : actions/checkout@v4
226+ with :
227+ submodules : recursive
228+
229+ - name : Checkout Private Repository
230+ uses : actions/checkout@v4
231+ with :
232+ repository : ${{ secrets.ASSET_REPO }}
233+ token : ${{ secrets.ASSET_REPO_TOKEN }}
234+ path : ./private
235+
236+ - name : Setup latest Xcode
237+ uses : maxim-lobanov/setup-xcode@v1
238+ with :
239+ xcode-version : latest-stable
240+
241+ - name : Setup ccache
242+ uses : hendrikmuhs/ccache-action@v1.2
243+ with :
244+ key : ccache-${{ runner.os }}-${{ matrix.arch }}-${{ matrix.preset }}
245+
246+ - name : Cache vcpkg
247+ uses : actions/cache@v4
248+ with :
249+ path : |
250+ ./thirdparty/vcpkg/downloads
251+ ./thirdparty/vcpkg/packages
252+ key : vcpkg-${{ runner.os }}-${{ matrix.arch }}-${{ hashFiles('vcpkg.json') }}
253+ restore-keys : |
254+ vcpkg-${{ runner.os }}-${{ matrix.arch }}-
255+
256+ - name : Install Dependencies (macOS)
257+ run : |
258+ brew install ninja
259+
260+ - name : Cache ccache Directory
261+ uses : actions/cache@v4
262+ with :
263+ path : /tmp/ccache
264+ key : ccache-${{ runner.os }}-${{ matrix.arch }}-${{ matrix.preset }}
265+
266+ - name : Prepare Project
267+ run : |
268+ cp ./private/* ./UnleashedRecompLib/private
269+
270+ - name : Configure Project
271+ env :
272+ CCACHE_DIR : /tmp/ccache
273+ run : cmake . --preset ${{ env.CMAKE_PRESET }} -DCMAKE_OSX_ARCHITECTURES=${{ matrix.arch }} -DSDL2MIXER_VORBIS=VORBISFILE -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER_LAUNCHER=ccache
274+
275+ - name : Build Project
276+ env :
277+ CCACHE_DIR : /tmp/ccache
278+ run : cmake --build ./out/build/${{ env.CMAKE_PRESET }} --target UnleashedRecomp
279+
280+ - name : Pack Release
281+ run : |
282+ codesign --deep -fs - "./out/build/${{ env.CMAKE_PRESET }}/UnleashedRecomp/Unleashed Recompiled.app"
283+ tar -czf UnleashedRecomp-macOS-${{ matrix.arch }}-${{ env.CMAKE_PRESET }}.tar.gz -C ./out/build/${{ env.CMAKE_PRESET }}/UnleashedRecomp "Unleashed Recompiled.app"
284+
285+ - name : Upload Artifact
286+ uses : actions/upload-artifact@v4
287+ with :
288+ name : UnleashedRecomp-macOS-${{ matrix.arch }}-${{ env.CMAKE_PRESET }}
289+ path : UnleashedRecomp-macOS-${{ matrix.arch }}-${{ env.CMAKE_PRESET }}.tar.gz
0 commit comments