diff --git a/.github/workflows/wheels-dependencies.sh b/.github/workflows/wheels-dependencies.sh index 3438f810b..b0b1ae6f7 100755 --- a/.github/workflows/wheels-dependencies.sh +++ b/.github/workflows/wheels-dependencies.sh @@ -134,6 +134,7 @@ function build_libavif { -DAVIF_CODEC_AOM=LOCAL \ -DENABLE_NASM=ON \ -DCMAKE_MODULE_PATH=/tmp/cmake/Modules \ + -DCMAKE_BUILD_TYPE=MinSizeRel \ . \ && make install) touch libavif-stamp diff --git a/Tests/test_file_avif.py b/Tests/test_file_avif.py index 1d5665394..e967634a2 100644 --- a/Tests/test_file_avif.py +++ b/Tests/test_file_avif.py @@ -129,14 +129,14 @@ class TestFileAvif: # avifdec hopper.avif avif/hopper_avif_write.png assert_image_similar_tofile( - reloaded, "Tests/images/avif/hopper_avif_write.png", 6.02 + reloaded, "Tests/images/avif/hopper_avif_write.png", 6.14 ) # This test asserts that the images are similar. If the average pixel # difference between the two images is less than the epsilon value, # then we're going to accept that it's a reasonable lossy version of # the image. - assert_image_similar(reloaded, im, 8.62) + assert_image_similar(reloaded, im, 8.65) def test_AvifEncoder_with_invalid_args(self) -> None: """ diff --git a/winbuild/build_prepare.py b/winbuild/build_prepare.py index b23938857..3b0e0d577 100644 --- a/winbuild/build_prepare.py +++ b/winbuild/build_prepare.py @@ -57,7 +57,10 @@ def cmd_nmake( def cmds_cmake( - target: str | tuple[str, ...] | list[str], *params: str, build_dir: str = "." + target: str | tuple[str, ...] | list[str], + *params: str, + build_dir: str = ".", + build_type: str = "Release", ) -> list[str]: if not isinstance(target, str): target = " ".join(target) @@ -66,7 +69,7 @@ def cmds_cmake( " ".join( [ "{cmake}", - "-DCMAKE_BUILD_TYPE=Release", + f"-DCMAKE_BUILD_TYPE={build_type}", "-DCMAKE_VERBOSE_MAKEFILE=ON", "-DCMAKE_RULE_MESSAGES:BOOL=OFF", # for NMake "-DCMAKE_C_COMPILER=cl.exe", # for Ninja @@ -393,6 +396,7 @@ DEPS: dict[str, dict[str, Any]] = { "-DAVIF_LIBYUV=LOCAL", "-DAVIF_CODEC_AOM=LOCAL", "-DCMAKE_POLICY_VERSION_MINIMUM=3.5", + build_type="MinSizeRel", ), cmd_xcopy("include", "{inc_dir}"), ],