Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 21 additions & 8 deletions .github/workflows/build-llamacpp-rocm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1042,13 +1042,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/
Expand All @@ -1057,7 +1063,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'
Expand All @@ -1079,7 +1085,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=""
Expand All @@ -1092,8 +1098,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
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/test-llamacpp-rocm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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:"
Expand Down