diff --git a/ci/build_wheel.sh b/ci/build_wheel.sh index eb28dc3a1f..4a7253ca92 100755 --- a/ci/build_wheel.sh +++ b/ci/build_wheel.sh @@ -54,4 +54,6 @@ sccache --show-adv-stats mkdir -p final_dist python -m auditwheel repair -w final_dist "${EXCLUDE_ARGS[@]}" dist/* +../../ci/validate_wheel.sh final_dist + RAPIDS_PY_WHEEL_NAME="cuml_${RAPIDS_PY_CUDA_SUFFIX}" rapids-upload-wheels-to-s3 python final_dist diff --git a/ci/validate_wheel.sh b/ci/validate_wheel.sh new file mode 100755 index 0000000000..60a80fce6b --- /dev/null +++ b/ci/validate_wheel.sh @@ -0,0 +1,18 @@ +#!/bin/bash +# Copyright (c) 2024, NVIDIA CORPORATION. + +set -euo pipefail + +wheel_dir_relative_path=$1 + +rapids-logger "validate packages with 'pydistcheck'" + +pydistcheck \ + --inspect \ + "$(echo ${wheel_dir_relative_path}/*.whl)" + +rapids-logger "validate packages with 'twine'" + +twine check \ + --strict \ + "$(echo ${wheel_dir_relative_path}/*.whl)" diff --git a/python/cuml/pyproject.toml b/python/cuml/pyproject.toml index 6c46373414..6561a0dbb6 100644 --- a/python/cuml/pyproject.toml +++ b/python/cuml/pyproject.toml @@ -19,6 +19,14 @@ requires = [ "scikit-build-core[pyproject]>=0.10.0", ] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit ../../dependencies.yaml and run `rapids-dependency-file-generator`. +[tool.pydistcheck] +select = [ + "distro-too-large-compressed", +] + +# detect when package size grows significantly +max_allowed_size_compressed = '1.5G' + [tool.pytest.ini_options] markers = [ "unit: Quickest tests focused on accuracy and correctness",