def build_strict(packages, arch): common.run_pmbootstrap(["build_init"]) common.run_pmbootstrap([ "--details-to-stdout", "--no-ccache", "build", "--strict", "--force", "--arch", arch, ] + list(packages))
def verify_checksums(packages, arch): # Only do this with one build-{arch} job arch_verify = "x86_64" if arch != arch_verify: print(f"NOTE: doing checksum verification in build-{arch_verify} job," " not here.") return if len(packages) == 0: print("no packages changed, not doing any checksums verification") return common.run_pmbootstrap(["build_init"]) common.run_pmbootstrap(["--details-to-stdout", "checksum", "--verify"] + list(packages))
def check_build(packages, verify_only=False): # Initialize build environment with less logging common.run_pmbootstrap(["build_init"]) if verify_only: common.run_pmbootstrap( ["--details-to-stdout", "checksum", "--verify"] + list(packages)) else: common.run_pmbootstrap( ["--details-to-stdout", "build", "--strict", "--force"] + list(packages))
import common import os.path import sys if __name__ == "__main__": common.add_upstream_git_remote() apkbuilds = {file for file in common.get_changed_files(removed=False) if os.path.basename(file) == "APKBUILD"} if len(apkbuilds) < 1: print("No APKBUILDs to lint") sys.exit(0) issues = [] for apkbuild in apkbuilds: if apkbuild.startswith("temp/") or apkbuild.startswith("cross/"): print(f"NOTE: Skipping linting of {apkbuild}") continue package = os.path.basename(os.path.dirname(apkbuild)) result = common.run_pmbootstrap(["-q", "lint", package], output_return=True) if len(result) > 0: issues.append([apkbuild, result]) if len(issues) > 0: print("Linting issues found:") for issue in issues: print(issue[0] + ": " + issue[1]) sys.exit(1)