Skip to content

Commit

Permalink
build: add ios build
Browse files Browse the repository at this point in the history
  • Loading branch information
Adriankhl committed May 28, 2024
1 parent 921ed73 commit cba1fff
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
33 changes: 33 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,39 @@ jobs:
name: macos_metal_debug
path: build/libgodot_llm.darwin.debug.universal.dylib

ios-latest-cmake-cpu-release:
runs-on: macos-latest
steps:
- name: Clone
id: checkout
uses: actions/checkout@v4

- name: Clone submodule
id: clone_submodule
run: |
git submodule update --init --recursive
- name: Dependencies
id: depends
run: |
brew update
- name: Build
id: cmake_build
run: |
mkdir build
cd build
cmake .. -DLLAMA_NATIVE=OFF -DLLAMA_METAL=OFF -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_BUILD_TYPE=Release
cmake --build . --config Release -j $(sysctl -n hw.logicalcpu)
codesign -s - libgodot_llm.ios.release.universal.dylib
ls -al
- name: Archive library
uses: actions/upload-artifact@v4
with:
name: macos_cpu_release
path: build/libgodot_llm.ios.release.universal.dylib

archive-other-files:
runs-on: ubuntu-latest
steps:
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ set(CMAKE_CXX_STANDARD_REQUIRED True)

set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")

if (APPLE)
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
SET(CMAKE_OSX_ARCHITECTURES "x86_64;arm64" CACHE STRING "Build architectures for OSX" FORCE)
endif ()

Expand Down

0 comments on commit cba1fff

Please sign in to comment.