Update Binaries #55
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Update Binaries | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| llama_cpp_commit: | |
| description: 'Branch, tag, or commit to use for llama.cpp' | |
| required: true | |
| default: 'master' | |
| push: | |
| branches: [cron_job] | |
| #schedule: | |
| # - cron: "22 22 * * 2" | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event.inputs.llama_cpp_commit }} | |
| cancel-in-progress: true | |
| env: | |
| # Compiler defines common to all platforms | |
| COMMON_DEFINE: -DGGML_NATIVE=OFF -DLLAMA_BUILD_TESTS=OFF -DLLAMA_BUILD_EXAMPLES=ON -DLLAMA_BUILD_SERVER=OFF -DBUILD_SHARED_LIBS=ON -DLLAMA_CURL=OFF | |
| jobs: | |
| compile-linux: | |
| name: Compile (Linux) | |
| strategy: | |
| fail-fast: true | |
| matrix: | |
| include: | |
| - build: 'noavx' | |
| defines: '-DGGML_AVX=OFF -DGGML_AVX2=OFF -DGGML_FMA=OFF' | |
| - build: 'avx2' | |
| defines: '' | |
| - build: 'avx' | |
| defines: '-DGGML_AVX2=OFF' | |
| - build: 'avx512' | |
| defines: '-DGGML_AVX512=ON' | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| repository: ggerganov/llama.cpp | |
| fetch-depth: 0 | |
| ref: '${{ github.event.inputs.llama_cpp_commit }}' | |
| - name: Build | |
| id: cmake_build | |
| run: | | |
| mkdir build | |
| cd build | |
| cmake .. ${{ env.COMMON_DEFINE }} ${{ matrix.defines }} | |
| cmake --build . --config Release -j ${env:NUMBER_OF_PROCESSORS} | |
| ls -R | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| path: ./build/bin/libllama.so | |
| name: llama-bin-linux-${{ matrix.build }}-x64.so | |
| if-no-files-found: error | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| path: ./build/bin/libggml.so | |
| name: ggml-bin-linux-${{ matrix.build }}-x64.so | |
| if-no-files-found: error | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| path: ./build/bin/libggml-base.so | |
| name: ggml-base-bin-linux-${{ matrix.build }}-x64.so | |
| if-no-files-found: error | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| path: ./build/bin/libggml-cpu.so | |
| name: ggml-cpu-bin-linux-${{ matrix.build }}-x64.so | |
| if-no-files-found: error | |
| - name: Upload mtmd | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| path: ./build/bin/libmtmd_shared.so | |
| name: mtmd-bin-linux-${{ matrix.build }}-x64.so | |
| if-no-files-found: error | |
| compile-musl: | |
| name: Compile (musl) | |
| strategy: | |
| fail-fast: true | |
| matrix: | |
| include: | |
| - build: 'noavx' | |
| defines: '-DGGML_AVX=OFF -DGGML_AVX2=OFF -DGGML_FMA=OFF' | |
| - build: 'avx2' | |
| defines: '' | |
| - build: 'avx' | |
| defines: '-DGGML_AVX2=OFF' | |
| - build: 'avx512' | |
| defines: '-DGGML_AVX512=ON' | |
| runs-on: ubuntu-24.04 | |
| container: | |
| image: alpine:latest | |
| steps: | |
| - name: Install dependencies | |
| run: | | |
| apk update && apk add --no-cache \ | |
| build-base \ | |
| cmake \ | |
| git \ | |
| linux-headers \ | |
| g++ | |
| - uses: actions/checkout@v4 | |
| with: | |
| repository: ggerganov/llama.cpp | |
| fetch-depth: 0 | |
| ref: '${{ github.event.inputs.llama_cpp_commit }}' | |
| - name: Build | |
| id: cmake_build_musl | |
| run: | | |
| mkdir build | |
| cd build | |
| cmake .. ${{ env.COMMON_DEFINE }} ${{ matrix.defines }} | |
| cmake --build . --config Release -j ${env:NUMBER_OF_PROCESSORS} | |
| ls -R | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| path: ./build/bin/libllama.so | |
| name: llama-bin-musl-${{ matrix.build }}-x64.so | |
| if-no-files-found: error | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| path: ./build/bin/libggml.so | |
| name: ggml-bin-musl-${{ matrix.build }}-x64.so | |
| if-no-files-found: error | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| path: ./build/bin/libggml-base.so | |
| name: ggml-base-bin-musl-${{ matrix.build }}-x64.so | |
| if-no-files-found: error | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| path: ./build/bin/libggml-cpu.so | |
| name: ggml-cpu-bin-musl-${{ matrix.build }}-x64.so | |
| if-no-files-found: error | |
| - name: Upload mtmd | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| path: ./build/bin/libmtmd_shared.so | |
| name: mtmd-bin-musl-${{ matrix.build }}-x64.so | |
| if-no-files-found: error | |
| compile-windows: | |
| name: Compile (Windows) | |
| strategy: | |
| fail-fast: true | |
| matrix: | |
| include: | |
| - build: 'noavx' | |
| defines: '-DGGML_AVX=OFF -DGGML_AVX2=OFF -DGGML_FMA=OFF' | |
| - build: 'avx2' | |
| defines: '' | |
| - build: 'avx' | |
| defines: '-DGGML_AVX2=OFF' | |
| - build: 'avx512' | |
| defines: '-DGGML_AVX512=ON -DGGML_AVX512_VBMI=ON -DGGML_AVX512_VNNI=ON' | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| repository: ggerganov/llama.cpp | |
| fetch-depth: 0 | |
| ref: '${{ github.event.inputs.llama_cpp_commit }}' | |
| - name: Build | |
| id: cmake_build | |
| run: | | |
| mkdir build | |
| cd build | |
| cmake .. ${{ env.COMMON_DEFINE }} ${{ matrix.defines }} | |
| cmake --build . --config Release -j ${env:NUMBER_OF_PROCESSORS} | |
| tree /f | |
| - name: Upload artifacts (llama) | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| path: .\build\bin\Release\llama.dll | |
| name: llama-bin-win-${{ matrix.build }}-x64.dll | |
| if-no-files-found: error | |
| - name: Upload artifacts (ggml) | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| path: .\build\bin\Release\ggml.dll | |
| name: ggml-bin-win-${{ matrix.build }}-x64.dll | |
| if-no-files-found: error | |
| - name: Upload artifacts (ggml-base) | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| path: .\build\bin\Release\ggml-base.dll | |
| name: ggml-base-bin-win-${{ matrix.build }}-x64.dll | |
| if-no-files-found: error | |
| - name: Upload artifacts (ggml-cpu) | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| path: .\build\bin\Release\ggml-cpu.dll | |
| name: ggml-cpu-bin-win-${{ matrix.build }}-x64.dll | |
| if-no-files-found: error | |
| - name: Upload artifacts (mtmd) | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| path: .\build\bin\Release\mtmd_shared.dll | |
| name: mtmd-bin-win-${{ matrix.build }}-x64.dll | |
| if-no-files-found: error | |
| compile-vulkan: | |
| name: Compile (vulkan) - ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ | |
| ubuntu-22.04, | |
| windows-latest | |
| ] | |
| env: | |
| VULKAN_VERSION: 1.3.261.1 | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Clone | |
| id: checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: ggerganov/llama.cpp | |
| fetch-depth: 0 | |
| ref: '${{ github.event.inputs.llama_cpp_commit }}' | |
| - name: Download dependencies - Linux | |
| if: ${{ matrix.os == 'ubuntu-22.04' }} | |
| run: | | |
| wget -qO- https://packages.lunarg.com/lunarg-signing-key-pub.asc | sudo tee /etc/apt/trusted.gpg.d/lunarg.asc | |
| sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-jammy.list http://packages.lunarg.com/vulkan/lunarg-vulkan-jammy.list | |
| sudo apt update | |
| sudo apt install vulkan-sdk | |
| - name: Download dependencies - Windows | |
| id: get_vulkan | |
| if: ${{ matrix.os == 'windows-latest' }} | |
| run: | | |
| curl.exe -o $env:RUNNER_TEMP/VulkanSDK-Installer.exe -L "https://sdk.lunarg.com/sdk/download/${env:VULKAN_VERSION}/windows/VulkanSDK-${env:VULKAN_VERSION}-Installer.exe" | |
| & "$env:RUNNER_TEMP\VulkanSDK-Installer.exe" --accept-licenses --default-answer --confirm-command install | |
| Add-Content $env:GITHUB_ENV "VULKAN_SDK=C:\VulkanSDK\${env:VULKAN_VERSION}" | |
| Add-Content $env:GITHUB_PATH "C:\VulkanSDK\${env:VULKAN_VERSION}\bin" | |
| - name: Build | |
| id: cmake_build | |
| if: ${{ matrix.os == 'windows-latest' }} | |
| run: | | |
| mkdir build | |
| cd build | |
| cmake .. ${{ env.COMMON_DEFINE }} -DGGML_VULKAN=ON | |
| cmake --build . --config Release -j ${env:NUMBER_OF_PROCESSORS} | |
| ls -R | |
| - name: Build | |
| if: ${{ matrix.os == 'ubuntu-22.04' }} | |
| run: | | |
| mkdir build | |
| cd build | |
| cmake .. ${{ env.COMMON_DEFINE }} -DGGML_VULKAN=ON | |
| cmake --build . --config Release -j ${env:NUMBER_OF_PROCESSORS} | |
| ls -R | |
| - name: Upload llama artifacts (Windows) | |
| if: ${{ matrix.os == 'windows-latest' }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| path: .\build\bin\Release\llama.dll | |
| name: llama-bin-win-vulkan-x64.dll | |
| if-no-files-found: error | |
| - name: Upload ggml artifacts (Windows) | |
| if: ${{ matrix.os == 'windows-latest' }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| path: .\build\bin\Release\ggml.dll | |
| name: ggml-bin-win-vulkan-x64.dll | |
| if-no-files-found: error | |
| - name: Upload ggml-base artifacts (Windows) | |
| if: ${{ matrix.os == 'windows-latest' }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| path: .\build\bin\Release\ggml-base.dll | |
| name: ggml-base-bin-win-vulkan-x64.dll | |
| if-no-files-found: error | |
| - name: Upload ggml-vulkan artifacts (Windows) | |
| if: ${{ matrix.os == 'windows-latest' }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| path: .\build\bin\Release\ggml-vulkan.dll | |
| name: ggml-vulkan-bin-win-vulkan-x64.dll | |
| if-no-files-found: error | |
| - name: Upload mtmd artifacts (Windows) | |
| if: ${{ matrix.os == 'windows-latest' }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| path: .\build\bin\Release\mtmd_shared.dll | |
| name: mtmd-bin-win-vulkan-x64.dll | |
| if-no-files-found: error | |
| - name: Upload llama artifacts (Linux) | |
| if: ${{ matrix.os == 'ubuntu-22.04' }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| path: ./build/bin/libllama.so | |
| name: llama-bin-linux-vulkan-x64.so | |
| if-no-files-found: error | |
| - name: Upload ggml artifacts (Linux) | |
| if: ${{ matrix.os == 'ubuntu-22.04' }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| path: ./build/bin/libggml.so | |
| name: ggml-bin-linux-vulkan-x64.so | |
| if-no-files-found: error | |
| - name: Upload ggml-base artifacts (Linux) | |
| if: ${{ matrix.os == 'ubuntu-22.04' }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| path: ./build/bin/libggml-base.so | |
| name: ggml-base-bin-linux-vulkan-x64.so | |
| if-no-files-found: error | |
| - name: Upload ggml-vulkan artifacts (Linux) | |
| if: ${{ matrix.os == 'ubuntu-22.04' }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| path: ./build/bin/libggml-vulkan.so | |
| name: ggml-vulkan-bin-linux-vulkan-x64.so | |
| if-no-files-found: error | |
| - name: Upload mtmd artifacts (Linux) | |
| if: ${{ matrix.os == 'ubuntu-22.04' }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| path: ./build/bin/libmtmd_shared.so | |
| name: mtmd-bin-linux-vulkan-x64.so | |
| if-no-files-found: error | |
| compile-cublas: | |
| name: Compile (cublas) | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-22.04, windows-2019] | |
| cuda: ['12.2.0', '11.7.1'] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Clone | |
| id: checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: ggerganov/llama.cpp | |
| fetch-depth: 0 | |
| ref: '${{ github.event.inputs.llama_cpp_commit }}' | |
| - uses: Jimver/cuda-toolkit@v0.2.15 | |
| if: runner.os == 'Windows' | |
| id: cuda-toolkit-windows | |
| with: | |
| cuda: ${{ matrix.cuda }} | |
| method: 'network' | |
| sub-packages: '["nvcc", "cudart", "cublas", "cublas_dev", "thrust", "visual_studio_integration"]' | |
| - uses: Jimver/cuda-toolkit@v0.2.15 | |
| if: runner.os == 'Linux' | |
| id: cuda-toolkit-linux | |
| with: | |
| cuda: ${{ matrix.cuda }} | |
| method: 'network' | |
| linux-local-args: '["--toolkit"]' | |
| - name: Build | |
| id: cmake_build | |
| run: | | |
| echo "CMAKE_CXX_FLAGS is $CMAKE_CXX_FLAGS" | |
| mkdir build | |
| cd build | |
| cmake .. ${{ env.COMMON_DEFINE }} -DGGML_CUDA=ON | |
| cmake --build . --config Release | |
| ls -R | |
| - name: Upload artifacts (Windows) | |
| if: ${{ matrix.os == 'windows-2019' }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| path: .\build\bin\Release\llama.dll | |
| name: llama-bin-win-cublas-cu${{ matrix.cuda }}-x64.dll | |
| if-no-files-found: error | |
| - name: Upload artifacts (ggml) | |
| if: ${{ matrix.os == 'windows-2019' }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| path: .\build\bin\Release\ggml.dll | |
| name: ggml-bin-win-cublas-cu${{ matrix.cuda }}-x64.dll | |
| if-no-files-found: error | |
| - name: Upload artifacts (ggml-base) | |
| if: ${{ matrix.os == 'windows-2019' }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| path: .\build\bin\Release\ggml-base.dll | |
| name: ggml-base-bin-win-cublas-cu${{ matrix.cuda }}-x64.dll | |
| if-no-files-found: error | |
| - name: Upload artifacts (ggml-cuda) | |
| if: ${{ matrix.os == 'windows-2019' }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| path: .\build\bin\Release\ggml-cuda.dll | |
| name: ggml-cuda-bin-win-cublas-cu${{ matrix.cuda }}-x64.dll | |
| if-no-files-found: error | |
| - name: Upload mtmd artifacts (Windows) | |
| if: ${{ matrix.os == 'windows-2019' }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| path: .\build\bin\Release\mtmd_shared.dll | |
| name: mtmd-bin-win-cublas-cu${{ matrix.cuda }}-x64.dll | |
| if-no-files-found: error | |
| - name: Upload artifacts (Linux) | |
| if: ${{ matrix.os == 'ubuntu-22.04' }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| path: ./build/bin/libllama.so | |
| name: llama-bin-linux-cublas-cu${{ matrix.cuda }}-x64.so | |
| if-no-files-found: error | |
| - name: Upload artifacts ggml (Linux) | |
| if: ${{ matrix.os == 'ubuntu-22.04' }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| path: ./build/bin/libggml.so | |
| name: ggml-bin-linux-cublas-cu${{ matrix.cuda }}-x64.so | |
| if-no-files-found: error | |
| - name: Upload artifacts ggml-base (Linux) | |
| if: ${{ matrix.os == 'ubuntu-22.04' }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| path: ./build/bin/libggml-base.so | |
| name: ggml-base-bin-linux-cublas-cu${{ matrix.cuda }}-x64.so | |
| if-no-files-found: error | |
| - name: Upload artifacts ggml-cuda (Linux) | |
| if: ${{ matrix.os == 'ubuntu-22.04' }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| path: ./build/bin/libggml-cuda.so | |
| name: ggml-cuda-bin-linux-cublas-cu${{ matrix.cuda }}-x64.so | |
| if-no-files-found: error | |
| - name: Upload mtmd artifacts (Linux) | |
| if: ${{ matrix.os == 'ubuntu-22.04' }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| path: ./build/bin/libmtmd_shared.so | |
| name: mtmd-bin-linux-cublas-cu${{ matrix.cuda }}-x64.so | |
| if-no-files-found: error | |
| compile-macos: | |
| name: Compile (MacOS) | |
| strategy: | |
| fail-fast: true | |
| matrix: | |
| include: | |
| - build: 'arm64' | |
| defines: '-DCMAKE_OSX_ARCHITECTURES=arm64 -DGGML_METAL_EMBED_LIBRARY=ON' | |
| - build: 'x64' | |
| defines: '-DCMAKE_OSX_ARCHITECTURES=x86_64 -DGGML_METAL=OFF -DGGML_AVX=ON -DGGML_AVX2=ON' | |
| - build: 'x64-rosetta2' | |
| defines: '-DCMAKE_OSX_ARCHITECTURES=x86_64 -DGGML_METAL=OFF -DGGML_AVX=OFF -DGGML_AVX2=OFF' | |
| runs-on: macos-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| repository: ggerganov/llama.cpp | |
| fetch-depth: 0 | |
| ref: '${{ github.event.inputs.llama_cpp_commit }}' | |
| - name: Dependencies | |
| continue-on-error: true | |
| run: | | |
| brew update | |
| - name: Build | |
| id: cmake_build | |
| run: | | |
| mkdir build | |
| cd build | |
| cmake .. ${{ env.COMMON_DEFINE }} ${{ matrix.defines }} | |
| cmake --build . --config Release -j ${env:NUMBER_OF_PROCESSORS} | |
| ls -R | |
| - name: Upload ggml | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| path: ./build/bin/libggml.dylib | |
| name: ggml-bin-osx-${{ matrix.build }}.dylib | |
| if-no-files-found: error | |
| - name: Upload ggml-base | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| path: ./build/bin/libggml-base.dylib | |
| name: ggml-base-bin-osx-${{ matrix.build }}.dylib | |
| if-no-files-found: error | |
| - name: Upload ggml-cpu | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| path: ./build/bin/libggml-cpu.dylib | |
| name: ggml-cpu-bin-osx-${{ matrix.build }}.dylib | |
| if-no-files-found: error | |
| - name: Upload ggml-metal | |
| if: ${{ matrix.build == 'arm64' }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| path: ./build/bin/libggml-metal.dylib | |
| name: ggml-metal-bin-osx-${{ matrix.build }}.dylib | |
| if-no-files-found: error | |
| - name: Upload ggml-blas | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| path: ./build/bin/libggml-blas.dylib | |
| name: ggml-blas-bin-osx-${{ matrix.build }}.dylib | |
| if-no-files-found: error | |
| - name: Upload llama | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| path: ./build/bin/libllama.dylib | |
| name: llama-bin-osx-${{ matrix.build }}.dylib | |
| if-no-files-found: error | |
| - name: Upload mtmd | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| path: ./build/bin/libmtmd_shared.dylib | |
| name: mtmd-bin-osx-${{ matrix.build }}.dylib | |
| if-no-files-found: error | |
| - name: Upload Metal | |
| if: ${{ matrix.build == 'arm64' }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| path: ./build/bin/ggml-metal.metal | |
| name: ggml-metal.metal | |
| if-no-files-found: error | |
| compile-android: | |
| # Disable android build | |
| if: false | |
| strategy: | |
| fail-fast: true | |
| matrix: | |
| include: | |
| - build: 'x86' | |
| defines: '-DANDROID_ABI=x86' | |
| - build: 'x86_64' | |
| defines: '-DANDROID_ABI=x86_64' | |
| - build: 'arm64-v8a' | |
| defines: '-DANDROID_ABI=arm64-v8a' | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| repository: ggerganov/llama.cpp | |
| fetch-depth: 0 | |
| ref: '${{ github.event.inputs.llama_cpp_commit }}' | |
| - uses: nttld/setup-ndk@v1 | |
| id: setup-ndk | |
| with: | |
| ndk-version: r26d | |
| add-to-path: false | |
| - name: Build | |
| id: cmake_build | |
| env: | |
| CMAKE_FLAGS: '-DCMAKE_TOOLCHAIN_FILE=${{ steps.setup-ndk.outputs.ndk-path }}/build/cmake/android.toolchain.cmake -DANDROID_PLATFORM=android-23' | |
| run: | | |
| mkdir build | |
| cd build | |
| cmake .. ${{ env.COMMON_DEFINE }} ${{ env.CMAKE_FLAGS }} ${{ matrix.defines }} | |
| cmake --build . --config Release -j ${env:NUMBER_OF_PROCESSORS} | |
| cd .. | |
| ls -R | |
| - name: Upload Llama | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| path: ./build/src/libllama.so | |
| name: llama-bin-android-${{ matrix.build }}.so | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| path: ./build/ggml/src/libggml.so | |
| name: ggml-bin-android-${{ matrix.build }}.so | |
| if-no-files-found: error | |
| - name: Upload mtmd | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| path: ./build/examples/mtmd/libmtmd_shared.so | |
| name: mtmd-bin-android-${{ matrix.build }}.so | |
| build-deps: | |
| runs-on: ubuntu-latest | |
| name: "Gather Binaries" | |
| if: ${{ always() }} | |
| needs: [ | |
| "compile-linux", | |
| "compile-musl", | |
| "compile-windows", | |
| "compile-vulkan", | |
| "compile-cublas", | |
| "compile-macos", | |
| "compile-android" | |
| ] | |
| steps: | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| path: artifacts | |
| - name: List Files | |
| run: ls -R | |
| - name: Rearrange Files | |
| run: | | |
| # Make all directories at once | |
| mkdir --parents deps/{noavx,avx,avx2,avx512,musl-noavx,musl-avx,musl-avx2,musl-avx512,osx-arm64,osx-x64,osx-x64-rosetta2,cu11.7.1,cu12.2.0,vulkan,android-arm64-v8a,android-x86,android-x86_64} | |
| # Linux | |
| cp artifacts/ggml-bin-linux-noavx-x64.so/libggml.so deps/noavx/libggml.so | |
| cp artifacts/ggml-base-bin-linux-noavx-x64.so/libggml-base.so deps/noavx/libggml-base.so | |
| cp artifacts/ggml-cpu-bin-linux-noavx-x64.so/libggml-cpu.so deps/noavx/libggml-cpu.so | |
| cp artifacts/llama-bin-linux-noavx-x64.so/libllama.so deps/noavx/libllama.so | |
| cp artifacts/mtmd-bin-linux-noavx-x64.so/libmtmd_shared.so deps/noavx/libmtmd_shared.so | |
| cp artifacts/ggml-bin-linux-avx-x64.so/libggml.so deps/avx/libggml.so | |
| cp artifacts/ggml-base-bin-linux-avx-x64.so/libggml-base.so deps/avx/libggml-base.so | |
| cp artifacts/ggml-cpu-bin-linux-avx-x64.so/libggml-cpu.so deps/avx/libggml-cpu.so | |
| cp artifacts/llama-bin-linux-avx-x64.so/libllama.so deps/avx/libllama.so | |
| cp artifacts/mtmd-bin-linux-avx-x64.so/libmtmd_shared.so deps/avx/libmtmd_shared.so | |
| cp artifacts/ggml-bin-linux-avx2-x64.so/libggml.so deps/avx2/libggml.so | |
| cp artifacts/ggml-base-bin-linux-avx2-x64.so/libggml-base.so deps/avx2/libggml-base.so | |
| cp artifacts/ggml-cpu-bin-linux-avx2-x64.so/libggml-cpu.so deps/avx2/libggml-cpu.so | |
| cp artifacts/llama-bin-linux-avx2-x64.so/libllama.so deps/avx2/libllama.so | |
| cp artifacts/mtmd-bin-linux-avx2-x64.so/libmtmd_shared.so deps/avx2/libmtmd_shared.so | |
| cp artifacts/ggml-bin-linux-avx512-x64.so/libggml.so deps/avx512/libggml.so | |
| cp artifacts/ggml-base-bin-linux-avx512-x64.so/libggml-base.so deps/avx512/libggml-base.so | |
| cp artifacts/ggml-cpu-bin-linux-avx512-x64.so/libggml-cpu.so deps/avx512/libggml-cpu.so | |
| cp artifacts/llama-bin-linux-avx512-x64.so/libllama.so deps/avx512/libllama.so | |
| cp artifacts/mtmd-bin-linux-avx512-x64.so/libmtmd_shared.so deps/avx512/libmtmd_shared.so | |
| # Musl | |
| cp artifacts/ggml-bin-musl-noavx-x64.so/libggml.so deps/musl-noavx/libggml.so | |
| cp artifacts/ggml-base-bin-musl-noavx-x64.so/libggml-base.so deps/musl-noavx/libggml-base.so | |
| cp artifacts/ggml-cpu-bin-musl-noavx-x64.so/libggml-cpu.so deps/musl-noavx/libggml-cpu.so | |
| cp artifacts/llama-bin-musl-noavx-x64.so/libllama.so deps/musl-noavx/libllama.so | |
| cp artifacts/mtmd-bin-musl-noavx-x64.so/libmtmd_shared.so deps/musl-noavx/libmtmd_shared.so | |
| cp artifacts/ggml-bin-musl-avx-x64.so/libggml.so deps/musl-avx/libggml.so | |
| cp artifacts/ggml-base-bin-musl-avx-x64.so/libggml-base.so deps/musl-avx/libggml-base.so | |
| cp artifacts/ggml-cpu-bin-musl-avx-x64.so/libggml-cpu.so deps/musl-avx/libggml-cpu.so | |
| cp artifacts/llama-bin-musl-avx-x64.so/libllama.so deps/musl-avx/libllama.so | |
| cp artifacts/mtmd-bin-musl-avx-x64.so/libmtmd_shared.so deps/musl-avx/libmtmd_shared.so | |
| cp artifacts/ggml-bin-musl-avx2-x64.so/libggml.so deps/musl-avx2/libggml.so | |
| cp artifacts/ggml-base-bin-musl-avx2-x64.so/libggml-base.so deps/musl-avx2/libggml-base.so | |
| cp artifacts/ggml-cpu-bin-musl-avx2-x64.so/libggml-cpu.so deps/musl-avx2/libggml-cpu.so | |
| cp artifacts/llama-bin-musl-avx2-x64.so/libllama.so deps/musl-avx2/libllama.so | |
| cp artifacts/mtmd-bin-musl-avx2-x64.so/libmtmd_shared.so deps/musl-avx2/libmtmd_shared.so | |
| cp artifacts/ggml-bin-musl-avx512-x64.so/libggml.so deps/musl-avx512/libggml.so | |
| cp artifacts/ggml-base-bin-musl-avx512-x64.so/libggml-base.so deps/musl-avx512/libggml-base.so | |
| cp artifacts/ggml-cpu-bin-musl-avx512-x64.so/libggml-cpu.so deps/musl-avx512/libggml-cpu.so | |
| cp artifacts/llama-bin-musl-avx512-x64.so/libllama.so deps/musl-avx512/libllama.so | |
| cp artifacts/mtmd-bin-musl-avx512-x64.so/libmtmd_shared.so deps/musl-avx512/libmtmd_shared.so | |
| # Windows | |
| cp artifacts/ggml-bin-win-noavx-x64.dll/ggml.dll deps/noavx/ggml.dll | |
| cp artifacts/ggml-base-bin-win-noavx-x64.dll/ggml-base.dll deps/noavx/ggml-base.dll | |
| cp artifacts/ggml-cpu-bin-win-noavx-x64.dll/ggml-cpu.dll deps/noavx/ggml-cpu.dll | |
| cp artifacts/llama-bin-win-noavx-x64.dll/llama.dll deps/noavx/llama.dll | |
| cp artifacts/mtdm-bin-win-noavx-x64.dll/mtdm_shared.dll deps/noavx/mtdm_shared.dll | |
| cp artifacts/ggml-bin-win-avx-x64.dll/ggml.dll deps/avx/ggml.dll | |
| cp artifacts/ggml-base-bin-win-avx-x64.dll/ggml-base.dll deps/avx/ggml-base.dll | |
| cp artifacts/ggml-cpu-bin-win-avx-x64.dll/ggml-cpu.dll deps/avx/ggml-cpu.dll | |
| cp artifacts/llama-bin-win-avx-x64.dll/llama.dll deps/avx/llama.dll | |
| cp artifacts/mtdm-bin-win-avx-x64.dll/mtdm_shared.dll deps/avx/mtdm_shared.dll | |
| cp artifacts/ggml-bin-win-avx2-x64.dll/ggml.dll deps/avx2/ggml.dll | |
| cp artifacts/ggml-base-bin-win-avx2-x64.dll/ggml-base.dll deps/avx2/ggml-base.dll | |
| cp artifacts/ggml-cpu-bin-win-avx2-x64.dll/ggml-cpu.dll deps/avx2/ggml-cpu.dll | |
| cp artifacts/llama-bin-win-avx2-x64.dll/llama.dll deps/avx2/llama.dll | |
| cp artifacts/mtdm-bin-win-avx2-x64.dll/mtdm_shared.dll deps/avx2/mtdm_shared.dll | |
| cp artifacts/ggml-bin-win-avx512-x64.dll/ggml.dll deps/avx512/ggml.dll | |
| cp artifacts/ggml-base-bin-win-avx512-x64.dll/ggml-base.dll deps/avx512/ggml-base.dll | |
| cp artifacts/ggml-cpu-bin-win-avx512-x64.dll/ggml-cpu.dll deps/avx512/ggml-cpu.dll | |
| cp artifacts/llama-bin-win-avx512-x64.dll/llama.dll deps/avx512/llama.dll | |
| cp artifacts/mtdm-bin-win-avx512-x64.dll/mtdm_shared.dll deps/avx512/mtdm_shared.dll | |
| # MacOS | |
| cp artifacts/ggml-bin-osx-arm64.dylib/libggml.dylib deps/osx-arm64/libggml.dylib | |
| cp artifacts/ggml-base-bin-osx-arm64.dylib/libggml-base.dylib deps/osx-arm64/libggml-base.dylib | |
| cp artifacts/ggml-cpu-bin-osx-arm64.dylib/libggml-cpu.dylib deps/osx-arm64/libggml-cpu.dylib | |
| cp artifacts/ggml-blas-bin-osx-arm64.dylib/libggml-blas.dylib deps/osx-arm64/libggml-blas.dylib | |
| cp artifacts/ggml-metal-bin-osx-arm64.dylib/libggml-metal.dylib deps/osx-arm64/libggml-metal.dylib | |
| cp artifacts/llama-bin-osx-arm64.dylib/libllama.dylib deps/osx-arm64/libllama.dylib | |
| cp artifacts/mtdm-bin-osx-arm64.dylib/libmtmd_shared.dylib deps/osx-arm64/libmtmd_shared.dylib | |
| cp artifacts/ggml-metal.metal/ggml-metal.metal deps/osx-arm64/ggml-metal.metal | |
| cp artifacts/ggml-bin-osx-x64.dylib/libggml.dylib deps/osx-x64/libggml.dylib | |
| cp artifacts/ggml-base-bin-osx-x64.dylib/libggml-base.dylib deps/osx-x64/libggml-base.dylib | |
| cp artifacts/ggml-cpu-bin-osx-x64.dylib/libggml-cpu.dylib deps/osx-x64/libggml-cpu.dylib | |
| cp artifacts/ggml-blas-bin-osx-x64.dylib/libggml-blas.dylib deps/osx-x64/libggml-blas.dylib | |
| cp artifacts/llama-bin-osx-x64.dylib/libllama.dylib deps/osx-x64/libllama.dylib | |
| cp artifacts/mtdm-bin-osx-x64.dylib/libmtmd_shared.dylib deps/osx-x64/libmtmd_shared.dylib | |
| cp artifacts/ggml-bin-osx-x64-rosetta2.dylib/libggml.dylib deps/osx-x64-rosetta2/libggml.dylib | |
| cp artifacts/ggml-base-bin-osx-x64-rosetta2.dylib/libggml-base.dylib deps/osx-x64-rosetta2/libggml-base.dylib | |
| cp artifacts/ggml-cpu-bin-osx-x64-rosetta2.dylib/libggml-cpu.dylib deps/osx-x64-rosetta2/libggml-cpu.dylib | |
| cp artifacts/ggml-blas-bin-osx-x64-rosetta2.dylib/libggml-blas.dylib deps/osx-x64-rosetta2/libggml-blas.dylib | |
| cp artifacts/llama-bin-osx-x64-rosetta2.dylib/libllama.dylib deps/osx-x64-rosetta2/libllama.dylib | |
| cp artifacts/mtdm-bin-osx-x64-rosetta2.dylib/libmtmd_shared.dylib deps/osx-x64-rosetta2/libmtmd_shared.dylib | |
| # Android | |
| #cp artifacts/ggml-bin-android-arm64-v8a.so/libggml.so deps/android-arm64-v8a/libggml.so | |
| #cp artifacts/llama-bin-android-arm64-v8a.so/libllama.so deps/android-arm64-v8a/libllama.so | |
| #cp artifacts/mtdm-bin-android-arm64-v8a.so/libmtdm_shared.so deps/android-arm64-v8a/libmtdm_shared.so | |
| #cp artifacts/ggml-bin-android-x86.so/libggml.so deps/android-x86/libggml.so | |
| #cp artifacts/llama-bin-android-x86.so/libllama.so deps/android-x86/libllama.so | |
| #cp artifacts/mtdm-bin-android-x86.so/libmtdm_shared.so deps/android-x86/libmtdm_shared.so | |
| #cp artifacts/ggml-bin-android-x86_64.so/libggml.so deps/android-x86_64/libggml.so | |
| #cp artifacts/llama-bin-android-x86_64.so/libllama.so deps/android-x86_64/libllama.so | |
| #cp artifacts/mtdm-bin-android-x86_64.so/libmtdm_shared.so deps/android-x86_64/libmtdm_shared.so | |
| # Windows CUDA | |
| cp artifacts/ggml-bin-win-cublas-cu11.7.1-x64.dll/ggml.dll deps/cu11.7.1/ggml.dll | |
| cp artifacts/ggml-base-bin-win-cublas-cu11.7.1-x64.dll/ggml-base.dll deps/cu11.7.1/ggml-base.dll | |
| cp artifacts/ggml-cuda-bin-win-cublas-cu11.7.1-x64.dll/ggml-cuda.dll deps/cu11.7.1/ggml-cuda.dll | |
| cp artifacts/llama-bin-win-cublas-cu11.7.1-x64.dll/llama.dll deps/cu11.7.1/llama.dll | |
| cp artifacts/mtdm-bin-win-cublas-cu11.7.1-x64.dll/mtdm_shared.dll deps/cu11.7.1/mtdm_shared.dll | |
| cp artifacts/ggml-bin-win-cublas-cu12.2.0-x64.dll/ggml.dll deps/cu12.2.0/ggml.dll | |
| cp artifacts/ggml-base-bin-win-cublas-cu12.2.0-x64.dll/ggml-base.dll deps/cu12.2.0/ggml-base.dll | |
| cp artifacts/ggml-cuda-bin-win-cublas-cu12.2.0-x64.dll/ggml-cuda.dll deps/cu12.2.0/ggml-cuda.dll | |
| cp artifacts/llama-bin-win-cublas-cu12.2.0-x64.dll/llama.dll deps/cu12.2.0/llama.dll | |
| cp artifacts/mtdm-bin-win-cublas-cu12.2.0-x64.dll/mtdm_shared.dll deps/cu12.2.0/mtdm_shared.dll | |
| # Linux CUDA | |
| cp artifacts/ggml-bin-linux-cublas-cu11.7.1-x64.so/libggml.so deps/cu11.7.1/libggml.so | |
| cp artifacts/ggml-base-bin-linux-cublas-cu11.7.1-x64.so/libggml-base.so deps/cu11.7.1/libggml-base.so | |
| cp artifacts/ggml-cuda-bin-linux-cublas-cu11.7.1-x64.so/libggml-cuda.so deps/cu11.7.1/libggml-cuda.so | |
| cp artifacts/llama-bin-linux-cublas-cu11.7.1-x64.so/libllama.so deps/cu11.7.1/libllama.so | |
| cp artifacts/mtdm-bin-linux-cublas-cu11.7.1-x64.so/libmtdm_shared.so deps/cu11.7.1/libmtdm_shared.so | |
| cp artifacts/ggml-bin-linux-cublas-cu12.2.0-x64.so/libggml.so deps/cu12.2.0/libggml.so | |
| cp artifacts/ggml-base-bin-linux-cublas-cu12.2.0-x64.so/libggml-base.so deps/cu12.2.0/libggml-base.so | |
| cp artifacts/ggml-cuda-bin-linux-cublas-cu12.2.0-x64.so/libggml-cuda.so deps/cu12.2.0/libggml-cuda.so | |
| cp artifacts/llama-bin-linux-cublas-cu12.2.0-x64.so/libllama.so deps/cu12.2.0/libllama.so | |
| cp artifacts/mtdm-bin-linux-cublas-cu12.2.0-x64.so/libmtdm_shared.so deps/cu12.2.0/libmtdm_shared.so | |
| # Windows Vulkan | |
| cp artifacts/ggml-bin-win-vulkan-x64.dll/ggml.dll deps/vulkan/ggml.dll | |
| cp artifacts/ggml-base-bin-win-vulkan-x64.dll/ggml-base.dll deps/vulkan/ggml-base.dll | |
| cp artifacts/ggml-vulkan-bin-win-vulkan-x64.dll/ggml-vulkan.dll deps/vulkan/ggml-vulkan.dll | |
| cp artifacts/llama-bin-win-vulkan-x64.dll/llama.dll deps/vulkan/llama.dll | |
| cp artifacts/mtdm-bin-win-vulkan-x64.dll/mtdm_shared.dll deps/vulkan/mtdm_shared.dll | |
| # Linux Vulkan | |
| cp artifacts/ggml-bin-linux-vulkan-x64.so/libggml.so deps/vulkan/libggml.so | |
| cp artifacts/ggml-base-bin-linux-vulkan-x64.so/libggml-base.so deps/vulkan/libggml-base.so | |
| cp artifacts/ggml-vulkan-bin-linux-vulkan-x64.so/libggml-vulkan.so deps/vulkan/libggml-vulkan.so | |
| cp artifacts/llama-bin-linux-vulkan-x64.so/libllama.so deps/vulkan/libllama.so | |
| cp artifacts/mtdm-bin-linux-vulkan-x64.so/libmtdm_shared.so deps/vulkan/libmtdm_shared.so | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| path: deps/ | |
| name: deps | |
| # - name: Remove Artifacts | |
| # uses: geekyeggo/delete-artifact@v5 | |
| # with: | |
| # name: | | |
| # llama-* | |
| # mtdm-* | |
| # *.metal | |
| # ggml-* |