ci(arm64): fix llama.cpp build by adding googletest to CMakefile

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
This commit is contained in:
Ettore Di Giacinto 2024-07-09 23:08:02 +02:00
parent 401ee553f4
commit ea97fe67e2
2 changed files with 16 additions and 1 deletions

View File

@ -106,6 +106,14 @@ jobs:
CROSS_TOOLCHAIN=/usr/$GNU_HOST
CROSS_STAGING_PREFIX=$CROSS_TOOLCHAIN/stage
CMAKE_CROSS_TOOLCHAIN=/tmp/arm.toolchain.cmake
echo "include(FetchContent)" >> backend/cpp/llama/CMakeLists.txt
echo "FetchContent_Declare(" >> backend/cpp/llama/CMakeLists.txt
echo " googletest" >> backend/cpp/llama/CMakeLists.txt
echo " URL https://github.com/google/googletest/archive/03597a01ee50ed33e9dfd640b249b4be3799d395.zip" >> backend/cpp/llama/CMakeLists.txt
echo ")" >> backend/cpp/llama/CMakeLists.txt
echo "FetchContent_MakeAvailable(googletest)" >> backend/cpp/llama/CMakeLists.txt
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@8ba23be9613c672d40ae261d2a1335d639bdd59b
go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.34.0
export PATH=$PATH:$GOPATH/bin

View File

@ -84,3 +84,10 @@ target_compile_features(${TARGET} PRIVATE cxx_std_11)
if(TARGET BUILD_INFO)
add_dependencies(${TARGET} BUILD_INFO)
endif()
include(FetchContent)
FetchContent_Declare(
googletest
URL https://github.com/google/googletest/archive/03597a01ee50ed33e9dfd640b249b4be3799d395.zip
)
FetchContent_MakeAvailable(googletest)