From c7f2cf2b7f67bce5842fedfdba508440fe257375 Mon Sep 17 00:00:00 2001 From: Simon Mo Date: Sat, 4 May 2024 21:28:58 -0700 Subject: [PATCH] [CI] Reduce wheel size by not shipping debug symbols (#4602) --- .buildkite/check-wheel-size.py | 3 +++ .github/workflows/publish.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/.buildkite/check-wheel-size.py b/.buildkite/check-wheel-size.py index 8178fba552c..90a5e54736c 100644 --- a/.buildkite/check-wheel-size.py +++ b/.buildkite/check-wheel-size.py @@ -25,6 +25,9 @@ def check_wheel_size(directory): f"compare to the allowed size ({MAX_SIZE_MB} MB).") print_top_10_largest_files(wheel_path) return 1 + else: + print(f"Wheel {wheel_path} is within the allowed size " + f"({wheel_size_mb} MB).") return 0 diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index d79681f03b0..ac60ce0fed1 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -79,6 +79,8 @@ jobs: - name: Build wheel shell: bash + env: + CMAKE_BUILD_TYPE: Release # do not compile with debug symbol to reduce wheel size run: | bash -x .github/workflows/scripts/build.sh ${{ matrix.python-version }} ${{ matrix.cuda-version }} wheel_name=$(ls dist/*whl | xargs -n 1 basename)