From d81cdaa84325bc4257152719b3ab1f5eb5577f5a Mon Sep 17 00:00:00 2001 From: thxCode Date: Thu, 26 Dec 2024 21:47:09 +0800 Subject: [PATCH] ci: fix build - windows amd64 - remove darwin ccache Signed-off-by: thxCode --- .github/workflows/ci.yml | 42 +++++++++++++--------------------------- CMakeLists.txt | 14 -------------- 2 files changed, 13 insertions(+), 43 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 83d87aa..d8dfe2e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,7 +22,8 @@ on: - "**.mdx" - "**.png" - "**.jpg" - - "!.github/workflows/ci.yml" + - ".github/workflows/prune.yml" + - ".github/workflows/sync.yml" pull_request: branches: - "main" @@ -32,7 +33,8 @@ on: - "**.mdx" - "**.png" - "**.jpg" - - "!.github/workflows/ci.yml" + - ".github/workflows/prune.yml" + - ".github/workflows/sync.yml" concurrency: group: ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }} @@ -58,23 +60,14 @@ jobs: with: fetch-depth: 0 submodules: 'recursive' - - name: Setup Cache - timeout-minutes: 5 - uses: actions/cache@v4 - with: - key: cache-darwin-${{ matrix.arch }}-${{ matrix.instruction }} - path: | - ${{ github.workspace }}/.cache - name: Deps run: | - brew update && brew install ccache + brew update - name: Setup XCode uses: maxim-lobanov/setup-xcode@v1 with: xcode-version: '15.2' - name: Build - env: - CCACHE_DIR: "${{ github.workspace }}/.cache/ccache" run: | echo "===== BUILD =====" mkdir -p ${{ github.workspace }}/.cache @@ -83,7 +76,7 @@ jobs: -DGGML_NATIVE=on \ -DGGML_OPENMP=off \ -DGGML_RPC=on - cmake --build ${{ github.workspace }}/build --target llama-box --config Release -- -j $(nproc) + cmake --build ${{ github.workspace }}/build --target llama-box --config Release -- -j $(sysctl -n hw.physicalcpu) echo "===== RESULT =====" ls -alh ${{ github.workspace }}/build/bin/ @@ -121,23 +114,14 @@ jobs: with: fetch-depth: 0 submodules: 'recursive' - - name: Setup Cache - timeout-minutes: 5 - uses: actions/cache@v4 - with: - key: cache-darwin-metal-${{ matrix.arch }}-${{ matrix.version }} - path: | - ${{ github.workspace }}/.cache - name: Deps run: | - brew update && brew install ccache + brew update - name: Setup XCode uses: maxim-lobanov/setup-xcode@v1 with: xcode-version: '15.2' - name: Build - env: - CCACHE_DIR: "${{ github.workspace }}/.cache/ccache" run: | echo "===== BUILD =====" mkdir -p ${{ github.workspace }}/.cache @@ -146,7 +130,7 @@ jobs: -DGGML_NATIVE=on \ -DGGML_OPENMP=off \ -DGGML_RPC=on - cmake --build ${{ github.workspace }}/build --target llama-box --config Release -- -j $(nproc) + cmake --build ${{ github.workspace }}/build --target llama-box --config Release -- -j $(sysctl -n hw.physicalcpu) echo "===== RESULT =====" ls -alh ${{ github.workspace }}/build/bin/ @@ -290,8 +274,8 @@ jobs: echo "===== BUILD =====" cmake -S ${{ github.workspace }} -B ${{ github.workspace }}/build -DCMAKE_BUILD_TYPE=Release \ -DGGML_NATIVE=off \ - ${{ matrix.instruction == 'avx2' && '-DGGML_AVX=on -DGGML_AVX2=on' || '' }} \ - ${{ matrix.instruction == 'avx512' && '-DGGML_AVX512=on -DGGML_AVX512_VBMI=on -DGGML_AVX512_VNNI=on -DGGML_AVX512_BF16=on' || '' }} \ + ${{ matrix.instruction == 'avx2' && '-DGGML_AVX=on -DGGML_AVX_VNNI=off -DGGML_AVX2=on' || '' }} \ + ${{ matrix.instruction == 'avx512' && '-DGGML_AVX512=on -DGGML_AVX512_BF16=off -DGGML_AVX512_VBMI=on -DGGML_AVX512_VNNI=on' || '' }} \ ${{ matrix.instruction == 'neon' && '-DGGML_CPU_ARM_ARCH="armv8.2-a"' || '' }} \ -DGGML_BLAS_VENDOR=OpenBLAS \ -DGGML_STATIC=on \ @@ -994,10 +978,10 @@ jobs: Write-Host "===== BUILD =====" New-Item -Force -ItemType Directory -Path "${{ github.workspace }}\.cache" -ErrorAction Ignore | Out-Null cmake ${{ matrix.arch == 'arm64' && '-G "Ninja Multi-Config"'|| '' }} -S ${{ github.workspace }} -B ${{ github.workspace }}\build -DCMAKE_BUILD_TYPE=Release ` - ${{ matrix.arch == 'arm64' && format('-DCMAKE_TOOLCHAIN_FILE={0}\llama-box\scripts\build-windows-arm64.cmake', github.workspace) || '' }} ` -DGGML_NATIVE=off ` - ${{ matrix.instruction == 'avx2' && '-DGGML_AVX=on -DGGML_AVX2=on' || '' }} ` - ${{ matrix.instruction == 'avx512' && '-DGGML_AVX512=on -DGGML_AVX512_VBMI=on -DGGML_AVX512_VNNI=on -DGGML_AVX512_BF16=on' || '' }} ` + ${{ matrix.instruction == 'avx2' && '-DGGML_AVX=on -DGGML_AVX_VNNI=off -DGGML_AVX2=on' || '' }} ` + ${{ matrix.instruction == 'avx512' && '-DGGML_AVX512=on -DGGML_AVX512_BF16=off -DGGML_AVX512_VBMI=on -DGGML_AVX512_VNNI=on' || '' }} ` + ${{ matrix.instruction == 'neon' && format('-DCMAKE_TOOLCHAIN_FILE={0}\llama-box\scripts\build-windows-arm64.cmake', github.workspace) || '' }} ` -DGGML_STATIC=on ` -DGGML_OPENMP=off ` -DGGML_RPC=on diff --git a/CMakeLists.txt b/CMakeLists.txt index 3e74063..8c44918 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -25,9 +25,6 @@ endif() # Options # -# general -option(LLAMA_CCACHE "llama: use ccache if available" ON) - # debug option(LLAMA_ALL_WARNINGS "llama: enable all compiler warnings" ON) option(LLAMA_ALL_WARNINGS_3RD_PARTY "llama: enable all compiler warnings in 3rd party libs" OFF) @@ -180,17 +177,6 @@ if (WIN32) endif () endif () -if (LLAMA_CCACHE) - find_program(LLAMA_CCACHE_FOUND ccache) - if (LLAMA_CCACHE_FOUND) - set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache) - set(ENV{CCACHE_SLOPPINESS} time_macros) - message(STATUS "ccache found, compilation results will be cached. Disable with LLAMA_CCACHE=OFF.") - else () - message(STATUS "Warning: ccache not found - consider installing it for faster compilation or disable this warning with LLAMA_CCACHE=OFF") - endif () -endif () - # # Programs #