Skip to content

Commit 79ceebd

Browse files
committed
Use MinSizeRel build type
1 parent 3b5d4fb commit 79ceebd

3 files changed

Lines changed: 9 additions & 4 deletions

File tree

.github/workflows/wheels-dependencies.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ function build_libavif {
134134
-DAVIF_CODEC_AOM=LOCAL \
135135
-DENABLE_NASM=ON \
136136
-DCMAKE_MODULE_PATH=/tmp/cmake/Modules \
137+
-DCMAKE_BUILD_TYPE=MinSizeRel \
137138
. \
138139
&& make install)
139140
touch libavif-stamp

Tests/test_file_avif.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,14 +129,14 @@ def test_write_rgb(self, tmp_path: Path) -> None:
129129

130130
# avifdec hopper.avif avif/hopper_avif_write.png
131131
assert_image_similar_tofile(
132-
reloaded, "Tests/images/avif/hopper_avif_write.png", 6.02
132+
reloaded, "Tests/images/avif/hopper_avif_write.png", 6.14
133133
)
134134

135135
# This test asserts that the images are similar. If the average pixel
136136
# difference between the two images is less than the epsilon value,
137137
# then we're going to accept that it's a reasonable lossy version of
138138
# the image.
139-
assert_image_similar(reloaded, im, 8.62)
139+
assert_image_similar(reloaded, im, 8.65)
140140

141141
def test_AvifEncoder_with_invalid_args(self) -> None:
142142
"""

winbuild/build_prepare.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,10 @@ def cmd_nmake(
5757

5858

5959
def cmds_cmake(
60-
target: str | tuple[str, ...] | list[str], *params: str, build_dir: str = "."
60+
target: str | tuple[str, ...] | list[str],
61+
*params: str,
62+
build_dir: str = ".",
63+
build_type: str = "Release",
6164
) -> list[str]:
6265
if not isinstance(target, str):
6366
target = " ".join(target)
@@ -66,7 +69,7 @@ def cmds_cmake(
6669
" ".join(
6770
[
6871
"{cmake}",
69-
"-DCMAKE_BUILD_TYPE=Release",
72+
f"-DCMAKE_BUILD_TYPE={build_type}",
7073
"-DCMAKE_VERBOSE_MAKEFILE=ON",
7174
"-DCMAKE_RULE_MESSAGES:BOOL=OFF", # for NMake
7275
"-DCMAKE_C_COMPILER=cl.exe", # for Ninja
@@ -393,6 +396,7 @@ def cmd_msbuild(
393396
"-DAVIF_LIBYUV=LOCAL",
394397
"-DAVIF_CODEC_AOM=LOCAL",
395398
"-DCMAKE_POLICY_VERSION_MINIMUM=3.5",
399+
build_type="MinSizeRel",
396400
),
397401
cmd_xcopy("include", "{inc_dir}"),
398402
],

0 commit comments

Comments
 (0)