diff --git a/.github/workflows/validate-repackaged-binary-sizes.yml b/.github/workflows/validate-repackaged-binary-sizes.yml index 29d1bdc53..a87dd3487 100644 --- a/.github/workflows/validate-repackaged-binary-sizes.yml +++ b/.github/workflows/validate-repackaged-binary-sizes.yml @@ -21,21 +21,20 @@ jobs: whl: - url: https://download.pytorch.org/whl/test/cu117_pypi_cudnn/torch-1.13.1%2Bcu117.with.pypi.cudnn-cp310-cp310-linux_x86_64.whl python: "3.10" -# - url: https://download.pytorch.org/whl/test/cu117_pypi_cudnn/torch-1.13.1%2Bcu117.with.pypi.cudnn-cp311-cp311-linux_x86_64.whl -# python: "3.11" - url: https://download.pytorch.org/whl/test/cu117_pypi_cudnn/torch-1.13.1%2Bcu117.with.pypi.cudnn-cp37-cp37m-linux_x86_64.whl python: "3.7" - url: https://download.pytorch.org/whl/test/cu117_pypi_cudnn/torch-1.13.1%2Bcu117.with.pypi.cudnn-cp38-cp38-linux_x86_64.whl python: "3.8" - url: https://download.pytorch.org/whl/test/cu117_pypi_cudnn/torch-1.13.1%2Bcu117.with.pypi.cudnn-cp39-cp39-linux_x86_64.whl python: "3.9" + # - url: https://download.pytorch.org/whl/test/cu117_pypi_cudnn/torch-1.13.1%2Bcu117.with.pypi.cudnn-cp311-cp311-linux_x86_64.whl + # python: "3.11" uses: pytorch/test-infra/.github/workflows/linux_job.yml@main with: runner: linux.4xlarge.nvidia.gpu - repository: "pytorch/builder" - ref: ${{ github.ref }} job-name: "Validate binary size" + upload-artifact: pipy_wheel script: | set -ex export ENV_NAME="conda-env-${{ github.run_id }}" @@ -66,6 +65,9 @@ jobs: NEW_FILENAME=$(ls -1 *.whl | head -n 1) echo "::notice:: $FILENAME before: $SIZE_BEFORE after: $(du -h $NEW_FILENAME | cut -f1)" + # cp to ${RUNNER_ARTIFACT_DIR} + cp $NEW_FILENAME ${RUNNER_ARTIFACT_DIR}/ + # create conda env conda create -y -n $ENV_NAME python=$DESIRED_PYTHON conda activate $ENV_NAME diff --git a/release/pypi/prep_binary_for_pypi.sh b/release/pypi/prep_binary_for_pypi.sh index 639d834a6..872d72bec 100755 --- a/release/pypi/prep_binary_for_pypi.sh +++ b/release/pypi/prep_binary_for_pypi.sh @@ -77,7 +77,15 @@ for whl_file in "$@"; do find "${dist_info_folder}" -type f -exec sed -i "s!${version_with_suffix}!${version_no_suffix}!" {} \; # Moves distinfo from one with a version suffix to one without # Example: torch-1.8.0+cpu.dist-info => torch-1.8.0.dist-info + + echo "Before moving dist_info_folder" + ls -l "${whl_dir}" + mv "${dist_info_folder}" "${dirname_dist_info_folder}/${basename_dist_info_folder/${version_with_suffix}/${version_no_suffix}}" + + echo "After moving dist_info_folder" + ls -l "${whl_dir}" + cd "${whl_dir}" ( @@ -95,6 +103,7 @@ for whl_file in "$@"; do fi ) + rm -rf "${new_whl_file}" zip -qr9 "${new_whl_file}" . ) done