From 65578bda3ec005771d3bc6668abe8455f8acd898 Mon Sep 17 00:00:00 2001 From: danielholanda Date: Mon, 2 Feb 2026 14:26:09 -0800 Subject: [PATCH] Release Linux artifacts in .tar.gz archives --- .github/workflows/build-llamacpp-rocm.yml | 29 ++++++++++++++++------- .github/workflows/test-llamacpp-rocm.yml | 7 +++--- 2 files changed, 25 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build-llamacpp-rocm.yml b/.github/workflows/build-llamacpp-rocm.yml index ac26a4c..585ab28 100644 --- a/.github/workflows/build-llamacpp-rocm.yml +++ b/.github/workflows/build-llamacpp-rocm.yml @@ -1040,13 +1040,19 @@ jobs: artifact_dir="./all-artifacts/${artifact_name}" # Create final archive with release tag + # Use .tar.gz for Linux/Ubuntu, .zip for Windows final_archive_name="llama-${TAG}-${os}-rocm-${target}-x64" if [ -d "$artifact_dir" ]; then - echo "Creating archive: ${final_archive_name}.zip" - cd "$artifact_dir" - zip -r "../../${final_archive_name}.zip" * - cd ../../ + if [ "$os" = "windows" ]; then + echo "Creating archive: ${final_archive_name}.zip" + cd "$artifact_dir" + zip -r "../../${final_archive_name}.zip" * + cd ../../ + else + echo "Creating archive: ${final_archive_name}.tar.gz" + tar -czvf "${final_archive_name}.tar.gz" -C "$artifact_dir" . + fi else echo "Warning: Artifact directory not found: $artifact_dir" ls -la ./all-artifacts/ @@ -1055,7 +1061,7 @@ jobs: done echo "Created archives:" - ls -la *.zip + ls -la *.zip *.tar.gz 2>/dev/null || echo "No archives found" - name: Create Release if: steps.check-tag.outputs.tag_exists == 'false' @@ -1077,7 +1083,7 @@ jobs: echo "Llama.cpp Commit: $LLAMACPP_COMMIT_HASH" # Verify archives exist - ls -la *.zip + ls -la *.zip *.tar.gz 2>/dev/null || echo "No archives found" # Prepare upload files list upload_files="" @@ -1090,8 +1096,15 @@ jobs: target=$(echo "$target" | xargs) # trim whitespace final_archive_name="llama-${TAG}-${os}-rocm-${target}-x64" - if [ -f "${final_archive_name}.zip" ]; then - upload_files="${upload_files} ${final_archive_name}.zip" + # Use .tar.gz for Linux/Ubuntu, .zip for Windows + if [ "$os" = "windows" ]; then + if [ -f "${final_archive_name}.zip" ]; then + upload_files="${upload_files} ${final_archive_name}.zip" + fi + else + if [ -f "${final_archive_name}.tar.gz" ]; then + upload_files="${upload_files} ${final_archive_name}.tar.gz" + fi fi done done diff --git a/.github/workflows/test-llamacpp-rocm.yml b/.github/workflows/test-llamacpp-rocm.yml index f242e4d..a40acbe 100644 --- a/.github/workflows/test-llamacpp-rocm.yml +++ b/.github/workflows/test-llamacpp-rocm.yml @@ -272,7 +272,7 @@ jobs: run: | release_tag="${{ needs.prepare-matrix.outputs.latest_release_tag }}" target="${{ matrix.gfx_target }}" - asset_name="llama-${release_tag}-ubuntu-rocm-${target}-x64.zip" + asset_name="llama-${release_tag}-ubuntu-rocm-${target}-x64.tar.gz" repo="${{ github.repository }}" echo "Downloading release asset: $asset_name" @@ -312,9 +312,10 @@ jobs: exit 1 fi - # Extract the downloaded zip file + # Extract the downloaded tar.gz file echo "Extracting $asset_name..." - unzip -q "$asset_name" -d llama-binaries + mkdir -p llama-binaries + tar -xzf "$asset_name" -C llama-binaries # List contents echo "Contents of llama-binaries:"