From 581a9d2d51c1ebf4ba4ef29d4e37f2abe70250f6 Mon Sep 17 00:00:00 2001 From: Yohei Yukawa Date: Tue, 8 Aug 2023 06:01:49 +0000 Subject: [PATCH] Skip extracting most of Qt test files As discussed in #769, storage limit is somewhat critical for GitHub Action runners. As for Qt source code, we already skip extracting several files that are not necessary to build Qt binaries used by Mozc. With this commit, more unnecessary test files are skipped when extracting Qt source code. Here are net size changes of extracted source code. Qt 5.15.10: 262 MB -> 136 MB Qt 6.5.2 : 211 MB -> 119 MB This is just an optimization of build process. There must be no user observable behavior change. PiperOrigin-RevId: 554704573 --- src/build_tools/build_qt.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/build_tools/build_qt.py b/src/build_tools/build_qt.py index 45de4df74..ecb50c186 100755 --- a/src/build_tools/build_qt.py +++ b/src/build_tools/build_qt.py @@ -171,7 +171,15 @@ def qt_extract_filter( continue paths = paths[1:] new_path = '/'.join(paths) + skipping = False if len(paths) >= 1 and paths[0] == 'examples': + skipping = True + elif len(paths) >= 1 and paths[0] == 'tests': + # Qt5 build fails without files under test/auto/cmake/. + # TODO(b/292165679): Drop all when building Qt6. + if not (len(paths) >= 3 and paths[1] == 'auto' and paths[2] == 'cmake'): + skipping = True + if skipping: printer.print_line('skipping ' + new_path) continue else: