Skip to content

Commit

Permalink
Skip extracting most of Qt test files
Browse files Browse the repository at this point in the history
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
  • Loading branch information
yukawa authored and hiroyuki-komatsu committed Aug 8, 2023
1 parent fa5dcfa commit 581a9d2
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/build_tools/build_qt.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 581a9d2

Please sign in to comment.