diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e49b25425..3956353b9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -329,6 +329,9 @@ jobs: ls -ahl dist whl=$(ls -t dist/*.whl | head -n 1 | xargs basename) echo "WHL_NAME=$whl" >> $GITHUB_ENV + + [ $(stat -c%s "dist/$whl") -lt 104857600 ] && echo "wheel size < 100M" && exit 1 || echo "$whl size check passed." + if [ "${{ matrix.python }}" != "313t" ]; then # twine doesn't support python 3.13 yet pip install twine twine check dist/$whl diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index dfc745ed3..6dac2f57e 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -314,19 +314,19 @@ jobs: python setup.py bdist_wheel echo "::endgroup::" - # - name: Test install - # if: github.event.inputs.artifact_id == '' && !cancelled() - # run: | - # ls -ahl dist - # whl=$(ls -t dist/*.whl | head -n 1 | xargs basename) - # sha256=$(sha256sum dist/$whl) - # echo "hash=$sha256" - - # echo "WHL_HASH=$sha256" >> $GITHUB_ENV - # echo "WHL_NAME=$whl" >> $GITHUB_ENV - - # twine check dist/$whl - # uv pip install dist/$whl + - name: check wheel + if: github.event.inputs.artifact_id == '' && !cancelled() + run: | + ls -ahl dist + whl=$(ls -t dist/*.whl | head -n 1 | xargs basename) + sha256=$(sha256sum dist/$whl) + echo "hash=$sha256" + + echo "WHL_HASH=$sha256" >> $GITHUB_ENV + echo "WHL_NAME=$whl" >> $GITHUB_ENV + + twine check dist/$whl + [ $(stat -c%s "dist/$whl") -lt 104857600 ] && echo "wheel size < 100M" && exit 1 || echo "$whl size check passed." - name: Upload wheel to local if: github.event.inputs.artifact_id == '' && !cancelled()