From 943bba2e5d75b130f2370719282024985c31fc6d Mon Sep 17 00:00:00 2001 From: Neuman Vong Date: Mon, 15 Jan 2024 18:56:30 +1100 Subject: [PATCH] Only build arm64-v8a in CI --- .github/workflows/build.yml | 2 +- examples/llama.android/app/build.gradle.kts | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9e9c5bdbf..2891de706 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -536,7 +536,7 @@ jobs: - name: Build run: | cd examples/llama.android - ./gradlew build --no-daemon + ./gradlew build --no-daemon -Ponly-arm64-v8a # freeBSD-latest: # runs-on: macos-12 diff --git a/examples/llama.android/app/build.gradle.kts b/examples/llama.android/app/build.gradle.kts index 96d0e169e..107a226fa 100644 --- a/examples/llama.android/app/build.gradle.kts +++ b/examples/llama.android/app/build.gradle.kts @@ -20,6 +20,14 @@ android { vectorDrawables { useSupportLibrary = true } + ndk { + // Workaround for https://github.com/llvm/llvm-project/issues/65820 + // affecting armeabi-v7a. Build for arm64-v8a only when invoked + // with -Ponly-arm64-v8a (e.g. ./gradlew build -Ponly-arm64-v8a). + if (project.hasProperty("only-arm64-v8a")) { + abiFilters += listOf("arm64-v8a") + } + } externalNativeBuild { cmake { cppFlags += listOf()