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
55 lines
1.4 KiB
Bash
Executable File
55 lines
1.4 KiB
Bash
Executable File
#!/bin/bash
|
|
# Copyright Advanced Micro Devices, Inc.
|
|
# SPDX-License-Identifier: MIT
|
|
|
|
# Saves patches that are maintained locally to make TheRock work with a given
|
|
# branch.
|
|
# Usage: save_patches.sh base_tag project_name patch_subdir
|
|
#
|
|
# Example:
|
|
# save_patches.sh m/amd-mainline hipBLASLt amd-mainline
|
|
#
|
|
# This will save patch files for all commits to hipBLASLt since the commit
|
|
# "m/amd-mainline". Patch files will be saved in patches/amd-mainline/hipBLASLT
|
|
#
|
|
# The base_tag must be checked out on the current branch. All commits above it
|
|
# will be dumped as patches.
|
|
set -euo pipefail
|
|
|
|
this_dir="$(cd $(dirname $0) && pwd)"
|
|
root_dir="$(cd $this_dir/.. && pwd)"
|
|
|
|
# Command line args.
|
|
set +eu
|
|
version_tag="$1"
|
|
shift
|
|
project_name="$1"
|
|
shift
|
|
patch_subdir="$1"
|
|
shift
|
|
set -eu
|
|
|
|
if [ -z "$version_tag" ] || [ -z "$project_name" ] || [ -z "$patch_subdir" ]; then
|
|
echo "Syntax: save_patches.sh <version_tag> <project_name> <patch_subdir>"
|
|
exit 1
|
|
fi
|
|
|
|
# Directories.
|
|
patch_dir="$root_dir/patches/$patch_subdir/$project_name"
|
|
mkdir -p $patch_dir
|
|
source_dir="$(git config --file $root_dir/.gitmodules --get submodule.${project_name}.path)"
|
|
if ! [ -d "$source_dir" ]; then
|
|
echo "Source directory not found: $source_dir"
|
|
exit 1
|
|
fi
|
|
|
|
# Remove existing patch files.
|
|
for existing in $patch_dir/*.patch; do
|
|
if [ -f "$existing" ]; then
|
|
rm "$existing"
|
|
fi
|
|
done
|
|
|
|
# And format.
|
|
(cd $source_dir && git format-patch -o $patch_dir "$version_tag")
|