CoolFace
Datasetpublic

echodict/llama.cpp

version https://git-lfs.github.com/spec/v1 oid sha256:cfc44b7ba25614df70e6b65e3341cae0310163bd32fd31a6b928a542df433faf size 30786

sourceHugging Faceupdated 5mo agoView on Hugging Face
0likes773downloads
build-apple.yml215 linesDownload Raw Back to workflows
1name: CI (apple)2 3on:4  workflow_dispatch: # allows manual triggering5  push:6    branches:7      - master8    paths: [9      '.github/workflows/build-apple.yml',10      '**/CMakeLists.txt',11      '**/.cmake',12      '**/*.h',13      '**/*.hpp',14      '**/*.c',15      '**/*.cpp',16      '**/*.swift',17      '**/*.m',18      '**/*.metal'19    ]20 21  pull_request:22    types: [opened, synchronize, reopened]23    paths: [24      '.github/workflows/build-apple.yml',25      'ggml/src/ggml-metal/**'26    ]27 28concurrency:29  group: ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }}30  cancel-in-progress: true31 32env:33  GGML_NLOOP: 334  GGML_N_THREADS: 135  LLAMA_LOG_COLORS: 136  LLAMA_LOG_PREFIX: 137  LLAMA_LOG_TIMESTAMPS: 138 39jobs:40  macOS-latest-ios:41    runs-on: macos-latest42 43    steps:44      - name: Clone45        id: checkout46        uses: actions/checkout@v647 48      - name: ccache49        uses: ggml-org/ccache-action@v1.2.2150        with:51          key: macOS-latest-ios52          evict-old-files: 1d53          save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}54 55      - name: Build56        id: cmake_build57        run: |58          sysctl -a59          cmake -B build -G Xcode \60            -DGGML_METAL_USE_BF16=ON \61            -DGGML_METAL_EMBED_LIBRARY=ON \62            -DLLAMA_BUILD_COMMON=OFF \63            -DLLAMA_BUILD_EXAMPLES=OFF \64            -DLLAMA_BUILD_TOOLS=OFF \65            -DLLAMA_BUILD_TESTS=OFF \66            -DLLAMA_BUILD_SERVER=OFF \67            -DCMAKE_SYSTEM_NAME=iOS \68            -DCMAKE_OSX_DEPLOYMENT_TARGET=14.0 \69            -DCMAKE_XCODE_ATTRIBUTE_DEVELOPMENT_TEAM=ggml70          cmake --build build --config Release -j $(sysctl -n hw.logicalcpu) -- CODE_SIGNING_ALLOWED=NO71 72  macos-latest-ios-xcode:73    runs-on: macos-latest74 75    steps:76      - name: Checkout code77        uses: actions/checkout@v678 79      - name: Setup Xcode80        uses: ggml-org/setup-xcode@v181        with:82          xcode-version: latest-stable83 84      - name: Build85        id: cmake_build86        run: |87          sysctl -a88          cmake -B build -G Xcode \89            -DGGML_METAL_USE_BF16=ON \90            -DGGML_METAL_EMBED_LIBRARY=ON \91            -DLLAMA_OPENSSL=OFF \92            -DLLAMA_BUILD_EXAMPLES=OFF \93            -DLLAMA_BUILD_TOOLS=OFF \94            -DLLAMA_BUILD_TESTS=OFF \95            -DLLAMA_BUILD_SERVER=OFF \96            -DCMAKE_SYSTEM_NAME=iOS \97            -DCMAKE_OSX_DEPLOYMENT_TARGET=14.0 \98            -DCMAKE_XCODE_ATTRIBUTE_DEVELOPMENT_TEAM=ggml99          cmake --build build --config Release -j $(sysctl -n hw.logicalcpu) -- CODE_SIGNING_ALLOWED=NO100 101      - name: xcodebuild for swift package102        id: xcodebuild103        run: |104          ./build-xcframework.sh105 106      - name: Upload xcframework artifact107        uses: actions/upload-artifact@v6108        with:109          name: llama-xcframework110          path: build-apple/llama.xcframework/111          retention-days: 1112 113      - name: Build Xcode project114        run: |115          xcodebuild -downloadPlatform iOS116          xcodebuild -project examples/llama.swiftui/llama.swiftui.xcodeproj -scheme llama.swiftui -sdk iphoneos CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= -destination 'generic/platform=iOS' FRAMEWORK_FOLDER_PATH=./build-ios build117 118  macOS-latest-tvos:119    runs-on: macos-latest120 121    steps:122      - name: Clone123        id: checkout124        uses: actions/checkout@v6125 126      - name: ccache127        uses: ggml-org/ccache-action@v1.2.21128        with:129          key: macOS-latest-tvos130          evict-old-files: 1d131          save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}132 133      - name: Build134        id: cmake_build135        run: |136          sysctl -a137          cmake -B build -G Xcode \138            -DGGML_METAL_USE_BF16=ON \139            -DGGML_METAL_EMBED_LIBRARY=ON \140            -DLLAMA_BUILD_COMMON=OFF \141            -DLLAMA_BUILD_EXAMPLES=OFF \142            -DLLAMA_BUILD_TOOLS=OFF \143            -DLLAMA_BUILD_TESTS=OFF \144            -DLLAMA_BUILD_SERVER=OFF \145            -DCMAKE_SYSTEM_NAME=tvOS \146            -DCMAKE_OSX_DEPLOYMENT_TARGET=14.0 \147            -DCMAKE_XCODE_ATTRIBUTE_DEVELOPMENT_TEAM=ggml148          cmake --build build --config Release -j $(sysctl -n hw.logicalcpu) -- CODE_SIGNING_ALLOWED=NO149 150  macOS-latest-visionos:151    runs-on: macos-latest152 153    steps:154      - name: Clone155        id: checkout156        uses: actions/checkout@v6157 158      - name: Build159        id: cmake_build160        run: |161          sysctl -a162          cmake -B build -G Xcode \163            -DGGML_METAL_USE_BF16=ON \164            -DGGML_METAL_EMBED_LIBRARY=ON \165            -DLLAMA_BUILD_COMMON=OFF \166            -DLLAMA_BUILD_EXAMPLES=OFF \167            -DLLAMA_BUILD_TOOLS=OFF \168            -DLLAMA_BUILD_TESTS=OFF \169            -DLLAMA_BUILD_SERVER=OFF \170            -DCMAKE_SYSTEM_NAME=visionOS \171            -DCMAKE_OSX_DEPLOYMENT_TARGET=1.0 \172            -DCMAKE_XCODE_ATTRIBUTE_DEVELOPMENT_TEAM=ggml173          cmake --build build --config Release -j $(sysctl -n hw.logicalcpu) -- CODE_SIGNING_ALLOWED=NO174 175  macOS-latest-swift:176    runs-on: macos-latest177    needs: macos-latest-ios-xcode178 179    strategy:180      matrix:181        destination: ['generic/platform=macOS', 'generic/platform=iOS', 'generic/platform=tvOS']182 183    steps:184      - name: Clone185        id: checkout186        uses: actions/checkout@v6187 188      - name: ccache189        uses: ggml-org/ccache-action@v1.2.21190        with:191          key: macOS-latest-swift192          evict-old-files: 1d193          save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}194 195      - name: Download xcframework artifact196        uses: actions/download-artifact@v7197        with:198          name: llama-xcframework199          path: build-apple/llama.xcframework/200 201      - name: Build llama.cpp with CMake202        id: cmake_build203        run: |204          sysctl -a205          cmake -B build -G Xcode \206            -DGGML_METAL_USE_BF16=ON \207            -DGGML_METAL_EMBED_LIBRARY=ON \208            -DLLAMA_OPENSSL=OFF \209            -DLLAMA_BUILD_EXAMPLES=OFF \210            -DLLAMA_BUILD_TOOLS=OFF \211            -DLLAMA_BUILD_TESTS=OFF \212            -DLLAMA_BUILD_SERVER=OFF \213            -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64"214          cmake --build build --config Release -j $(sysctl -n hw.logicalcpu)215