descriptionDone = "Shared work directory set up",
command = 'test -L "$PWD" || (mkdir -p ../shared-workdir && rm -rf "$PWD" && ln -s shared-workdir "$PWD")',
workdir = ".",
- haltOnFailure = True))
+ haltOnFailure = True,
+ ))
# find number of cores
factory.addStep(SetPropertyFromCommand(
name = "nproc",
property = "nproc",
description = "Finding number of CPUs",
- command = ["nproc"]))
+ command = ["nproc"],
+ ))
# find gcc and g++ compilers
factory.addStep(FileDownload(
name = "dlfindbinpl",
mastersrc = scripts_dir + '/findbin.pl',
workerdest = "../findbin.pl",
- mode = 0o755))
+ mode = 0o755,
+ ))
factory.addStep(SetPropertyFromCommand(
name = "gcc",
property = "cc_command",
description = "Finding gcc command",
- command = [
- "../findbin.pl", "gcc", "", "",
- ],
- haltOnFailure = True))
+ command = ["../findbin.pl", "gcc", "", ""],
+ haltOnFailure = True,
+ ))
factory.addStep(SetPropertyFromCommand(
name = "g++",
property = "cxx_command",
description = "Finding g++ command",
- command = [
- "../findbin.pl", "g++", "", "",
- ],
- haltOnFailure = True))
+ command = ["../findbin.pl", "g++", "", ""],
+ haltOnFailure = True,
+ ))
# see if ccache is available
factory.addStep(SetPropertyFromCommand(
name = "ccache",
property = "ccache_command",
- command = ["which", "ccache"],
description = "Testing for ccache command",
+ command = ["which", "ccache"],
haltOnFailure = False,
flunkOnFailure = False,
warnOnFailure = False,
name = "fetchrefs",
description = "Fetching Git remote refs",
command = ["git", "fetch", "origin", Interpolate("+refs/heads/%(prop:branch)s:refs/remotes/origin/%(prop:branch)s")],
- haltOnFailure = True
+ haltOnFailure = True,
))
# switch to tag
name = "gitverify",
description = "Ensure that Git HEAD is pointing to a branch or tag",
command = 'git rev-parse --abbrev-ref HEAD | grep -vxqF HEAD || git show-ref --tags --dereference 2>/dev/null | sed -ne "/^$(git rev-parse HEAD) / { s|^.*/||; s|\\^.*||; p }" | grep -qE "^v[0-9][0-9]\\."',
- haltOnFailure = True))
+ haltOnFailure = True,
+ ))
factory.addStep(ShellCommand(
name = "rmtmp",
description = "Remove tmp folder",
- command=["rm", "-rf", "tmp/"]))
+ command=["rm", "-rf", "tmp/"],
+ ))
# feed
factory.addStep(ShellCommand(
name = "rmfeedlinks",
description = "Remove feed symlinks",
- command=["rm", "-rf", "package/feeds/"]))
+ command=["rm", "-rf", "package/feeds/"],
+ ))
factory.addStep(StringDownload(
name = "ccachecc",
description = "Installing feeds",
command=["./scripts/feeds", "install", "-a"],
env = MakeEnv(tryccache=True),
- haltOnFailure = True
+ haltOnFailure = True,
))
# seed config
name = "dlconfigseed",
s = Interpolate("%(kw:seed)s\n", seed=GetConfigSeed),
workerdest = ".config",
- mode = 0o644
+ mode = 0o644,
))
# configure
factory.addStep(ShellCommand(
name = "newconfig",
descriptionDone = ".config seeded",
- command = Interpolate("printf 'CONFIG_TARGET_%(kw:target)s=y\\nCONFIG_TARGET_%(kw:target)s_%(kw:subtarget)s=y\\nCONFIG_SIGNED_PACKAGES=%(kw:usign:#?|y|n)s\\n' >> .config", target=ts[0], subtarget=ts[1], usign=GetUsignKey)
+ command = Interpolate("printf 'CONFIG_TARGET_%(kw:target)s=y\\nCONFIG_TARGET_%(kw:target)s_%(kw:subtarget)s=y\\nCONFIG_SIGNED_PACKAGES=%(kw:usign:#?|y|n)s\\n' >> .config", target=ts[0], subtarget=ts[1], usign=GetUsignKey),
))
factory.addStep(ShellCommand(
name = "delbin",
description = "Removing output directory",
- command = ["rm", "-rf", "bin/"]
+ command = ["rm", "-rf", "bin/"],
))
factory.addStep(ShellCommand(
name = "defconfig",
description = "Populating .config",
command = ["make", "defconfig"],
- env = MakeEnv()
+ env = MakeEnv(),
))
# check arch - exit early if does not exist - NB: some targets do not define CONFIG_TARGET_target_subtarget
name = "libc",
property = "libc",
description = "Finding libc suffix",
- command = ["sed", "-ne", '/^CONFIG_LIBC=/ { s!^CONFIG_LIBC="\\(.*\\)"!\\1!; s!^musl$!!; s!.\\+!-&!p }', ".config"]))
+ command = ["sed", "-ne", '/^CONFIG_LIBC=/ { s!^CONFIG_LIBC="\\(.*\\)"!\\1!; s!^musl$!!; s!.\\+!-&!p }', ".config"],
+ ))
# install build key
factory.addStep(StringDownload(
command = 'mkdir -p ../dl && rm -rf "build/dl" && ln -s ../../dl "build/dl"',
workdir = Property("builddir"),
logEnviron = False,
- want_stdout = False
+ want_stdout = False,
))
# prepare tar
descriptionDone = "GNU tar built and installed",
command = ["make", Interpolate("-j%(prop:nproc:-1)s"), "tools/tar/compile", "V=s"],
env = MakeEnv(tryccache=True),
- haltOnFailure = True
+ haltOnFailure = True,
))
# populate dl
factory.addStep(ShellCommand(
name = "cleanbase",
description = "Cleaning base-files",
- command=["make", "package/base-files/clean", "V=s"]
+ command=["make", "package/base-files/clean", "V=s"],
))
# build
descriptionDone = "Tools built and installed",
command = ["make", Interpolate("-j%(prop:nproc:-1)s"), "tools/install", "V=s"],
env = MakeEnv(tryccache=True),
- haltOnFailure = True
+ haltOnFailure = True,
))
factory.addStep(ShellCommand(
descriptionDone = "Toolchain built and installed",
command=["make", Interpolate("-j%(prop:nproc:-1)s"), "toolchain/install", "V=s"],
env = MakeEnv(),
- haltOnFailure = True
+ haltOnFailure = True,
))
factory.addStep(ShellCommand(
descriptionDone = "Kmods built",
command=["make", Interpolate("-j%(prop:nproc:-1)s"), "target/compile", "V=s", "IGNORE_ERRORS=n m", "BUILD_LOG=1"],
env = MakeEnv(),
- haltOnFailure = True
+ haltOnFailure = True,
))
# find kernel version
property = "kernelversion",
description = "Finding the effective Kernel version",
command = "make --no-print-directory -C target/linux/ val.LINUX_VERSION val.LINUX_RELEASE val.LINUX_VERMAGIC | xargs printf '%s-%s-%s\\n'",
- env = { 'TOPDIR': Interpolate("%(prop:builddir)s/build") }
+ env = { 'TOPDIR': Interpolate("%(prop:builddir)s/build") },
))
factory.addStep(ShellCommand(
name = "pkgclean",
description = "Cleaning up package build",
descriptionDone = "Package build cleaned up",
- command=["make", "package/cleanup", "V=s"]
+ command=["make", "package/cleanup", "V=s"],
))
factory.addStep(ShellCommand(
descriptionDone = "Packages built",
command=["make", Interpolate("-j%(prop:nproc:-1)s"), "package/compile", "V=s", "IGNORE_ERRORS=n m", "BUILD_LOG=1"],
env = MakeEnv(),
- haltOnFailure = True
+ haltOnFailure = True,
))
factory.addStep(ShellCommand(
descriptionDone = "Packages installed",
command=["make", Interpolate("-j%(prop:nproc:-1)s"), "package/install", "V=s"],
env = MakeEnv(),
- haltOnFailure = True
+ haltOnFailure = True,
))
factory.addStep(ShellCommand(
descriptionDone = "Packages indexed",
command=["make", Interpolate("-j%(prop:nproc:-1)s"), "package/index", "V=s", "CONFIG_SIGNED_PACKAGES="],
env = MakeEnv(),
- haltOnFailure = True
+ haltOnFailure = True,
))
factory.addStep(ShellCommand(
descriptionDone = "Images built and installed",
command=["make", Interpolate("-j%(prop:nproc:-1)s"), "target/install", "V=s"],
env = MakeEnv(),
- haltOnFailure = True
+ haltOnFailure = True,
))
factory.addStep(ShellCommand(
description = "Generating config.buildinfo, version.buildinfo and feeds.buildinfo",
command = "make -j1 buildinfo V=s || true",
env = MakeEnv(),
- haltOnFailure = True
+ haltOnFailure = True,
))
factory.addStep(ShellCommand(
description = "Generating profiles.json in target folder",
command = "make -j1 json_overview_image_info V=s || true",
env = MakeEnv(),
- haltOnFailure = True
+ haltOnFailure = True,
))
factory.addStep(ShellCommand(
descriptionDone = "Checksums calculated",
command=["make", "-j1", "checksum", "V=s"],
env = MakeEnv(),
- haltOnFailure = True
+ haltOnFailure = True,
))
factory.addStep(ShellCommand(
name = "dirprepare",
descriptionDone = "Upload directory structure prepared",
command = ["mkdir", "-p", Interpolate("tmp/upload/%(kw:prefix)stargets/%(kw:target)s/%(kw:subtarget)s", target=ts[0], subtarget=ts[1], prefix=GetVersionPrefix)],
- haltOnFailure = True
+ haltOnFailure = True,
))
factory.addStep(ShellCommand(
descriptionDone = "Repository symlink prepared",
command = ["ln", "-s", "-f", Interpolate("../packages-%(kw:basever)s", basever=util.Transform(GetBaseVersion, Property("branch"))), Interpolate("tmp/upload/%(kw:prefix)spackages", prefix=GetVersionPrefix)],
doStepIf = IsNoMasterBuild,
- haltOnFailure = True
+ haltOnFailure = True,
))
factory.addStep(ShellCommand(
name = "dlrsync.sh",
mastersrc = scripts_dir + '/rsync.sh',
workerdest = "../rsync.sh",
- mode = 0o755
+ mode = 0o755,
))
# upload new files and update existing ones
description = "Finding source archives to upload",
descriptionDone = "Source archives to upload found",
command = "find dl/ -maxdepth 1 -type f -not -size 0 -not -name '.*' -not -name '*.hash' -not -name '*.dl' -newer .config -printf '%f\\n' > sourcelist",
- haltOnFailure = True
+ haltOnFailure = True,
))
factory.addStep(ShellCommand(
haltOnFailure = False,
flunkOnFailure = False,
warnOnFailure = False,
- alwaysRun = True
+ alwaysRun = True,
))
factory.addStep(ShellCommand(
haltOnFailure = False,
flunkOnFailure = False,
warnOnFailure = False,
- alwaysRun = True
+ alwaysRun = True,
))
factory.addStep(ShellCommand(
description = "Triggering %s build" % target,
schedulerNames = [ "trigger_%s" % target ],
set_properties = { "reason": Property("reason"), "tag": TagPropertyValue },
- doStepIf = IsTargetSelected(target)
+ doStepIf = IsTargetSelected(target),
))