Commit 1fd953bc authored by Sandro Knauß's avatar Sandro Knauß Committed by Ben Cooksley

Build ABIs for all libraries even if one or more are failing.

This allows for ABI information to be gathered for as many libraries in a project as possible.

Differential Revision: https://phabricator.kde.org/D16680
parent 1bc510af
......@@ -6,6 +6,7 @@ import pathlib
import argparse
import tempfile
import subprocess
import sys
from collections import defaultdict
from typing import Dict, List, Union
......@@ -288,23 +289,35 @@ if os.getenv('GIT_COMMIT') != '':
if not scmRevision:
scmRevision = subprocess.check_output(["git", "log", "--format=%H", "-n 1", "HEAD"]).strip().decode()
# Check every libraries ABI and do not fail, if one is not fine.
# Safe the overall retval state
retval = 0
# Now we generate the ABI dumps for every library we have found
for library in foundLibraries:
# Create the ABI Dump for this library
library.createABIDump( runtimeEnvironment=buildEnvironment )
# Determine where the ABI Dump archive is located
# This location is controlled by abi-compliance-checker, but follows a predictable pattern
fileName = "abi_dumps/{name}/{version}/ABI.dump".format(name=library.name,version=library.version)
extraMetadata = {
"SONAME": max([t['SONAME'] for t in library.targets.values()]), # use max because there may be more than one lib inside
"version": library.version,
"libname": library.name,
"targets": list(library.targets),
"project": arguments.project,
"branchGroup": arguments.branchGroup,
"platform": arguments.platform,
}
packageName = "{name}_{scmRevision}_{platform}".format(name=library.name, scmRevision=scmRevision)
ourArchive.storePackage(packageName, fileName, scmRevision, extraMetadata)
try:
# Create the ABI Dump for this library
library.createABIDump( runtimeEnvironment=buildEnvironment )
# Determine where the ABI Dump archive is located
# This location is controlled by abi-compliance-checker, but follows a predictable pattern
fileName = "abi_dumps/{name}/{version}/ABI.dump".format(name=library.name,version=library.version)
extraMetadata = {
"SONAME": max([t['SONAME'] for t in library.targets.values()]), # use max because there may be more than one lib inside
"version": library.version,
"libname": library.name,
"targets": list(library.targets),
"project": arguments.project,
"branchGroup": arguments.branchGroup,
"platform": arguments.platform,
}
packageName = "{name}_{scmRevision}_{platform}".format(name=library.name, scmRevision=scmRevision)
ourArchive.storePackage(packageName, fileName, scmRevision, extraMetadata)
except subprocess.CalledProcessError as e:
retval = e.returncode
logging.error("abi-complience-checker exited with {retval}".format(retval=retval))
# We had an issue with one of the ABIs
if retval != 0:
sys.exit(retval)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment