From 1a48fb0e55b6b37568292d998a5b6140a9aed4b3 Mon Sep 17 00:00:00 2001 From: Xuan Son Nguyen Date: Sat, 26 Apr 2025 17:47:33 +0200 Subject: [PATCH 1/2] test windows build curl static --- .github/workflows/{build.yml => _build.yml.disabled} | 0 .github/workflows/server.yml | 2 +- common/CMakeLists.txt | 1 + 3 files changed, 2 insertions(+), 1 deletion(-) rename .github/workflows/{build.yml => _build.yml.disabled} (100%) diff --git a/.github/workflows/build.yml b/.github/workflows/_build.yml.disabled similarity index 100% rename from .github/workflows/build.yml rename to .github/workflows/_build.yml.disabled diff --git a/.github/workflows/server.yml b/.github/workflows/server.yml index 6c9b5132276fe..33d53c5f0bc92 100644 --- a/.github/workflows/server.yml +++ b/.github/workflows/server.yml @@ -199,7 +199,7 @@ jobs: env: CURL_PATH: ${{ steps.get_libcurl.outputs.curl_path }} run: | - cmake -B build -DCURL_LIBRARY="$env:CURL_PATH/lib/libcurl.dll.a" -DCURL_INCLUDE_DIR="$env:CURL_PATH/include" + cmake -B build -DCURL_LIBRARY="$env:CURL_PATH/lib/libcurl.a" -DCURL_INCLUDE_DIR="$env:CURL_PATH/include" cmake --build build --config Release -j ${env:NUMBER_OF_PROCESSORS} --target llama-server - name: Python setup diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index 43533fc86abe2..8fe49cbb7a50b 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -85,6 +85,7 @@ set(LLAMA_COMMON_EXTRA_LIBS build_info) # Use curl to download model url if (LLAMA_CURL) + set(CURL_USE_STATIC_LIBS TRUE) find_package(CURL) if (NOT CURL_FOUND) message(FATAL_ERROR "Could NOT find CURL. Hint: to disable this feature, set -DLLAMA_CURL=OFF") From adc75585c4822169a93912e9c62fa593c63d68e2 Mon Sep 17 00:00:00 2001 From: Xuan Son Nguyen Date: Sat, 26 Apr 2025 18:12:13 +0200 Subject: [PATCH 2/2] try --- .github/workflows/server.yml | 7 ------- common/CMakeLists.txt | 1 + 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/server.yml b/.github/workflows/server.yml index 33d53c5f0bc92..401bc839d6ed5 100644 --- a/.github/workflows/server.yml +++ b/.github/workflows/server.yml @@ -213,13 +213,6 @@ jobs: run: | pip install -r examples/server/tests/requirements.txt - - name: Copy Libcurl - id: prepare_libcurl - env: - CURL_PATH: ${{ steps.get_libcurl.outputs.curl_path }} - run: | - cp $env:CURL_PATH/bin/libcurl-x64.dll ./build/bin/Release/libcurl-x64.dll - - name: Tests id: server_integration_tests if: ${{ !matrix.disabled_on_pr || !github.event.pull_request }} diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index 8fe49cbb7a50b..5364bd7810af2 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -85,6 +85,7 @@ set(LLAMA_COMMON_EXTRA_LIBS build_info) # Use curl to download model url if (LLAMA_CURL) + set(CURL_STATICLIB ON) set(CURL_USE_STATIC_LIBS TRUE) find_package(CURL) if (NOT CURL_FOUND)