diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1101fef157..0839f69d46 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -30,7 +30,7 @@ on: env: GH_TOKEN: ${{ github.token }} BRANCH_NAME: ${{ github.head_ref || github.ref_name }} - CMAKE_ARGS: "-DLLAMA_BUILD_EXAMPLES=OFF -DLLAMA_BUILD_TESTS=OFF -DLLAMA_BUILD_TOOLS=ON -DLLAMA_BUILD_SERVER=ON -DGGML_RPC=ON" + CMAKE_ARGS: "-DLLAMA_BUILD_EXAMPLES=OFF -DLLAMA_BUILD_TESTS=OFF -DLLAMA_BUILD_TOOLS=ON -DLLAMA_BUILD_SERVER=ON -DGGML_RPC=ON -DLLAMA_CONNECT=ON" # note: run this workflow one at a time for better cache reuse concurrency: @@ -1243,6 +1243,7 @@ jobs: -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON \ -DLLAMA_OPENSSL=OFF \ -DGGML_NATIVE=OFF \ + -DLLAMA_CONNECT=ON \ -DGGML_SYCL_F16=${{ matrix.fp16 }} time cmake --build build --config Release -j $(nproc) diff --git a/scripts/connect-download.cmake b/scripts/connect-download.cmake index ce11479210..da340b2688 100644 --- a/scripts/connect-download.cmake +++ b/scripts/connect-download.cmake @@ -40,10 +40,20 @@ file(MAKE_DIRECTORY "${WORK_DIR}") message(STATUS "llama-connect: downloading ${URL}") -file(DOWNLOAD "${URL}" "${ARCHIVE}" STATUS status TLS_VERIFY ON) +# retry a few times, this runs in CI where a transient failure must not break the build +foreach (attempt RANGE 1 3) + file(DOWNLOAD "${URL}" "${ARCHIVE}" STATUS status TLS_VERIFY ON INACTIVITY_TIMEOUT 60) -list(GET status 0 code) -list(GET status 1 msg) + list(GET status 0 code) + list(GET status 1 msg) + + if (code EQUAL 0) + break() + endif() + + message(STATUS "llama-connect: download attempt ${attempt} failed (${code}: ${msg})") + file(REMOVE "${ARCHIVE}") +endforeach() if (NOT code EQUAL 0) file(REMOVE "${ARCHIVE}") diff --git a/tools/connect/CMakeLists.txt b/tools/connect/CMakeLists.txt index c36f7642bf..71a2e99654 100644 --- a/tools/connect/CMakeLists.txt +++ b/tools/connect/CMakeLists.txt @@ -20,10 +20,9 @@ if (APPLE) endif() endif() + # note: there is no macos-x64 asset, it is not built upstream (no Intel macOS runners) if (_arch MATCHES "^(arm64|aarch64)$") set(LLAMA_CONNECT_PLATFORM "macos-arm64") - elseif (_arch MATCHES "^(x86_64|AMD64|amd64|x64)$") - set(LLAMA_CONNECT_PLATFORM "macos-x64") endif() elseif (WIN32) # with Visual Studio generators, the target arch comes from -A