mirror of https://github.com/grpc/grpc.git
[Python Distribution] Add a check for file size (#35831)
Add a step in distribution test which checks if any of the artifacts exceeds 80 MB since Pypi has a per-file size limit.
<!--
If you know who should review your pull request, please assign it to that
person, otherwise the pull request would get assigned randomly.
If your pull request is for a specific language, please add the appropriate
lang label.
-->
Closes #35831
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35831 from XuanWang-Amos:dist_test_add_size_check de50f20e14
PiperOrigin-RevId: 605664419
pull/35867/head^2
parent
2999332d64
commit
67a15395d2
4 changed files with 36 additions and 0 deletions
@ -0,0 +1,27 @@ |
||||
#!/usr/bin/env bash |
||||
# Copyright 2024 The gRPC Authors |
||||
# |
||||
# Licensed under the Apache License, Version 2.0 (the "License"); |
||||
# you may not use this file except in compliance with the License. |
||||
# You may obtain a copy of the License at |
||||
# |
||||
# http://www.apache.org/licenses/LICENSE-2.0 |
||||
# |
||||
# Unless required by applicable law or agreed to in writing, software |
||||
# distributed under the License is distributed on an "AS IS" BASIS, |
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
# See the License for the specific language governing permissions and |
||||
# limitations under the License. |
||||
|
||||
# Checks if any of the Python artifacts exceeds a certern size limit since |
||||
# Pypi has a per-file size limit. |
||||
|
||||
set -ex |
||||
|
||||
find . -path "*/artifacts/*" -size +80M | egrep '.*' && echo "Found Python artifacts larger than 80 MB." && FAILED="true" |
||||
|
||||
|
||||
if [ "$FAILED" != "" ] |
||||
then |
||||
exit 1 |
||||
fi |
Loading…
Reference in new issue