@@ -231,3 +231,116 @@ jobs:
231231                         -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=BOTH 
232232
233233          cmake --build build --config Release -j $(nproc) 
234+ 
235+ debian-13-loongarch64-cpu-cross :
236+     runs-on : ubuntu-24.04 
237+     container : debian@sha256:653dfb9f86c3782e8369d5f7d29bb8faba1f4bff9025db46e807fa4c22903671 
238+ 
239+     steps :
240+       - uses : actions/checkout@v4 
241+       - name : Setup LoongArch 
242+         run : | 
243+           rm -f /etc/apt/sources.list.d/* 
244+           cat << EOF | tee /etc/apt/sources.list.d/debian-ports.list 
245+           deb http://snapshot.debian.org/archive/debian/20250515T202920Z/ trixie main 
246+           EOF 
247+           ( echo 'quiet "true";'; \ 
248+             echo 'APT::Get::Assume-Yes "true";'; \ 
249+             echo 'APT::Install-Recommends "false";'; \ 
250+             echo 'Acquire::Check-Valid-Until "false";'; \ 
251+             echo 'Acquire::Retries "5";'; \ 
252+           ) > /etc/apt/apt.conf.d/99snapshot-repos 
253+ 
254+           apt-get update 
255+           apt-get install -y ca-certificates debian-ports-archive-keyring cmake git zip 
256+           dpkg --add-architecture loong64 
257+ 
258+           # Add arch-specific repositories for non-amd64 architectures 
259+           cat << EOF | tee /etc/apt/sources.list.d/loong64-ports.list 
260+           deb [arch=loong64] http://snapshot.debian.org/archive/debian-ports/20250515T194251Z/ sid main 
261+           EOF 
262+ 
263+           apt-get update || true    ;# Prevent failure due to missing URLs. 
264+ 
265+           apt-get install -y --no-install-recommends \ 
266+                   build-essential \ 
267+                   gcc-14-loongarch64-linux-gnu \ 
268+                   g++-14-loongarch64-linux-gnu 
269+ 
270+ name : Build 
271+         run : | 
272+           cmake -B build -DLLAMA_CURL=OFF \ 
273+                          -DCMAKE_BUILD_TYPE=Release \ 
274+                          -DGGML_OPENMP=OFF \ 
275+                          -DLLAMA_BUILD_EXAMPLES=ON \ 
276+                          -DLLAMA_BUILD_TOOLS=ON \ 
277+                          -DLLAMA_BUILD_TESTS=OFF \ 
278+                          -DCMAKE_SYSTEM_NAME=Linux \ 
279+                          -DCMAKE_SYSTEM_PROCESSOR=loongarch64 \ 
280+                          -DCMAKE_C_COMPILER=loongarch64-linux-gnu-gcc-14 \ 
281+                          -DCMAKE_CXX_COMPILER=loongarch64-linux-gnu-g++-14 \ 
282+                          -DCMAKE_POSITION_INDEPENDENT_CODE=ON \ 
283+                          -DCMAKE_FIND_ROOT_PATH=/usr/lib/loongarch64-linux-gnu \ 
284+                          -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER \ 
285+                          -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY \ 
286+                          -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=BOTH 
287+ 
288+           cmake --build build --config Release -j $(nproc) 
289+ 
290+ debian-13-loongarch64-vulkan-cross :
291+     runs-on : ubuntu-24.04 
292+     container : debian@sha256:653dfb9f86c3782e8369d5f7d29bb8faba1f4bff9025db46e807fa4c22903671 
293+ 
294+     steps :
295+       - uses : actions/checkout@v4 
296+       - name : Setup LoongArch 
297+         run : | 
298+           rm -f /etc/apt/sources.list.d/* 
299+           cat << EOF | tee /etc/apt/sources.list.d/debian-ports.list 
300+           deb http://snapshot.debian.org/archive/debian/20250515T202920Z/ trixie main 
301+           EOF 
302+           ( echo 'quiet "true";'; \ 
303+             echo 'APT::Get::Assume-Yes "true";'; \ 
304+             echo 'APT::Install-Recommends "false";'; \ 
305+             echo 'Acquire::Check-Valid-Until "false";'; \ 
306+             echo 'Acquire::Retries "5";'; \ 
307+           ) > /etc/apt/apt.conf.d/99snapshot-repos 
308+ 
309+           apt-get update 
310+           apt-get install -y ca-certificates debian-ports-archive-keyring cmake git zip 
311+           dpkg --add-architecture loong64 
312+ 
313+           # Add arch-specific repositories for non-amd64 architectures 
314+           cat << EOF | tee /etc/apt/sources.list.d/loong64-ports.list 
315+           deb [arch=loong64] http://snapshot.debian.org/archive/debian-ports/20250515T194251Z/ sid main 
316+           EOF 
317+ 
318+           apt-get update || true    ;# Prevent failure due to missing URLs. 
319+ 
320+           apt-get install -y --no-install-recommends \ 
321+                   build-essential \ 
322+                   glslc \ 
323+                   gcc-14-loongarch64-linux-gnu \ 
324+                   g++-14-loongarch64-linux-gnu \ 
325+                   libvulkan-dev:loong64 
326+ 
327+ name : Build 
328+         run : | 
329+           cmake -B build -DLLAMA_CURL=OFF \ 
330+                          -DCMAKE_BUILD_TYPE=Release \ 
331+                          -DGGML_VULKAN=ON \ 
332+                          -DGGML_OPENMP=OFF \ 
333+                          -DLLAMA_BUILD_EXAMPLES=ON \ 
334+                          -DLLAMA_BUILD_TOOLS=ON \ 
335+                          -DLLAMA_BUILD_TESTS=OFF \ 
336+                          -DCMAKE_SYSTEM_NAME=Linux \ 
337+                          -DCMAKE_SYSTEM_PROCESSOR=loongarch64 \ 
338+                          -DCMAKE_C_COMPILER=loongarch64-linux-gnu-gcc-14 \ 
339+                          -DCMAKE_CXX_COMPILER=loongarch64-linux-gnu-g++-14 \ 
340+                          -DCMAKE_POSITION_INDEPENDENT_CODE=ON \ 
341+                          -DCMAKE_FIND_ROOT_PATH=/usr/lib/loongarch64-linux-gnu \ 
342+                          -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER \ 
343+                          -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY \ 
344+                          -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=BOTH 
345+ 
346+           cmake --build build --config Release -j $(nproc) 
0 commit comments