From c24dc3ae2f61cf32b6198435dd6e24b7c0fd0cee Mon Sep 17 00:00:00 2001 From: Ali Tariq Date: Sun, 29 Jun 2025 13:41:40 +0500 Subject: [PATCH 01/18] Changed the CI file to hw --- .devops/cloud-v-pipeline | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.devops/cloud-v-pipeline b/.devops/cloud-v-pipeline index af8c0cea6155c..8136dfe5dd8a3 100644 --- a/.devops/cloud-v-pipeline +++ b/.devops/cloud-v-pipeline @@ -1,4 +1,4 @@ -node('x86_runner1'){ // Running on x86 runner containing latest vector qemu, latest vector gcc and all the necessary libraries +node('jupiter-16G-1'){ // Running on x86 runner containing latest vector qemu, latest vector gcc and all the necessary libraries stage('Cleanup'){ cleanWs() // Cleaning previous CI build in workspace } @@ -9,14 +9,13 @@ node('x86_runner1'){ // Running on x86 runner containing latest vecto } stage('Compiling llama.cpp'){ sh'''#!/bin/bash - make RISCV=1 RISCV_CROSS_COMPILE=1 # Compiling llama for RISC-V + cmake -B build + cmake --build build --config Release -j8 --target llama-cli llama-quantize ''' } stage('Running llama.cpp'){ sh'''#!/bin/bash - module load gnu-bin2/0.1 # loading latest versions of vector qemu and vector gcc - qemu-riscv64 -L /softwares/gnu-bin2/sysroot -cpu rv64,v=true,vlen=256,elen=64,vext_spec=v1.0 ./llama-cli -m /home/alitariq/codellama-7b.Q4_K_M.gguf -p "Anything" -n 9 > llama_log.txt # Running llama.cpp on vector qemu-riscv64 - cat llama_log.txt # Printing results + ./build/bin/llama-cli -m {GGUF_WEIGHT} -p "Hi, how are you?" -n 20 ''' } } From c465ebe4f3e9a0cea12622e8f8011a4e01d07e84 Mon Sep 17 00:00:00 2001 From: Ali Tariq Date: Sun, 29 Jun 2025 13:56:01 +0500 Subject: [PATCH 02/18] Changed the CI file to hw --- .devops/cloud-v-pipeline | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.devops/cloud-v-pipeline b/.devops/cloud-v-pipeline index 8136dfe5dd8a3..bf6456cbd725c 100644 --- a/.devops/cloud-v-pipeline +++ b/.devops/cloud-v-pipeline @@ -2,6 +2,14 @@ node('jupiter-16G-1'){ // Running on x86 runner containing latest vec stage('Cleanup'){ cleanWs() // Cleaning previous CI build in workspace } + stage('Install dependencies'){ + sh''' + #!/bin/bash + sudo apt-get update + sudo apt-get install -y cmake build-essential git curl + git clone + ''' + } stage('checkout repo'){ retry(5){ // Retry if the cloning fails due to some reason checkout scm // Clone the repo on Runner From b5997461d47431b7e80916df78e053ae00b178a2 Mon Sep 17 00:00:00 2001 From: Ali Tariq Date: Sun, 29 Jun 2025 13:56:49 +0500 Subject: [PATCH 03/18] Added to sudoers for apt --- .devops/cloud-v-pipeline | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.devops/cloud-v-pipeline b/.devops/cloud-v-pipeline index bf6456cbd725c..24cded66396aa 100644 --- a/.devops/cloud-v-pipeline +++ b/.devops/cloud-v-pipeline @@ -5,8 +5,8 @@ node('jupiter-16G-1'){ // Running on x86 runner containing latest vec stage('Install dependencies'){ sh''' #!/bin/bash - sudo apt-get update - sudo apt-get install -y cmake build-essential git curl + sudo apt update + sudo apt install -y cmake build-essential git curl git clone ''' } From 9342a376b9504ceafa3533d93b2fe8ea7cd71fd3 Mon Sep 17 00:00:00 2001 From: Ali Tariq Date: Sun, 29 Jun 2025 14:02:38 +0500 Subject: [PATCH 04/18] Removed the clone command and used checkout --- .devops/cloud-v-pipeline | 1 - 1 file changed, 1 deletion(-) diff --git a/.devops/cloud-v-pipeline b/.devops/cloud-v-pipeline index 24cded66396aa..7b591593f1843 100644 --- a/.devops/cloud-v-pipeline +++ b/.devops/cloud-v-pipeline @@ -7,7 +7,6 @@ node('jupiter-16G-1'){ // Running on x86 runner containing latest vec #!/bin/bash sudo apt update sudo apt install -y cmake build-essential git curl - git clone ''' } stage('checkout repo'){ From bb1981819fddcbc9b4fc345cb0f79a3fddae10bf Mon Sep 17 00:00:00 2001 From: Ali Tariq Date: Sun, 29 Jun 2025 14:06:16 +0500 Subject: [PATCH 05/18] Added libcurl --- .devops/cloud-v-pipeline | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devops/cloud-v-pipeline b/.devops/cloud-v-pipeline index 7b591593f1843..5db89cabe3034 100644 --- a/.devops/cloud-v-pipeline +++ b/.devops/cloud-v-pipeline @@ -6,7 +6,7 @@ node('jupiter-16G-1'){ // Running on x86 runner containing latest vec sh''' #!/bin/bash sudo apt update - sudo apt install -y cmake build-essential git curl + sudo apt install -y cmake build-essential git curl libcurl4-openssl-dev ''' } stage('checkout repo'){ From b4024268fad132a915082fb913b7fa041c6e7ef1 Mon Sep 17 00:00:00 2001 From: Ali Tariq Date: Sun, 29 Jun 2025 15:04:42 +0500 Subject: [PATCH 06/18] Added gcc-14 --- .devops/cloud-v-pipeline | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.devops/cloud-v-pipeline b/.devops/cloud-v-pipeline index 5db89cabe3034..1907e4a4cfc9c 100644 --- a/.devops/cloud-v-pipeline +++ b/.devops/cloud-v-pipeline @@ -5,6 +5,9 @@ node('jupiter-16G-1'){ // Running on x86 runner containing latest vec stage('Install dependencies'){ sh''' #!/bin/bash + + set -x + sudo apt update sudo apt install -y cmake build-essential git curl libcurl4-openssl-dev ''' @@ -16,13 +19,22 @@ node('jupiter-16G-1'){ // Running on x86 runner containing latest vec } stage('Compiling llama.cpp'){ sh'''#!/bin/bash + + set -x + + alias gcc='/usr/bin/gcc-14' # Workaround for RVV error + alias g++='/usr/bin/g++-14' # Workaround for RVV error + cmake -B build cmake --build build --config Release -j8 --target llama-cli llama-quantize ''' } stage('Running llama.cpp'){ sh'''#!/bin/bash - ./build/bin/llama-cli -m {GGUF_WEIGHT} -p "Hi, how are you?" -n 20 + + set -x + + ./build/bin/llama-cli -m {GGUF_WEIGHT} -p "Hi, how are you?" -n 10 ''' } } From e608c004e04da7938801175cf3dbea6620ef4702 Mon Sep 17 00:00:00 2001 From: Ali Tariq Date: Sun, 29 Jun 2025 15:07:22 +0500 Subject: [PATCH 07/18] Checking gcc --version --- .devops/cloud-v-pipeline | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.devops/cloud-v-pipeline b/.devops/cloud-v-pipeline index 1907e4a4cfc9c..6e9d37d19f089 100644 --- a/.devops/cloud-v-pipeline +++ b/.devops/cloud-v-pipeline @@ -25,6 +25,9 @@ node('jupiter-16G-1'){ // Running on x86 runner containing latest vec alias gcc='/usr/bin/gcc-14' # Workaround for RVV error alias g++='/usr/bin/g++-14' # Workaround for RVV error + gcc --version + g++ --version + cmake -B build cmake --build build --config Release -j8 --target llama-cli llama-quantize ''' From 585720414ae7e41f0796b731ce76036c3abc488d Mon Sep 17 00:00:00 2001 From: Ali Tariq Date: Sun, 29 Jun 2025 15:13:13 +0500 Subject: [PATCH 08/18] added gcc-14 symlink --- .devops/cloud-v-pipeline | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.devops/cloud-v-pipeline b/.devops/cloud-v-pipeline index 6e9d37d19f089..2048545d8c919 100644 --- a/.devops/cloud-v-pipeline +++ b/.devops/cloud-v-pipeline @@ -22,12 +22,18 @@ node('jupiter-16G-1'){ // Running on x86 runner containing latest vec set -x - alias gcc='/usr/bin/gcc-14' # Workaround for RVV error - alias g++='/usr/bin/g++-14' # Workaround for RVV error + mkdir -p .compiler_override + + # Create symlinks in this temp directory + ln -sf /usr/bin/gcc-14 .compiler_override/gcc + ln -sf /usr/bin/g++-14 .compiler_override/g++ + + # Prepend the temp directory to PATH for this script's execution + export PATH="$PWD/.compiler_override:$PATH" gcc --version g++ --version - + cmake -B build cmake --build build --config Release -j8 --target llama-cli llama-quantize ''' From 48fc7c566e4a06f3caf0485828443f0097eeb047 Mon Sep 17 00:00:00 2001 From: Ali Tariq Date: Sun, 29 Jun 2025 15:22:59 +0500 Subject: [PATCH 09/18] added CC and C++ variables --- .devops/cloud-v-pipeline | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.devops/cloud-v-pipeline b/.devops/cloud-v-pipeline index 2048545d8c919..b6e977a3d8b5a 100644 --- a/.devops/cloud-v-pipeline +++ b/.devops/cloud-v-pipeline @@ -28,6 +28,9 @@ node('jupiter-16G-1'){ // Running on x86 runner containing latest vec ln -sf /usr/bin/gcc-14 .compiler_override/gcc ln -sf /usr/bin/g++-14 .compiler_override/g++ + export CC="/usr/bin/gcc-14" + export CXX="/usr/bin/g++-14" + # Prepend the temp directory to PATH for this script's execution export PATH="$PWD/.compiler_override:$PATH" From d8c92413903d74313cf2a64496c884fc6bcc3865 Mon Sep 17 00:00:00 2001 From: Ali Tariq Date: Sun, 29 Jun 2025 16:34:38 +0500 Subject: [PATCH 10/18] Added the gguf weight --- .devops/cloud-v-pipeline | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devops/cloud-v-pipeline b/.devops/cloud-v-pipeline index b6e977a3d8b5a..942fed94278e6 100644 --- a/.devops/cloud-v-pipeline +++ b/.devops/cloud-v-pipeline @@ -45,7 +45,7 @@ node('jupiter-16G-1'){ // Running on x86 runner containing latest vec sh'''#!/bin/bash set -x - + GGUF_WEIGHT="/home/jenkins_user/DeepSeek-R1-Distill-Qwen-1.5B-Q4_K_M.gguf" # Path to the GGUF model file ./build/bin/llama-cli -m {GGUF_WEIGHT} -p "Hi, how are you?" -n 10 ''' } From fd500f77d633b8bb3d2a8e3b5666b8402228ded5 Mon Sep 17 00:00:00 2001 From: Ali Tariq Date: Sun, 29 Jun 2025 16:49:37 +0500 Subject: [PATCH 11/18] Changed the weights path --- .devops/cloud-v-pipeline | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.devops/cloud-v-pipeline b/.devops/cloud-v-pipeline index 942fed94278e6..bbb9a0250715e 100644 --- a/.devops/cloud-v-pipeline +++ b/.devops/cloud-v-pipeline @@ -45,8 +45,7 @@ node('jupiter-16G-1'){ // Running on x86 runner containing latest vec sh'''#!/bin/bash set -x - GGUF_WEIGHT="/home/jenkins_user/DeepSeek-R1-Distill-Qwen-1.5B-Q4_K_M.gguf" # Path to the GGUF model file - ./build/bin/llama-cli -m {GGUF_WEIGHT} -p "Hi, how are you?" -n 10 + ./build/bin/llama-cli -m /home/jenkins_user/DeepSeek-R1-Distill-Qwen-1.5B-Q4_K_M.gguf -p "Hi, how are you?" -n 10 ''' } } From 95f4d8eb509580c5389465916abb5a04c99b098c Mon Sep 17 00:00:00 2001 From: Ali Tariq Date: Sun, 29 Jun 2025 17:35:55 +0500 Subject: [PATCH 12/18] Added system specification --- .devops/cloud-v-pipeline | 41 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/.devops/cloud-v-pipeline b/.devops/cloud-v-pipeline index bbb9a0250715e..ac1bc03a8e7c4 100644 --- a/.devops/cloud-v-pipeline +++ b/.devops/cloud-v-pipeline @@ -2,6 +2,47 @@ node('jupiter-16G-1'){ // Running on x86 runner containing latest vec stage('Cleanup'){ cleanWs() // Cleaning previous CI build in workspace } + stage('Run system_info') { + sh '''#!/bin/bash + echo '=============================================================' + echo ' CPU INFO START ' + echo '=============================================================' + cat /proc/cpuinfo + echo '=============================================================' + echo ' CPU INFO END ' + echo '=============================================================' + + echo '=============================================================' + echo ' Kernel Info Start ' + echo '=============================================================' + uname -a + echo '=============================================================' + echo ' Kernel Info End ' + echo '=============================================================' + echo '=============================================================' + echo ' Glibc Version Start ' + echo '=============================================================' + ldd --version + echo '=============================================================' + echo ' Glibc Version End ' + echo '=============================================================' + echo '=============================================================' + echo ' OS Info Start ' + echo '=============================================================' + cat /etc/os-release + echo '=============================================================' + echo ' OS Info End ' + echo '=============================================================' + + echo '=============================================================' + echo ' GCC Version ' + echo '=============================================================' + gcc --version + echo '=============================================================' + echo ' GCC Version End ' + echo '=============================================================' + ''' + } stage('Install dependencies'){ sh''' #!/bin/bash From fc453a04d95033c861c222c64aa547406caac67c Mon Sep 17 00:00:00 2001 From: Ali Tariq Date: Sun, 29 Jun 2025 18:06:10 +0500 Subject: [PATCH 13/18] Removed white spaces --- .devops/cloud-v-pipeline | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.devops/cloud-v-pipeline b/.devops/cloud-v-pipeline index ac1bc03a8e7c4..5627b01c7745b 100644 --- a/.devops/cloud-v-pipeline +++ b/.devops/cloud-v-pipeline @@ -60,15 +60,15 @@ node('jupiter-16G-1'){ // Running on x86 runner containing latest vec } stage('Compiling llama.cpp'){ sh'''#!/bin/bash - + set -x mkdir -p .compiler_override - + # Create symlinks in this temp directory ln -sf /usr/bin/gcc-14 .compiler_override/gcc ln -sf /usr/bin/g++-14 .compiler_override/g++ - + export CC="/usr/bin/gcc-14" export CXX="/usr/bin/g++-14" @@ -84,7 +84,7 @@ node('jupiter-16G-1'){ // Running on x86 runner containing latest vec } stage('Running llama.cpp'){ sh'''#!/bin/bash - + set -x ./build/bin/llama-cli -m /home/jenkins_user/DeepSeek-R1-Distill-Qwen-1.5B-Q4_K_M.gguf -p "Hi, how are you?" -n 10 ''' From c1d61aa04a2779fb00a3ebcd6f2c9bf93a88e085 Mon Sep 17 00:00:00 2001 From: Akif Ejaz Date: Wed, 13 Aug 2025 12:44:48 +0500 Subject: [PATCH 14/18] ci: Replace Jenkins riscv native build Cloud-V pipeline with GitHub Actions workflow Removed the legacy .devops/cloud-v-pipeline Jenkins CI configuration and introduced .github/workflows/build-riscv-native.yml for native RISC-V builds using GitHub Actions. --- .devops/cloud-v-pipeline | 92 ------------------------ .github/workflows/build-riscv-native.yml | 43 +++++++++++ 2 files changed, 43 insertions(+), 92 deletions(-) delete mode 100644 .devops/cloud-v-pipeline create mode 100644 .github/workflows/build-riscv-native.yml diff --git a/.devops/cloud-v-pipeline b/.devops/cloud-v-pipeline deleted file mode 100644 index 5627b01c7745b..0000000000000 --- a/.devops/cloud-v-pipeline +++ /dev/null @@ -1,92 +0,0 @@ -node('jupiter-16G-1'){ // Running on x86 runner containing latest vector qemu, latest vector gcc and all the necessary libraries - stage('Cleanup'){ - cleanWs() // Cleaning previous CI build in workspace - } - stage('Run system_info') { - sh '''#!/bin/bash - echo '=============================================================' - echo ' CPU INFO START ' - echo '=============================================================' - cat /proc/cpuinfo - echo '=============================================================' - echo ' CPU INFO END ' - echo '=============================================================' - - echo '=============================================================' - echo ' Kernel Info Start ' - echo '=============================================================' - uname -a - echo '=============================================================' - echo ' Kernel Info End ' - echo '=============================================================' - echo '=============================================================' - echo ' Glibc Version Start ' - echo '=============================================================' - ldd --version - echo '=============================================================' - echo ' Glibc Version End ' - echo '=============================================================' - echo '=============================================================' - echo ' OS Info Start ' - echo '=============================================================' - cat /etc/os-release - echo '=============================================================' - echo ' OS Info End ' - echo '=============================================================' - - echo '=============================================================' - echo ' GCC Version ' - echo '=============================================================' - gcc --version - echo '=============================================================' - echo ' GCC Version End ' - echo '=============================================================' - ''' - } - stage('Install dependencies'){ - sh''' - #!/bin/bash - - set -x - - sudo apt update - sudo apt install -y cmake build-essential git curl libcurl4-openssl-dev - ''' - } - stage('checkout repo'){ - retry(5){ // Retry if the cloning fails due to some reason - checkout scm // Clone the repo on Runner - } - } - stage('Compiling llama.cpp'){ - sh'''#!/bin/bash - - set -x - - mkdir -p .compiler_override - - # Create symlinks in this temp directory - ln -sf /usr/bin/gcc-14 .compiler_override/gcc - ln -sf /usr/bin/g++-14 .compiler_override/g++ - - export CC="/usr/bin/gcc-14" - export CXX="/usr/bin/g++-14" - - # Prepend the temp directory to PATH for this script's execution - export PATH="$PWD/.compiler_override:$PATH" - - gcc --version - g++ --version - - cmake -B build - cmake --build build --config Release -j8 --target llama-cli llama-quantize - ''' - } - stage('Running llama.cpp'){ - sh'''#!/bin/bash - - set -x - ./build/bin/llama-cli -m /home/jenkins_user/DeepSeek-R1-Distill-Qwen-1.5B-Q4_K_M.gguf -p "Hi, how are you?" -n 10 - ''' - } -} diff --git a/.github/workflows/build-riscv-native.yml b/.github/workflows/build-riscv-native.yml new file mode 100644 index 0000000000000..72ca0a2b7d499 --- /dev/null +++ b/.github/workflows/build-riscv-native.yml @@ -0,0 +1,43 @@ +name: Build on RISCV Linux Machine by Cloud-V +on: + workflow_dispatch: + workflow_call: + +jobs: + bianbu-riscv64-native: # Bianbu 2.2 + runs-on: self-hosted + + steps: + - name: Install prerequisites + run: | + sudo apt-get update || true + sudo apt-get install -y libatomic1 + - uses: actions/checkout@v4 + - name: Setup Riscv + run: | + sudo apt-get update || true + sudo apt-get install -y --no-install-recommends \ + build-essential \ + gcc-14-riscv64-linux-gnu \ + g++-14-riscv64-linux-gnu \ + cmake + + - name: Build + run: | + cmake -B build -DLLAMA_CURL=OFF \ + -DCMAKE_BUILD_TYPE=Release \ + -DGGML_OPENMP=OFF \ + -DLLAMA_BUILD_EXAMPLES=ON \ + -DLLAMA_BUILD_TOOLS=ON \ + -DLLAMA_BUILD_TESTS=OFF \ + -DCMAKE_SYSTEM_NAME=Linux \ + -DCMAKE_SYSTEM_PROCESSOR=riscv64 \ + -DCMAKE_C_COMPILER=riscv64-linux-gnu-gcc-14 \ + -DCMAKE_CXX_COMPILER=riscv64-linux-gnu-g++-14 \ + -DCMAKE_POSITION_INDEPENDENT_CODE=ON \ + -DCMAKE_FIND_ROOT_PATH=/usr/lib/riscv64-linux-gnu \ + -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER \ + -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY \ + -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=BOTH + + cmake --build build --config Release -j $(nproc) From 4d21e104c2eae3631a1dbdf981ad044fad89b8ac Mon Sep 17 00:00:00 2001 From: Akif Ejaz Date: Wed, 13 Aug 2025 13:31:27 +0500 Subject: [PATCH 15/18] removed trailing whitespaces --- .github/workflows/build-riscv-native.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-riscv-native.yml b/.github/workflows/build-riscv-native.yml index 72ca0a2b7d499..a968f6d51971d 100644 --- a/.github/workflows/build-riscv-native.yml +++ b/.github/workflows/build-riscv-native.yml @@ -10,12 +10,12 @@ jobs: steps: - name: Install prerequisites run: | - sudo apt-get update || true + sudo apt-get update || true sudo apt-get install -y libatomic1 - uses: actions/checkout@v4 - name: Setup Riscv run: | - sudo apt-get update || true + sudo apt-get update || true sudo apt-get install -y --no-install-recommends \ build-essential \ gcc-14-riscv64-linux-gnu \ From 1cc992033e3a70628bde6e68b3c3d3eb2da524f2 Mon Sep 17 00:00:00 2001 From: Ali Tariq Date: Mon, 18 Aug 2025 12:00:09 +0500 Subject: [PATCH 16/18] Added the trigger at PR creation --- .github/workflows/build-riscv-native.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build-riscv-native.yml b/.github/workflows/build-riscv-native.yml index a968f6d51971d..538bc88de68f8 100644 --- a/.github/workflows/build-riscv-native.yml +++ b/.github/workflows/build-riscv-native.yml @@ -1,5 +1,6 @@ name: Build on RISCV Linux Machine by Cloud-V on: + pull_request: workflow_dispatch: workflow_call: From c9bb340fb83bded7ee904911d321e11b767bd643 Mon Sep 17 00:00:00 2001 From: Ali Tariq Date: Mon, 18 Aug 2025 12:48:52 +0500 Subject: [PATCH 17/18] Corrected OS name --- .github/workflows/build-riscv-native.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-riscv-native.yml b/.github/workflows/build-riscv-native.yml index 538bc88de68f8..0a03ff4054779 100644 --- a/.github/workflows/build-riscv-native.yml +++ b/.github/workflows/build-riscv-native.yml @@ -5,7 +5,7 @@ on: workflow_call: jobs: - bianbu-riscv64-native: # Bianbu 2.2 + debian-13-riscv64-native: # Bianbu 2.2 runs-on: self-hosted steps: From 482c59169ca3c42858959162bef1dfc35884805d Mon Sep 17 00:00:00 2001 From: Ali Tariq Date: Mon, 18 Aug 2025 14:42:42 +0500 Subject: [PATCH 18/18] Added ccache --- .github/workflows/build-riscv-native.yml | 55 +++++++++++++++++++++++- 1 file changed, 53 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-riscv-native.yml b/.github/workflows/build-riscv-native.yml index 0a03ff4054779..3b39577dd6d79 100644 --- a/.github/workflows/build-riscv-native.yml +++ b/.github/workflows/build-riscv-native.yml @@ -1,8 +1,58 @@ name: Build on RISCV Linux Machine by Cloud-V + on: + workflow_dispatch: # allows manual triggering + push: + branches: + - master + paths: [ + '.github/workflows/build.yml', + '.github/workflows/build-linux-cross.yml', + '.github/workflows/build-cmake-pkg.yml', + '**/CMakeLists.txt', + '**/.cmake', + '**/*.h', + '**/*.hpp', + '**/*.c', + '**/*.cpp', + '**/*.cu', + '**/*.cuh', + '**/*.swift', + '**/*.m', + '**/*.metal', + '**/*.comp' + ] + pull_request: - workflow_dispatch: - workflow_call: + types: [opened, synchronize, reopened] + paths: [ + '.github/workflows/build.yml', + '.github/workflows/build-linux-cross.yml', + '.github/workflows/build-cmake-pkg.yml', + '**/CMakeLists.txt', + '**/.cmake', + '**/*.h', + '**/*.hpp', + '**/*.c', + '**/*.cpp', + '**/*.cu', + '**/*.cuh', + '**/*.swift', + '**/*.m', + '**/*.metal', + '**/*.comp' + ] + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }} + cancel-in-progress: true + +env: + GGML_NLOOP: 3 + GGML_N_THREADS: 1 + LLAMA_LOG_COLORS: 1 + LLAMA_LOG_PREFIX: 1 + LLAMA_LOG_TIMESTAMPS: 1 jobs: debian-13-riscv64-native: # Bianbu 2.2 @@ -21,6 +71,7 @@ jobs: build-essential \ gcc-14-riscv64-linux-gnu \ g++-14-riscv64-linux-gnu \ + ccache \ cmake - name: Build