Add a check for nightly binaries to prevent the size from exceeding 550MB.
PiperOrigin-RevId: 298634924 Change-Id: If8e58113540deca882294f961223e5ca4f75fcc9
This commit is contained in:
parent
448b24f9b2
commit
7072568ed6
@ -18,6 +18,8 @@
|
||||
set -e
|
||||
set -x
|
||||
|
||||
MAX_WHL_SIZE=550M
|
||||
|
||||
function run_smoke_test() {
|
||||
VENV_TMP_DIR=$(mktemp -d)
|
||||
|
||||
@ -35,6 +37,9 @@ function run_smoke_test() {
|
||||
# Test TensorflowFlow imports
|
||||
test_tf_imports
|
||||
|
||||
# Test TensorFlow whl file size
|
||||
test_tf_whl_size
|
||||
|
||||
RESULT=$?
|
||||
# Deactivate from virtualenv.
|
||||
deactivate || source deactivate || die "FAILED: Unable to deactivate from existing virtualenv."
|
||||
@ -73,6 +78,14 @@ function test_tf_imports() {
|
||||
return $RESULT
|
||||
}
|
||||
|
||||
function test_tf_whl_size() {
|
||||
if [[ $(find $WHL_NAME -type f -size +${MAX_WHL_SIZE}) ]]; then
|
||||
echo "The whl size has exceeded 550MB. To keep within pypi's CDN
|
||||
distribution limit, we must not exceed that threshold."
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
###########################################################################
|
||||
# Main
|
||||
###########################################################################
|
||||
|
Loading…
Reference in New Issue
Block a user