public inbox for buildbot@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Add glibc snapshots builder
@ 2023-08-19 18:45 Mark Wielaard
  0 siblings, 0 replies; only message in thread
From: Mark Wielaard @ 2023-08-19 18:45 UTC (permalink / raw)
  To: buildbot; +Cc: Mark Wielaard

First creates a dist, then unpacks that dist and then builds the
manual from that. Publishing both the src dists and the manuals.
---
 builder/master.cfg | 99 ++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 99 insertions(+)

diff --git a/builder/master.cfg b/builder/master.cfg
index 00d5c8c..f4f7aa5 100644
--- a/builder/master.cfg
+++ b/builder/master.cfg
@@ -1057,6 +1057,17 @@ dwarfspec_snapshot_scheduler = schedulers.Periodic(
         builderNames=["dwarfspec-snapshots-trunk"])
 c['schedulers'].append(dwarfspec_snapshot_scheduler)
 
+glibc_snapshot_scheduler = schedulers.Periodic(
+        name="glibc-snapshots",
+        change_filter=util.ChangeFilter(project="glibc",
+                                        branch="master"),
+        branch="master",
+        periodicBuildTimer=15*60, # 15 minutes in seconds
+        onlyIfChanged=True,
+        reason="glibc periodic project master branch snapshot",
+        builderNames=["glibc-snapshots-trunk"])
+c['schedulers'].append(glibc_snapshot_scheduler)
+
 ####### BUILDERS
 
 # The 'builders' list defines the Builders, which tell Buildbot how to perform a build:
@@ -4665,6 +4676,94 @@ dwarfspec_snapshots_trunk_builder = util.BuilderConfig(
         factory=dwarfspec_snapshots_trunk_factory)
 c['builders'].append(dwarfspec_snapshots_trunk_builder)
 
+glibc_make_dist_step = steps.Compile(
+        workdir='glibc-build',
+        command=['make', 'dist'],
+        name='make dist')
+glibc_unpack_dist_step = steps.ShellCommand(
+        workdir='glibc-build',
+        command="dirname=$(basename ../glibc/glibc-*.tar.gz .tar.gz) && "
+        + "tar zxf ../glibc/glibc-*.tar.gz && "
+        + "mv $dirname glibc-dist && "
+        + "cd glibc-dist && "
+        + "mkdir glibc-build && cd glibc-build && "
+        + "../configure --prefix=/usr",
+        name='unpack dist')
+glibc_make_no_split_html_step = steps.ShellCommand(
+        workdir='glibc-build/glibc-dist/glibc-build',
+        command="make MAKEINFO='makeinfo --no-split' html && "
+        + "mv manual/libc manual/libc.html",
+        name='make no-split html')
+glibc_make_info_step = steps.ShellCommand(
+        workdir='glibc-build/glibc-dist/glibc-build',
+        command="make info",
+        name='make info')
+glibc_make_html_step = steps.ShellCommand(
+        workdir='glibc-build/glibc-dist/glibc-build',
+        command="make html",
+        name='make html')
+glibc_make_dvi_step = steps.ShellCommand(
+        workdir='glibc-build/glibc-dist/glibc-build',
+        command="make dvi",
+        name='make dvi')
+glibc_make_pdf_step = steps.ShellCommand(
+        workdir='glibc-build/glibc-dist/glibc-build',
+        command="make pdf",
+        name='make pdf')
+glibc_make_txt_step = steps.ShellCommand(
+        workdir='glibc-build/glibc-dist/glibc-build/manual',
+        command="makeinfo --no-split -o libc.txt --plaintext -P ../../manual ../../manual/libc.texinfo",
+        name='make plain text')
+glibc_make_archives_step =  steps.ShellCommand(
+        workdir='glibc-build/glibc-dist/glibc-build/manual',
+        command="tar czf libc-texi.tar.gz *.texi* -C ../../manual . && "
+        + "tar czf libc-info.tar.gz libc.info* && "
+        + "tar czf libc-html_node.tar.gz libc && "
+        + "gzip libc.dvi && "
+        + "gzip libc.txt",
+        name='make archives')
+
+glibc_create_output_step = steps.ShellCommand(
+        workdir='glibc-build',
+        name="create output",
+        command="mkdir -p /home/builder/shared/output/{src,manual} &&"
+        + "mv ../glibc/glibc/glibc-*tar* /home/builder/shared/output/src; "
+        + "mv glibc-dist/glibc-build/manual/libc.html /home/builder/shared/output/manual/; "
+        + "mv glibc-dist/glibc-build/manual/libc /home/builder/shared/output/manual/html_node; "
+        + "mv glibc-dist/glibc-build/manual/libc*gz /home/builder/shared/output/manual/")
+glibc_create_publish_file_step = steps.ShellCommand(
+        name="create publish file",
+        command="echo glibc/trunk > /home/builder/shared/publish")
+
+# First creates a dist, then unpacks that dist and then builds the
+# manual from that. Publishing both the src dists and the manuals.
+glibc_snapshots_trunk_factory = util.BuildFactory()
+glibc_snapshots_trunk_factory.addStep(glibc_git_step)
+glibc_snapshots_trunk_factory.addStep(glibc_rm_step)
+glibc_snapshots_trunk_factory.addStep(glibc_configure_step)
+glibc_snapshots_trunk_factory.addStep(glibc_make_dist_step)
+glibc_snapshots_trunk_factory.addStep(glibc_unpack_dist_step)
+glibc_snapshots_trunk_factory.addStep(glibc_make_no_split_html_step)
+glibc_snapshots_trunk_factory.addStep(glibc_make_info_step)
+glibc_snapshots_trunk_factory.addStep(glibc_make_html_step)
+glibc_snapshots_trunk_factory.addStep(glibc_make_dvi_step)
+glibc_snapshots_trunk_factory.addStep(glibc_make_pdf_step)
+glibc_snapshots_trunk_factory.addStep(glibc_make_txt_step)
+glibc_snapshots_trunk_factory.addStep(glibc_make_archives_step)
+glibc_snapshots_trunk_factory.addStep(wait_snapshots_output_ready_step)
+glibc_snapshots_trunk_factory.addStep(glibc_create_output_step)
+glibc_snapshots_trunk_factory.addStep(glibc_create_publish_file_step)
+
+glibc_snapshots_trunk_builder = util.BuilderConfig(
+        name="glibc-snapshots-trunk",
+        collapseRequests=True,
+        properties={'container-file':
+                    readContainerFile('fedora-latest')},
+        workernames="snapshots",
+        tags=["glibc-snapshots", "trunk"],
+        factory=glibc_snapshots_trunk_factory)
+c['builders'].append(glibc_snapshots_trunk_builder)
+
 ####### BUILDBOT SERVICES
 
 # 'services' is a list of BuildbotService items like reporter targets. The
-- 
2.39.3


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-08-19 18:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-19 18:45 [PATCH] Add glibc snapshots builder Mark Wielaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).