From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gnu.wildebeest.org (gnu.wildebeest.org [45.83.234.184]) by sourceware.org (Postfix) with ESMTPS id 40C8A3858D1E for ; Sun, 16 Apr 2023 19:05:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 40C8A3858D1E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=klomp.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=klomp.org Received: from csb.redhat.com (deer0x03.wildebeest.org [172.31.17.133]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by gnu.wildebeest.org (Postfix) with ESMTPSA id 31682302BB02; Sun, 16 Apr 2023 21:05:24 +0200 (CEST) Received: by csb.redhat.com (Postfix, from userid 10916) id 0E2EBD0C44; Sun, 16 Apr 2023 21:05:24 +0200 (CEST) From: Mark Wielaard To: buildbot@sourceware.org Cc: "Jose E. Marchesi" , Mark Wielaard Subject: [PATCH] Add gnupoke snapshot scheduler, factory and builder Date: Sun, 16 Apr 2023 21:05:15 +0200 Message-Id: <20230416190515.248478-1-mark@klomp.org> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3036.6 required=5.0 tests=BAYES_00,GIT_PATCH_0,JMQ_SPF_NEUTRAL,KAM_DMARC_STATUS,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: --- .../containers/Containerfile-fedora-latest | 1 + builder/master.cfg | 73 ++++++++++++++++++- 2 files changed, 70 insertions(+), 4 deletions(-) diff --git a/builder/containers/Containerfile-fedora-latest b/builder/containers/Containerfile-fedora-latest index e4016af..4fa217b 100644 --- a/builder/containers/Containerfile-fedora-latest +++ b/builder/containers/Containerfile-fedora-latest @@ -13,6 +13,7 @@ RUN dnf upgrade -y && \ jq json-c-devel socat \ texinfo elfutils-debuginfod elfutils-debuginfod-client-devel \ gcc-plugin-devel binutils-devel \ + libnbd-devel gc-devel readline-devel texinfo-tex \ xmlto xmlto-tex fop poppler-utils libxslt docbook-dtds docbook-style-xsl \ libxml2-devel dos2unix dpkg koji python3-devel python3-koji python3-mock \ python3-rpm python3-pyxdg mailcap openmpi-devel gdb help2man wget xxhash-devel \ diff --git a/builder/master.cfg b/builder/master.cfg index 7564f58..fecdc76 100644 --- a/builder/master.cfg +++ b/builder/master.cfg @@ -349,6 +349,15 @@ def master_and_users_try_branches(ref): return True return False +# For git maint branches (as gnu poke uses) +def master_and_maint_branches(ref): + if ref == "refs/heads/master": + return True + match = re.match ("refs/heads/maint/poke-[a-zA-Z0-9_-]+", ref) + if match: + return True + return False + sourceware_repourl='https://sourceware.org/git/builder.git' sourceware_gitpoller = changes.GitPoller(repourl=sourceware_repourl, branches=['main'], @@ -452,7 +461,7 @@ c['change_source'].append(glibc_gitpoller) gnupoke_repourl='https://git.savannah.gnu.org/git/poke.git' gnupoke_gitpoller = changes.GitPoller(repourl=gnupoke_repourl, - branches=['master'], + branches=master_and_maint_branches, pollInterval=3*60, pollRandomDelayMax=2*60, project='gnupoke') @@ -982,6 +991,16 @@ gnupoke_scheduler = schedulers.SingleBranchScheduler( "gnupoke-gentoo-sparc"]) c['schedulers'].append(gnupoke_scheduler) +gnupoke_snapshot_scheduler = schedulers.Periodic( + name="gnupoke-snapshots", + change_filter=util.ChangeFilter(project="gnupoke", + branch_re=re.compile("master$|poke-[a-zA-Z0-9_-]+$")), + periodicBuildTimer=15*60, # 15 minutes in seconds + onlyIfChanged=True, + reason="gnupoke periodic project master/maint branch snapshot", + builderNames=["poke-snapshots-html-pdf-dist"]) +c['schedulers'].append(gnupoke_snapshot_scheduler) + annobin_scheduler = schedulers.SingleBranchScheduler( name="annobin", change_filter=util.ChangeFilter(project="annobin", @@ -1082,6 +1101,12 @@ make_step = steps.Compile( util.Interpolate('-j%(prop:ncpus)s')]), name="make", haltOnFailure=True) +make_html_step = steps.Compile( + command=["make", "html"], + name="make html") +make_pdf_step = steps.Compile( + command=["make", "pdf"], + name="make pdf") make_check_step = steps.Test( command=addOutputSync.withArgs(["make", "check", util.Interpolate('-j%(prop:ncpus)s')]), @@ -1749,6 +1774,11 @@ elfutils_create_publish_file_step = steps.ShellCommand( name="create publish file", command="echo elfutils/coverage > /home/builder/shared/publish") +# publish file based on branch name, cut away all but last / element +poke_create_publish_file_step = steps.ShellCommand( + name="create publish file", + command=util.Interpolate('(echo -n gnupoke/; echo %(prop:branch)s | rev | cut -f1 -d/ | rev | sed -e s/master/trunk/) > /home/builder/shared/publish')) + # Upload automake test results, autoconf config.log, in both build and dist-build trees elfutils_upload_to_bunsen = bunsen_logfile_upload_cpio_steps( ["*.trs", "*.log"]) @@ -4275,13 +4305,25 @@ systemtap_gentoo_sparc_builder = util.BuilderConfig( c['builders'].append(systemtap_gentoo_sparc_builder) # GNU poke builders and factories -gnupoke_factory = util.BuildFactory() -gnupoke_factory.addStep(steps.Git( + +# publish file based on branch name, cut away all but last / element +poke_create_publish_file_step = steps.ShellCommand( + name="create publish file", + command=util.Interpolate('(echo -n gnupoke/; echo %(prop:branch)s | rev | cut -f1 -d/ | rev | sed -e s/master/trunk/) > /home/builder/shared/publish')) + +poke_create_output_step = steps.ShellCommand( + name="create output", + command="mkdir /home/builder/shared/output && mv ./poke-*.tar.gz /home/builder/shared/output/ && mv ./doc/poke.html /home/builder/shared/output/html && mv ./doc/poke.pdf /home/builder/shared/output/") + +poke_git_step = steps.Git( repourl=gnupoke_repourl, mode='full', method='fresh', name="git checkout", getDescription={'tags':True, 'always':True}, - haltOnFailure=True)) + haltOnFailure=True) + +gnupoke_factory = util.BuildFactory() +gnupoke_factory.addStep(poke_git_step) gnupoke_factory.addStep(bootstrap_step) gnupoke_factory.addStep(configure_step) gnupoke_factory.addStep(make_step) @@ -4291,6 +4333,19 @@ gnupoke_factory.addStep(steps.Test(command=["make", "syntax-check"], haltOnFailure=False, flunkOnFailure=True)) gnupoke_factory.addSteps(bunsen_logfile_upload_cpio_steps(["*.sum", "*.log"])) +# snapshots +gnupoke_snapshots_factory = util.BuildFactory() +gnupoke_snapshots_factory.addStep(poke_git_step) +gnupoke_snapshots_factory.addStep(bootstrap_step) +gnupoke_snapshots_factory.addStep(configure_step) +gnupoke_snapshots_factory.addStep(make_step) +gnupoke_snapshots_factory.addStep(make_html_step) +gnupoke_snapshots_factory.addStep(make_pdf_step) +gnupoke_snapshots_factory.addStep(make_dist_step) +gnupoke_snapshots_factory.addStep(wait_snapshots_output_ready_step) +gnupoke_snapshots_factory.addStep(poke_create_output_step) +gnupoke_snapshots_factory.addStep(poke_create_publish_file_step) + gnupoke_debiantesting_x86_64_builder = util.BuilderConfig( name="gnupoke-debian-testing-x86_64", tags=["gnupoke", "debian-testing", "x86_64"], @@ -4314,6 +4369,16 @@ gnupoke_gentoo_space_builder = util.BuilderConfig( factory=gnupoke_factory) c['builders'].append(gnupoke_gentoo_space_builder) +poke_snapshots_builder = util.BuilderConfig( + name="poke-snapshots-html-pdf-dist", + collapseRequests=True, + properties={'container-file': + readContainerFile('fedora-latest')}, + workernames="snapshots", + tags=["gnupoke-snapshots"], + factory=gnupoke_snapshots_factory) +c['builders'].append(poke_snapshots_builder) + # annobin steps, builders and factories # annobin checkouts have generated config files included, but might -- 2.31.1