CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
73 lines
1.8 KiB
Bash
73 lines
1.8 KiB
Bash
#!/bin/bash
|
|
# Copyright Advanced Micro Devices, Inc.
|
|
# SPDX-License-Identifier: MIT
|
|
|
|
set -euo pipefail
|
|
|
|
# gRPC source tarball generation script
|
|
|
|
GRPC_VERSION="${GRPC_VERSION:-v1.78.1}"
|
|
GRPC_TAG="${GRPC_VERSION}"
|
|
OUTPUT_DIR="${PWD}/tarballs"
|
|
TEMP_DIR=$(mktemp -d)
|
|
|
|
echo "===================================="
|
|
echo "gRPC Tarball Generation"
|
|
echo "===================================="
|
|
echo "Version: ${GRPC_VERSION}"
|
|
echo "Tag: ${GRPC_TAG}"
|
|
echo "Output: ${OUTPUT_DIR}"
|
|
echo "Temp: ${TEMP_DIR}"
|
|
echo ""
|
|
|
|
# Create output directory
|
|
mkdir -p "${OUTPUT_DIR}"
|
|
|
|
# Clone gRPC repository
|
|
echo "Step 1: Cloning gRPC repository..."
|
|
cd "${TEMP_DIR}"
|
|
git clone --depth 1 --branch "${GRPC_TAG}" --recurse-submodules \
|
|
https://github.com/grpc/grpc.git grpc-${GRPC_VERSION}
|
|
|
|
# Enter the cloned directory
|
|
cd "grpc-${GRPC_VERSION}"
|
|
|
|
# Ensure all submodules are initialized and updated
|
|
echo ""
|
|
echo "Step 2: Syncing submodules..."
|
|
git submodule sync --recursive
|
|
git submodule update --init --recursive --depth 1
|
|
|
|
# Remove all .git directories and files
|
|
echo ""
|
|
echo "Step 3: Removing .git directories..."
|
|
find . -name ".git" -exec rm -rf {} + 2>/dev/null || true
|
|
find . -name ".gitignore" -delete
|
|
find . -name ".gitmodules" -delete
|
|
find . -name ".gitattributes" -delete
|
|
|
|
# Return to temp directory
|
|
cd "${TEMP_DIR}"
|
|
|
|
# Create tarball
|
|
echo ""
|
|
echo "Step 4: Creating tarball..."
|
|
TARBALL_NAME="grpc-${GRPC_VERSION}.tar.gz"
|
|
tar -czf "${OUTPUT_DIR}/${TARBALL_NAME}" "grpc-${GRPC_VERSION}"
|
|
|
|
# Calculate SHA256 hash
|
|
echo ""
|
|
echo "Step 5: Calculating SHA256 hash..."
|
|
cd "${OUTPUT_DIR}"
|
|
SHA256=$(sha256sum "${TARBALL_NAME}" | awk '{print $1}')
|
|
|
|
# Display results
|
|
echo ""
|
|
echo "===================================="
|
|
echo "Tarball created successfully!"
|
|
echo "===================================="
|
|
echo "File: ${OUTPUT_DIR}/${TARBALL_NAME}"
|
|
echo "Size: $(du -h "${TARBALL_NAME}" | cut -f1)"
|
|
echo "SHA256: ${SHA256}"
|
|
echo ""
|