From 67ed47d8865995e9948d3eef152e2f4ebbae3606 Mon Sep 17 00:00:00 2001 From: Catherine Lee Date: Fri, 31 Jan 2025 17:51:27 +0000 Subject: [PATCH] Binary upload checksum (#144887) Equivalent to https://github.com/pytorch/test-infra/pull/6172 but for pytorch Pull Request resolved: https://github.com/pytorch/pytorch/pull/144887 Approved by: https://github.com/atalman --- .circleci/scripts/binary_upload.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.circleci/scripts/binary_upload.sh b/.circleci/scripts/binary_upload.sh index 55b7326a267..28140b83202 100755 --- a/.circleci/scripts/binary_upload.sh +++ b/.circleci/scripts/binary_upload.sh @@ -58,7 +58,9 @@ s3_upload() { for pkg in ${PKG_DIR}/*.${extension}; do ( set -x - ${AWS_S3_CP} --no-progress --acl public-read "${pkg}" "${s3_upload_dir}" + shm_id=$(sha256sum "${pkg}" | awk '{print $1}') + ${AWS_S3_CP} --no-progress --acl public-read "${pkg}" "${s3_upload_dir}" \ + --metadata "checksum-sha256=${shm_id}" ) done )