@@ -552,35 +552,44 @@ jobs:
552552 -DCMAKE_XCODE_ATTRIBUTE_DEVELOPMENT_TEAM=ggml
553553 cmake --build . --config Release -j $(sysctl -n hw.logicalcpu) -- CODE_SIGNING_ALLOWED=NO
554554
555- # TODO: tmp disabled. see for possible re-enable:
556- # https://github.com/ggerganov/llama.cpp/pull/10525
557- # macOS-latest-swift:
558- # runs-on: macos-latest
559- #
560- # strategy:
561- # matrix:
562- # destination: ['generic/platform=macOS', 'generic/platform=iOS', 'generic/platform=tvOS']
563- #
564- # steps:
565- # - name: Clone
566- # id: checkout
567- # uses: actions/checkout@v4
568- #
569- # - name: Dependencies
570- # id: depends
571- # continue-on-error: true
572- # run: |
573- # brew update
574- #
575- # - name: xcodebuild for swift package
576- # id: xcodebuild
577- # run: |
578- # xcodebuild -scheme llama -destination "${{ matrix.destination }}"
579- #
580- # - name: Build Swift Example
581- # id: make_build_swift_example
582- # run: |
583- # make swift
555+ macOS-latest-swift :
556+ runs-on : macos-latest
557+
558+ strategy :
559+ matrix :
560+ destination : ['generic/platform=macOS', 'generic/platform=iOS', 'generic/platform=tvOS']
561+
562+ steps :
563+ - name : Clone
564+ id : checkout
565+ uses : actions/checkout@v4
566+
567+ - name : Dependencies
568+ id : depends
569+ continue-on-error : true
570+ run : |
571+ brew update
572+
573+ - name : Build llama.cpp with CMake
574+ id : cmake_build
575+ run : |
576+ sysctl -a
577+ mkdir build
578+ cd build
579+ cmake -G Xcode .. \
580+ -DGGML_METAL_USE_BF16=ON \
581+ -DGGML_METAL_EMBED_LIBRARY=ON \
582+ -DLLAMA_BUILD_EXAMPLES=OFF \
583+ -DLLAMA_BUILD_TESTS=OFF \
584+ -DLLAMA_BUILD_SERVER=OFF \
585+ -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64"
586+ cmake --build . --config Release -j $(sysctl -n hw.logicalcpu)
587+ sudo cmake --install . --config Release
588+
589+ - name : xcodebuild for swift package
590+ id : xcodebuild
591+ run : |
592+ xcodebuild -scheme llama-Package -destination "${{ matrix.destination }}"
584593
585594 windows-msys2 :
586595 runs-on : windows-latest
@@ -1104,6 +1113,29 @@ jobs:
11041113 - name : Checkout code
11051114 uses : actions/checkout@v4
11061115
1116+ - name : Build
1117+ id : cmake_build
1118+ run : |
1119+ sysctl -a
1120+ mkdir build
1121+ cd build
1122+ cmake -G Xcode .. \
1123+ -DGGML_METAL_USE_BF16=ON \
1124+ -DGGML_METAL_EMBED_LIBRARY=ON \
1125+ -DLLAMA_BUILD_EXAMPLES=OFF \
1126+ -DLLAMA_BUILD_TESTS=OFF \
1127+ -DLLAMA_BUILD_SERVER=OFF \
1128+ -DCMAKE_SYSTEM_NAME=iOS \
1129+ -DCMAKE_OSX_DEPLOYMENT_TARGET=14.0 \
1130+ -DCMAKE_XCODE_ATTRIBUTE_DEVELOPMENT_TEAM=ggml
1131+ cmake --build . --config Release -j $(sysctl -n hw.logicalcpu) -- CODE_SIGNING_ALLOWED=NO
1132+ sudo cmake --install . --config Release
1133+
1134+ - name : xcodebuild for swift package
1135+ id : xcodebuild
1136+ run : |
1137+ xcodebuild -scheme llama-Package -destination 'generic/platform=iOS'
1138+
11071139 - name : Build Xcode project
11081140 run : xcodebuild -project examples/llama.swiftui/llama.swiftui.xcodeproj -scheme llama.swiftui -sdk iphoneos CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= -destination 'generic/platform=iOS' build
11091141
@@ -1131,23 +1163,6 @@ jobs:
11311163
11321164 ./gradlew build --no-daemon
11331165
1134- # freeBSD-latest:
1135- # runs-on: macos-12
1136- # steps:
1137- # - name: Clone
1138- # uses: actions/checkout@v4
1139- #
1140- # - name: Build
1141- # uses: cross-platform-actions/[email protected] 1142- # with:
1143- # operating_system: freebsd
1144- # version: '13.2'
1145- # hypervisor: 'qemu'
1146- # run: |
1147- # sudo pkg update
1148- # sudo pkg install -y gmake automake autoconf pkgconf llvm15 openblas
1149- # gmake CC=/usr/local/bin/clang15 CXX=/usr/local/bin/clang++15 -j `sysctl -n hw.ncpu`
1150-
11511166 release :
11521167 if : ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
11531168
0 commit comments