From 2d5450db1115d55df8220788ae21537199326fc1 Mon Sep 17 00:00:00 2001 From: Frank Lichtenheld Date: Mon, 16 Sep 2024 16:29:51 +0200 Subject: [PATCH] buildmaster: Enable ccache for openvpn3-linux Really should help for C++ builds. Signed-off-by: Frank Lichtenheld --- buildbot-host/buildmaster/master.cfg | 8 ++--- .../openvpn3-linux/common_linux_steps.cfg | 34 ++++++++++++++++--- .../openvpn3-linux/gdbuspp_steps.cfg | 33 +++++++++++++++--- buildbot-host/buildmaster/worker-default.ini | 1 + 4 files changed, 62 insertions(+), 14 deletions(-) diff --git a/buildbot-host/buildmaster/master.cfg b/buildbot-host/buildmaster/master.cfg index f1822d3..0231057 100755 --- a/buildbot-host/buildmaster/master.cfg +++ b/buildbot-host/buildmaster/master.cfg @@ -651,8 +651,8 @@ del factory # OpenSSL openvpn3-linux smoketest builds factory = util.BuildFactory() -factory = openvpn3LinuxAddGdbusppStepsToBuildFactory(factory) -factory = openvpn3LinuxAddCommonLinuxStepsToBuildFactory(factory) +factory = openvpn3LinuxAddGdbusppStepsToBuildFactory(factory, ccache) +factory = openvpn3LinuxAddCommonLinuxStepsToBuildFactory(factory, ccache) factory_name = "openvpn3-linux-openssl-smoketest" factories.update( { @@ -668,8 +668,8 @@ del factory # OpenSSL openvpn3-linux builds factory = util.BuildFactory() -factory = openvpn3LinuxAddGdbusppStepsToBuildFactory(factory) -factory = openvpn3LinuxAddCommonLinuxStepsToBuildFactory(factory) +factory = openvpn3LinuxAddGdbusppStepsToBuildFactory(factory, ccache) +factory = openvpn3LinuxAddCommonLinuxStepsToBuildFactory(factory, ccache) factory_name = "openvpn3-linux-openssl" factories.update( { diff --git a/buildbot-host/buildmaster/openvpn3-linux/common_linux_steps.cfg b/buildbot-host/buildmaster/openvpn3-linux/common_linux_steps.cfg index 0590439..3ba9a3d 100644 --- a/buildbot-host/buildmaster/openvpn3-linux/common_linux_steps.cfg +++ b/buildbot-host/buildmaster/openvpn3-linux/common_linux_steps.cfg @@ -1,23 +1,34 @@ # -*- python -*- # ex: set filetype=python: -def openvpn3LinuxAddCommonLinuxStepsToBuildFactory(factory): +def openvpn3LinuxAddCommonLinuxStepsToBuildFactory(factory, shell_env): factory.addStep( steps.Git( repourl=openvpn3_linux_repo_url, mode="incremental", name="clone", description="cloning", - descriptionDone="cloning", + descriptionDone="clone", submodules=True, ) ) + factory.addStep( + steps.ShellCommand( + command="ccache -z", + name="ccache reset", + decodeRC={0: SUCCESS, 127: WARNINGS}, + description="resetting stats", + descriptionDone="reset stats", + env=shell_env, + ) + ) factory.addStep( steps.ShellCommand( command=["./bootstrap.sh"], name="bootstrap", - description="bootstrap", + description="bootstrapinp", descriptionDone="bootstrap", + env=shell_env, ) ) @@ -26,7 +37,8 @@ def openvpn3LinuxAddCommonLinuxStepsToBuildFactory(factory): command=["meson", "setup", "--prefix=/usr", "_builddir"], name="configure", description="configuring", - descriptionDone="configuring", + descriptionDone="configure", + env=shell_env, ) ) @@ -35,7 +47,19 @@ def openvpn3LinuxAddCommonLinuxStepsToBuildFactory(factory): command=["meson", "compile", "-C", "_builddir", "--jobs=1"], name="building", description="building", - descriptionDone="building", + descriptionDone="build", + env=shell_env, + ) + ) + + factory.addStep( + steps.ShellCommand( + command="ccache -s", + decodeRC={0: SUCCESS, 127: WARNINGS}, + name="ccache show", + description="showing stats", + descriptionDone="show stats", + env=shell_env, ) ) diff --git a/buildbot-host/buildmaster/openvpn3-linux/gdbuspp_steps.cfg b/buildbot-host/buildmaster/openvpn3-linux/gdbuspp_steps.cfg index 9b1dee6..27bf079 100644 --- a/buildbot-host/buildmaster/openvpn3-linux/gdbuspp_steps.cfg +++ b/buildbot-host/buildmaster/openvpn3-linux/gdbuspp_steps.cfg @@ -1,28 +1,39 @@ # -*- python -*- # ex: set filetype=python: -def openvpn3LinuxAddGdbusppStepsToBuildFactory(factory): +def openvpn3LinuxAddGdbusppStepsToBuildFactory(factory, shell_env): factory.addStep( steps.Git( repourl="https://codeberg.org/OpenVPN/gdbuspp.git", mode="incremental", name="clone", description="cloning", - descriptionDone="cloning", + descriptionDone="clone", descriptionSuffix="gdbuspp", alwaysUseLatest=True, workdir="gdbuspp", ) ) + factory.addStep( + steps.ShellCommand( + command="ccache -z", + name="ccache reset", + decodeRC={0: SUCCESS, 127: WARNINGS}, + description="resetting stats", + descriptionDone="reset stats", + env=shell_env, + ) + ) factory.addStep( steps.ShellCommand( command=["meson", "setup", "--prefix=/usr", "_builddir"], name="configure", description="configuring", - descriptionDone="configuring", + descriptionDone="configure", descriptionSuffix="gdbuspp", workdir="gdbuspp", haltOnFailure=True, + env=shell_env, ) ) @@ -31,10 +42,11 @@ def openvpn3LinuxAddGdbusppStepsToBuildFactory(factory): command=["meson", "compile", "-C", "_builddir", "--jobs=1"], name="building", description="building", - descriptionDone="building", + descriptionDone="build", descriptionSuffix="gdbuspp", workdir="gdbuspp", haltOnFailure=True, + env=shell_env, ) ) @@ -43,10 +55,21 @@ def openvpn3LinuxAddGdbusppStepsToBuildFactory(factory): command=["meson", "install", "-C", "_builddir"], name="installing", description="installing", - descriptionDone="installing", + descriptionDone="install", descriptionSuffix="gdbuspp", workdir="gdbuspp", ) ) + factory.addStep( + steps.ShellCommand( + command="ccache -s", + decodeRC={0: SUCCESS, 127: WARNINGS}, + name="ccache show", + description="showing stats", + descriptionDone="show stats", + env=shell_env, + ) + ) + return factory diff --git a/buildbot-host/buildmaster/worker-default.ini b/buildbot-host/buildmaster/worker-default.ini index 472a594..f220afc 100644 --- a/buildbot-host/buildmaster/worker-default.ini +++ b/buildbot-host/buildmaster/worker-default.ini @@ -30,6 +30,7 @@ openvpn3_linux_command_prefix=["/bin/sh", "-c"] [debian-11] image=openvpn_community/buildbot-worker-debian-11:v1.0.3 +# meson too old enable_openvpn3-linux_builds=false [debian-11-arm64]