Skip to content

Commit

Permalink
Merge pull request #64 from flichtenheld/o3lnx-ccache
Browse files Browse the repository at this point in the history
buildmaster: Enable ccache for openvpn3-linux
  • Loading branch information
flichtenheld authored Sep 18, 2024
2 parents 30c45e0 + 2d5450d commit d614500
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 14 deletions.
8 changes: 4 additions & 4 deletions buildbot-host/buildmaster/master.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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(
{
Expand All @@ -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(
{
Expand Down
34 changes: 29 additions & 5 deletions buildbot-host/buildmaster/openvpn3-linux/common_linux_steps.cfg
Original file line number Diff line number Diff line change
@@ -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,
)
)

Expand All @@ -26,7 +37,8 @@ def openvpn3LinuxAddCommonLinuxStepsToBuildFactory(factory):
command=["meson", "setup", "--prefix=/usr", "_builddir"],
name="configure",
description="configuring",
descriptionDone="configuring",
descriptionDone="configure",
env=shell_env,
)
)

Expand All @@ -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,
)
)

Expand Down
33 changes: 28 additions & 5 deletions buildbot-host/buildmaster/openvpn3-linux/gdbuspp_steps.cfg
Original file line number Diff line number Diff line change
@@ -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,
)
)

Expand All @@ -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,
)
)

Expand All @@ -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
1 change: 1 addition & 0 deletions buildbot-host/buildmaster/worker-default.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit d614500

Please sign in to comment.