@@ -267,6 +267,56 @@ jobs:
267267 wget https://huggingface.co/ggml-org/models/resolve/main/tinyllamas/stories260K-be.gguf
268268 ./bin/llama-completion -m stories260K-be.gguf -p "One day, Lily met a Shoggoth" -n 500 -c 256
269269
270+ android-arm64 :
271+ runs-on : ubuntu-latest
272+
273+ env :
274+ NDK_VERSION : " 29.0.14206865"
275+
276+ steps :
277+ - name : Clone
278+ id : checkout
279+ uses : actions/checkout@v6
280+
281+ - name : ccache
282+ uses : ggml-org/ccache-action@v1.2.21
283+ with :
284+ key : android-arm64
285+ evict-old-files : 1d
286+ save : ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
287+
288+ - name : Set up JDK
289+ uses : actions/setup-java@v5
290+ with :
291+ java-version : 17
292+ distribution : temurin
293+
294+ - name : Setup Android SDK
295+ uses : android-actions/setup-android@40fd30fb8d7440372e1316f5d1809ec01dcd3699 # v4.0.1
296+ with :
297+ log-accepted-android-sdk-licenses : false
298+
299+ - name : Install NDK
300+ run : |
301+ sdkmanager "ndk;${{ env.NDK_VERSION }}"
302+ echo "ANDROID_NDK=${ANDROID_SDK_ROOT}/ndk/${{ env.NDK_VERSION }}" >> $GITHUB_ENV
303+
304+ - name : Build
305+ id : cmake_build
306+ run : |
307+ cmake -B build \
308+ -DCMAKE_TOOLCHAIN_FILE=${ANDROID_NDK}/build/cmake/android.toolchain.cmake \
309+ -DANDROID_ABI=arm64-v8a \
310+ -DANDROID_PLATFORM=android-28 \
311+ -DLLAMA_FATAL_WARNINGS=ON \
312+ -DGGML_BACKEND_DL=ON \
313+ -DGGML_NATIVE=OFF \
314+ -DGGML_CPU_ALL_VARIANTS=ON \
315+ -DGGML_OPENMP=OFF \
316+ -DLLAMA_BUILD_BORINGSSL=ON \
317+ -DGGML_RPC=ON
318+ time cmake --build build --config Release -j $(nproc)
319+
270320 ubuntu-latest-rpc :
271321 runs-on : ubuntu-latest
272322
@@ -1001,22 +1051,14 @@ jobs:
10011051 steps :
10021052 - name : Install dependencies
10031053 run : |
1004- sudo apt-get update
1005-
10061054 # Install necessary packages
1007- sudo apt-get install -y libatomic1 libtsan2 gcc-14 g++-14 cmake build-essential libssl-dev wget git-lfs
1055+ sudo apt-get update
1056+ sudo apt-get install -y libssl-dev
10081057
10091058 # Set gcc-14 and g++-14 as the default compilers
10101059 sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-14 100
10111060 sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-14 100
10121061
1013- if ! which rustc; then
1014- # Install Rust stable version
1015- sudo apt-get install -y rustup
1016- rustup install stable
1017- rustup default stable
1018- fi
1019-
10201062 git lfs install
10211063
10221064 - name : Check environment
@@ -1032,13 +1074,12 @@ jobs:
10321074 id : checkout
10331075 uses : actions/checkout@v6
10341076
1035- # FIXME: Enable when ggml-org/ccache-action works on riscv64
1036- # - name: ccache
1037- # uses: ggml-org/ccache-action@v1.2.21
1038- # with:
1039- # key: ubuntu-cpu-riscv64-native
1040- # evict-old-files: 1d
1041- # save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
1077+ - name : ccache
1078+ uses : ggml-org/ccache-action@afde29e5b5422e5da23cb1f639e8baecadeadfc3 # https://github.com/ggml-org/ccache-action/pull/1
1079+ with :
1080+ key : ubuntu-cpu-riscv64-native
1081+ evict-old-files : 1d
1082+ save : ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
10421083
10431084 - name : Build
10441085 id : cmake_build
0 commit comments