Skip to content

Commit

Permalink
enforce wheel size limits, README formatting in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
jameslamb committed Nov 13, 2024
1 parent df5bdc4 commit 034a94d
Show file tree
Hide file tree
Showing 7 changed files with 57 additions and 3 deletions.
5 changes: 4 additions & 1 deletion ci/build_wheel_cugraph-dgl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,7 @@

set -euo pipefail

./ci/build_wheel.sh cugraph-dgl python/cugraph-dgl
package_dir="python/cugraph-dgl"

./ci/build_wheel.sh cugraph-dgl ${package_dir}
./ci/validate_wheel.sh ${package_dir} dist
5 changes: 4 additions & 1 deletion ci/build_wheel_cugraph-pyg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,7 @@

set -euo pipefail

./ci/build_wheel.sh cugraph-pyg python/cugraph-pyg
package_dir="python/cugraph-pyg"

./ci/build_wheel.sh cugraph-pyg ${package_dir}
./ci/validate_wheel.sh ${package_dir} dist
5 changes: 4 additions & 1 deletion ci/build_wheel_pylibwholegraph.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@

set -euo pipefail

package_dir="python/pylibwholegraph"

export SKBUILD_CMAKE_ARGS="-DDETECT_CONDA_ENV=OFF;-DBUILD_SHARED_LIBS=OFF;-DCMAKE_MESSAGE_LOG_LEVEL=VERBOSE;-DCUDA_STATIC_RUNTIME=ON;-DWHOLEGRAPH_BUILD_WHEELS=ON"

./ci/build_wheel.sh pylibwholegraph python/pylibwholegraph
./ci/build_wheel.sh pylibwholegraph ${package_dir}
./ci/validate_wheel.sh ${package_dir} final_dist
21 changes: 21 additions & 0 deletions ci/validate_wheel.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash
# Copyright (c) 2024, NVIDIA CORPORATION.

set -euo pipefail

package_dir=$1
wheel_dir_relative_path=$2

cd "${package_dir}"

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)"
8 changes: 8 additions & 0 deletions python/cugraph-dgl/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,11 @@ include = [
build-backend = "setuptools.build_meta"
dependencies-file = "../../dependencies.yaml"
matrix-entry = "cuda_suffixed=true"

[tool.pydistcheck]
select = [
"distro-too-large-compressed",
]

# PyPI limit is 100 MiB, fail CI before we get too close to that
max_allowed_size_compressed = '75M'
8 changes: 8 additions & 0 deletions python/cugraph-pyg/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,11 @@ include = [
build-backend = "setuptools.build_meta"
dependencies-file = "../../dependencies.yaml"
matrix-entry = "cuda_suffixed=true"

[tool.pydistcheck]
select = [
"distro-too-large-compressed",
]

# PyPI limit is 100 MiB, fail CI before we get too close to that
max_allowed_size_compressed = '75M'
8 changes: 8 additions & 0 deletions python/pylibwholegraph/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,11 @@ wheel.packages = ["pylibwholegraph"]
provider = "scikit_build_core.metadata.regex"
input = "pylibwholegraph/VERSION"
regex = "(?P<value>.*)"

[tool.pydistcheck]
select = [
"distro-too-large-compressed",
]

# detect when package size grows significantly
max_allowed_size_compressed = '350M'

0 comments on commit 034a94d

Please sign in to comment.