echodict/llama.cpp
version https://git-lfs.github.com/spec/v1 oid sha256:cfc44b7ba25614df70e6b65e3341cae0310163bd32fd31a6b928a542df433faf size 30786
0773
1name: CI (riscv)2 3on:4 workflow_dispatch: # allows manual triggering5 push:6 branches:7 - master8 paths: [9 '.github/workflows/build-riscv.yml',10 '**/CMakeLists.txt',11 '**/.cmake',12 '**/*.h',13 '**/*.hpp',14 '**/*.c',15 '**/*.cpp'16 ]17 18 pull_request:19 types: [opened, synchronize, reopened]20 paths: [21 '.github/workflows/build-riscv.yml',22 'ggml/src/ggml-cpu/arch/riscv/**'23 ]24 25concurrency:26 group: ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }}27 cancel-in-progress: true28 29env:30 GGML_NLOOP: 331 GGML_N_THREADS: 132 LLAMA_LOG_COLORS: 133 LLAMA_LOG_PREFIX: 134 LLAMA_LOG_TIMESTAMPS: 135 36jobs:37 ubuntu-riscv64-native-sanitizer:38 runs-on: ubuntu-24.04-riscv39 40 continue-on-error: true41 42 strategy:43 matrix:44 sanitizer: [ADDRESS, THREAD, UNDEFINED]45 build_type: [Debug]46 47 steps:48 - name: Install dependencies49 run: |50 # Set gcc-14 and g++-14 as the default compilers51 sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-14 10052 sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-14 10053 54 git lfs install55 56 - name: GCC version check57 run: |58 gcc --version59 g++ --version60 61 - name: Clone62 id: checkout63 uses: actions/checkout@v664 65 - name: ccache66 uses: ggml-org/ccache-action@afde29e5b5422e5da23cb1f639e8baecadeadfc3 # https://github.com/ggml-org/ccache-action/pull/167 with:68 key: ubuntu-riscv64-native-sanitizer-${{ matrix.sanitizer }}-${{ matrix.build_type }}69 evict-old-files: 1d70 save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}71 72 - name: Build73 id: cmake_build74 if: ${{ matrix.sanitizer != 'THREAD' }}75 run: |76 cmake -B build \77 -DLLAMA_OPENSSL=OFF \78 -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \79 -DGGML_OPENMP=ON \80 -DLLAMA_BUILD_EXAMPLES=ON \81 -DLLAMA_BUILD_TOOLS=ON \82 -DLLAMA_BUILD_TESTS=OFF \83 -DCMAKE_C_COMPILER_LAUNCHER=ccache \84 -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \85 -DLLAMA_SANITIZE_${{ matrix.sanitizer }}=ON \86 -DCMAKE_C_COMPILER=riscv64-linux-gnu-gcc-14 \87 -DCMAKE_CXX_COMPILER=riscv64-linux-gnu-g++-1488 89 cmake --build build --config ${{ matrix.build_type }} -j $(nproc)90 91 - name: Build (no OpenMP)92 id: cmake_build_no_openmp93 if: ${{ matrix.sanitizer == 'THREAD' }}94 run: |95 cmake -B build \96 -DLLAMA_OPENSSL=OFF \97 -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \98 -DGGML_OPENMP=OFF \99 -DLLAMA_BUILD_EXAMPLES=ON \100 -DLLAMA_BUILD_TOOLS=ON \101 -DLLAMA_BUILD_TESTS=OFF \102 -DCMAKE_C_COMPILER_LAUNCHER=ccache \103 -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \104 -DLLAMA_SANITIZE_${{ matrix.sanitizer }}=ON \105 -DCMAKE_C_COMPILER=riscv64-linux-gnu-gcc-14 \106 -DCMAKE_CXX_COMPILER=riscv64-linux-gnu-g++-14107 108 cmake --build build --config ${{ matrix.build_type }} -j $(nproc)109 110 - name: Test111 id: cmake_test112 run: |113 cd build114 ctest -L main --verbose --timeout 900115 