diff --git a/helpers/check-abi.py b/helpers/check-abi.py --- a/helpers/check-abi.py +++ b/helpers/check-abi.py @@ -21,7 +21,7 @@ class Library: def __init__(self, packageName, library): - self.packgeName = packageName + self.packageName = packageName self.library = library self.candidates = [] @@ -50,7 +50,7 @@ logging.warning("No released version was found, just use the oldest commit.") # the candidate needs to be older than the current build. - if timestamp > candidate['timestamp']: + if timestamp < candidate['timestamp']: return None return candidate @@ -97,6 +97,10 @@ for key, entry in ourArchive.serverManifest.items(): try: + if entry['platform'] != arguments.platform: + continue + if entry["branchGroup"] != arguments.branchGroup: + continue if entry["project"] == arguments.project and entry["scmRevision"] == scmRevision: libraries.append(Library(key,entry)) except KeyError: @@ -123,7 +127,7 @@ # Ignore new SONAMEs on other branchGroups. if keepBuildGroup and entry["branchGroup"] != arguments.branchGroup: continue - logging.warning("We searched for SONAME = {}, but found a newer SONAME = {} in the builds, that should not happen, as SONAMEs should only rise and never go lower!".format(soname, entry['SONAME'])) + logging.warning("We searched for SONAME = %s, but found a newer SONAME = %s in the builds, that should not happen, as SONAMEs should only rise and never go lower!", soname, entry['SONAME']) # Check every libraries ABI and do not fail, if one is not fine. # Safe the overall retval state @@ -134,14 +138,14 @@ libname = library['libname'] candidate = l.candidate() if not candidate: - logging.info("Did not found any older build for {}, nothing to check ABI against.",libname) + logging.info("Did not found any older build for %s, nothing to check ABI against.",libname) continue # get the packages, we want to test against each other newLibraryPath, _ = ourArchive.retrievePackage(l.packageName) oldLibraryPath, _ = ourArchive.retrievePackage(candidate['packageName']) - logging.info("Let's do a ABI check {} against {}", library['scmRevision'], candidate['scmRevision']) + logging.info("Let's do a ABI check %s against %s", library['scmRevision'], candidate['scmRevision']) # check ABI and write compat reports cmd = ["abi-compliance-checker", @@ -152,7 +156,7 @@ ret = subprocess.call(cmd) if ret != 0: - logging.error("abi-compliance-checker exited with {ret}", ret=ret) + logging.error("abi-compliance-checker exited with %s", ret) retval = ret # We had an issue with one of the ABIs diff --git a/pipeline-templates/SUSEQt5.7.template b/pipeline-templates/SUSEQt5.7.template --- a/pipeline-templates/SUSEQt5.7.template +++ b/pipeline-templates/SUSEQt5.7.template @@ -123,6 +123,14 @@ python3 -u ci-tooling/helpers/create-abi-dump.py --project ${projectName} --branchGroup ${branchGroup} --platform ${currentPlatform} --buildLog currentBuildLog.txt --environment production --usingInstall '$HOME/install-prefix/' || true """ + // Now perform the ABI Compatibility checks + // This tool will produce reports stored at compat_reports/ which we will also need to capture + sh """ + python3 -u ci-tooling/helpers/check-abi.py --project ${projectName} --branchGroup ${branchGroup} --platform ${currentPlatform} --environment production || true + """ + // Save the ABI Compatibility reports for developers to review if necessary + archiveArtifacts artifacts: 'compat_reports/*_compat_reports.html', onlyIfSuccessful: false + // Platform Enablement Checks // Frameworks have a metadata file which specifies the platforms it supports and should be built on // This check compares that metadata file against the records held by the CI system diff --git a/pipeline-templates/SUSEQt5.9.template b/pipeline-templates/SUSEQt5.9.template --- a/pipeline-templates/SUSEQt5.9.template +++ b/pipeline-templates/SUSEQt5.9.template @@ -123,6 +123,14 @@ python3 -u ci-tooling/helpers/create-abi-dump.py --project ${projectName} --branchGroup ${branchGroup} --platform ${currentPlatform} --buildLog currentBuildLog.txt --environment production --usingInstall '$HOME/install-prefix/' || true """ + // Now perform the ABI Compatibility checks + // This tool will produce reports stored at compat_reports/ which we will also need to capture + sh """ + python3 -u ci-tooling/helpers/check-abi.py --project ${projectName} --branchGroup ${branchGroup} --platform ${currentPlatform} --environment production || true + """ + // Save the ABI Compatibility reports for developers to review if necessary + archiveArtifacts artifacts: 'compat_reports/*_compat_reports.html', onlyIfSuccessful: false + // cppcheck is not supported by Pipeline at the moment, so we don't run that for now // See https://issues.jenkins-ci.org/browse/JENKINS-35096