Changeset 279563 in webkit


Ignore:
Timestamp:
Jul 5, 2021 1:25:09 AM (3 years ago)
Author:
commit-queue@webkit.org
Message:

[GTK] Pack header and .pc files in the built-product archive
https://bugs.webkit.org/show_bug.cgi?id=227526

Patch by Philippe Normand <pnormand@igalia.com> on 2021-07-05
Reviewed by Michael Catanzaro.

The header files and pkg-config files needed to build WebKitGTK apps are now included in the
built product zip file. As they're text files the impact on the zip size should not be
significant. In order to support this, two changes are introduced for the GTK build bot:

  • build-webkit is now called with a --prefix option
  • a new build step has been added, which installs the built files in the given prefix directory

Then built-product-archive can simply pack files from the install prefix directory.

Additionally the .a (potentially big) files are now excluded from the zip archive.

  • CISupport/build-webkit-org/factories.py:

(BuildFactory.init):

  • CISupport/build-webkit-org/steps.py:

(CompileWebKit.start):
(InstallBuiltProduct):

  • CISupport/built-product-archive:
  • Scripts/install-built-product: Added.
Location:
trunk/Tools
Files:
1 added
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/CISupport/build-webkit-org/factories.py

    r278310 r279563  
    6464
    6565        if triggers:
     66            if platform == "gtk":
     67                self.addStep(InstallBuiltProduct())
     68
    6669            self.addStep(ArchiveBuiltProduct())
    6770            self.addStep(UploadBuiltProduct())
  • trunk/Tools/CISupport/build-webkit-org/steps.py

    r278310 r279563  
    290290            self.setCommand(self.command + ['DEBUG_INFORMATION_FORMAT=dwarf-with-dsym'])
    291291            self.setCommand(self.command + ['CLANG_DEBUG_INFORMATION_LEVEL=line-tables-only'])
     292        if platform == 'gtk':
     293            prefix = os.path.join("/app", "webkit", "WebKitBuild", self.getProperty("configuration"), "install")
     294            self.setCommand(self.command + [f'--prefix={prefix}'])
    292295
    293296        appendCustomBuildFlags(self, platform, self.getProperty('fullPlatform'))
     
    321324    command = ["perl", "./Tools/Scripts/build-jsc", WithProperties("--%(configuration)s")]
    322325
     326
     327class InstallBuiltProduct(shell.ShellCommand):
     328    command = ["python3", "Tools/Scripts/install-built-product",
     329               WithProperties("--platform=%(fullPlatform)s"), WithProperties("--%(configuration)s")]
    323330
    324331class ArchiveBuiltProduct(shell.ShellCommand):
  • trunk/Tools/CISupport/build-webkit-org/steps_unittest.py

    r278310 r279563  
    421421                timeout=1200,
    422422                logEnviron=True,
    423                 command=['perl', './Tools/Scripts/build-webkit', '--release', '--gtk'],
     423                command=['perl', './Tools/Scripts/build-webkit', '--release', '--prefix=/app/webkit/WebKitBuild/release/install', '--gtk'],
    424424            ) + 0,
    425425        )
  • trunk/Tools/CISupport/built-product-archive

    • Property svn:executable set to *
    r279456 r279563  
    111111
    112112
    113 def createZipFromList(listToZip, configuration, excludePattern=None):
     113def createZipFromList(listToZip, configuration, excludePatterns=None):
    114114    global _topLevelBuildDirectory
    115115    global _configurationBuildDirectory
     
    125125    if sys.platform.startswith('linux'):
    126126        zipCommand = ['zip', '-y', '-r', archiveFile] + listToZip
    127         if excludePattern:
    128             zipCommand += ['-x', excludePattern]
     127        if excludePatterns:
     128            for excludePattern in excludePatterns:
     129                zipCommand += ['-x', excludePattern]
    129130        return subprocess.call(zipCommand, cwd=_configurationBuildDirectory)
    130131
     
    252253                    contents.append(os.path.join(cogDirectory, filename))
    253254
     255        if platform == 'gtk':
     256            contents.extend([os.path.join('install', directory) for directory in ['include', os.path.join('lib', 'pkgconfig')]])
     257
    254258        # When debug fission is enabled the directories below contain dwo files
    255259        # with the debug information needed to generate backtraces with GDB.
     
    258262                contents.append(objectDir)
    259263
    260         if createZipFromList(contents, configuration, excludePattern='*.o'):
     264        if createZipFromList(contents, configuration, excludePatterns=['*.o', '*.a']):
    261265            return 1
    262266
  • trunk/Tools/CISupport/ews-build/factories.py

    r279486 r279563  
    3333                   RunWebKitPyPython3Tests, RunWebKitTests, RunWebKitTestsInStressMode, RunWebKitTestsInStressGuardmallocMode,
    3434                   SetBuildSummary, ShowIdentifier, TriggerCrashLogSubmission, UpdateWorkingDirectory,
    35                    ValidatePatch, ValidateChangeLogAndReviewer, ValidateCommiterAndReviewer, WaitForCrashCollection)
     35                   ValidatePatch, ValidateChangeLogAndReviewer, ValidateCommiterAndReviewer, WaitForCrashCollection,
     36                   InstallBuiltProduct)
    3637
    3738
     
    115116            self.addStep(InstallGtkDependencies())
    116117        self.addStep(CompileWebKit(skipUpload=self.skipUpload))
     118        if platform == 'gtk':
     119            self.addStep(InstallBuiltProduct())
    117120
    118121
  • trunk/Tools/CISupport/ews-build/factories_unittest.py

    r279486 r279563  
    313313            _BuildStepFactory(steps.InstallGtkDependencies),
    314314            _BuildStepFactory(steps.CompileWebKit, skipUpload=False),
     315            _BuildStepFactory(steps.InstallBuiltProduct),
    315316        ])
    316317
  • trunk/Tools/CISupport/ews-build/steps.py

    r278989 r279563  
    15601560            self.setCommand(self.command + ['DEBUG_INFORMATION_FORMAT=dwarf-with-dsym'])
    15611561            self.setCommand(self.command + ['CLANG_DEBUG_INFORMATION_LEVEL=line-tables-only'])
     1562        if platform == 'gtk':
     1563            prefix = os.path.join("/app", "webkit", "WebKitBuild", self.getProperty("configuration"), "install")
     1564            self.setCommand(self.command + [f'--prefix={prefix}'])
    15621565
    15631566        appendCustomBuildFlags(self, platform, self.getProperty('fullPlatform'))
     
    20312034
    20322035
     2036class InstallBuiltProduct(shell.ShellCommand):
     2037    command = ["python3", "Tools/Scripts/install-built-product",
     2038               WithProperties("--platform=%(fullPlatform)s"), WithProperties("--%(configuration)s")]
     2039
    20332040class CleanBuild(shell.Compile):
    20342041    name = 'delete-WebKitBuild-directory'
  • trunk/Tools/CISupport/ews-build/steps_unittest.py

    r278989 r279563  
    10801080            ExpectShell(workdir='wkdir',
    10811081                        logEnviron=False,
    1082                         command=['perl', 'Tools/Scripts/build-webkit', '--release', '--gtk'],
     1082                        command=['perl', 'Tools/Scripts/build-webkit', '--release', '--prefix=/app/webkit/WebKitBuild/release/install', '--gtk'],
    10831083                        )
    10841084            + 0,
  • trunk/Tools/ChangeLog

    r279562 r279563  
     12021-07-05  Philippe Normand  <pnormand@igalia.com>
     2
     3        [GTK] Pack header and .pc files in the built-product archive
     4        https://bugs.webkit.org/show_bug.cgi?id=227526
     5
     6        Reviewed by Michael Catanzaro.
     7
     8        The header files and pkg-config files needed to build WebKitGTK apps are now included in the
     9        built product zip file. As they're text files the impact on the zip size should not be
     10        significant. In order to support this, two changes are introduced for the GTK build bot:
     11
     12        - build-webkit is now called with a --prefix option
     13        - a new build step has been added, which installs the built files in the given prefix directory
     14
     15        Then built-product-archive can simply pack files from the install prefix directory.
     16
     17        Additionally the .a (potentially big) files are now excluded from the zip archive.
     18
     19        * CISupport/build-webkit-org/factories.py:
     20        (BuildFactory.__init__):
     21        * CISupport/build-webkit-org/steps.py:
     22        (CompileWebKit.start):
     23        (InstallBuiltProduct):
     24        * CISupport/built-product-archive:
     25        * Scripts/install-built-product: Added.
     26
    1272021-07-04  Wenson Hsieh  <wenson_hsieh@apple.com>
    228
Note: See TracChangeset for help on using the changeset viewer.