Skip to content

Commit

Permalink
Add diegorusso-aarch64-bigmem worker
Browse files Browse the repository at this point in the history
This worker avoids builds to be started between 10pm and 2am. They will
be scheduled at 2am.
  • Loading branch information
diegorusso committed Oct 25, 2024
1 parent cef8b34 commit 5c4e84b
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 11 deletions.
3 changes: 3 additions & 0 deletions master/custom/builders.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
FedoraRawhideFreedthreadingBuild,
UnixAsanBuild,
UnixAsanDebugBuild,
UnixBigmemBuild,
UnixTraceRefsBuild,
UnixVintageParserBuild,
UnixRefleakBuild,
Expand Down Expand Up @@ -125,6 +126,8 @@
("aarch64 RHEL8 LTO", "cstratak-RHEL8-aarch64", LTONonDebugUnixBuild),
("aarch64 RHEL8 LTO + PGO", "cstratak-RHEL8-aarch64", LTOPGONonDebugBuild),

("aarch64 Ubuntu 22.04 BigMem", "diegorusso-aarch64-bigmem", UnixBigmemBuild),

# macOS aarch64 clang
("ARM64 macOS", "pablogsal-macos-m1", MacOSArmWithBrewBuild),
("ARM64 MacOS M1 NoGIL", "itamaro-macos-arm64-aws", MacOSArmWithBrewNoGilBuild),
Expand Down
6 changes: 6 additions & 0 deletions master/custom/factories.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,12 @@ class UnixBuildWithoutDocStrings(UnixBuild):
configureFlags = ["--with-pydebug", "--without-doc-strings"]


class UnixBigmemBuild(UnixBuild):
buildersuffix = ".bigmem"
testFlags = ["-M60g", "-j4", "-uall,extralargefile"]
factory_tags = ["aarch64", "bigmem"]


class AIXBuild(UnixBuild):
configureFlags = [
"--with-pydebug",
Expand Down
6 changes: 6 additions & 0 deletions master/custom/workers.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,12 @@ def get_workers(settings):
tags=['linux', 'unix', 'rhel', 'arm', 'arm64', 'aarch64'],
parallel_tests=40,
),
cpw(
name="diegorusso-aarch64-bigmem",
tags=['linux', 'unix', 'ubuntu', 'arm', 'arm64', 'aarch64', 'bigmem'],
not_branches=['3.9', '3.10', '3.11', '3.12', '3.13'],
parallel_tests=60,
),
cpw(
name="cstratak-rhel8-s390x",
tags=['linux', 'unix', 'rhel', 's390x'],
Expand Down
46 changes: 35 additions & 11 deletions master/master.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import os
import subprocess
import sys

from datetime import timedelta
from datetime import timedelta, datetime
from functools import partial

from buildbot.plugins import reporters, schedulers, util
Expand Down Expand Up @@ -288,6 +288,24 @@ for branch_num, (git_url, branchname, git_branch) in enumerate(git_branches):
stable_pull_request_builders = []
all_pull_request_builders = []

# Avoid a build to be started between start and end time and delay such build
# at end time
def no_builds_between(start, end):
def f(builder, requests):
now = datetime.now()
if start <= now.hour < end:
# Calculate the delay until end time
delay = ((end - now.hour) % 24) * 3600 - now.minute * 60 - now.second
builder.master.reactor.callLater(
delay,
builder.buildset_manager.submitBuildSet,
requests[0]
)
return None # Do not start the build immediately
return requests[0] # Start the next build request
return f


for name, worker_name, buildfactory, stability, tier in BUILDERS:
if "Windows XP" in name or "VS9.0" in name:
continue
Expand Down Expand Up @@ -315,18 +333,24 @@ for name, worker_name, buildfactory, stability, tier in BUILDERS:
tags = ["PullRequest", stability, *getattr(f, "tags", [])]
if tier:
tags.append(tier)
c["builders"].append(
util.BuilderConfig(
name=buildername,
workernames=[worker_name],
builddir="%s.%s%s"
% ("pull_request", worker_name, getattr(f, "buildersuffix", "")),
factory=f,
tags=tags,
locks=[cpulock.access("counting")],
)

builder = util.BuilderConfig(
name=buildername,
workernames=[worker_name],
builddir="%s.%s%s"
% ("pull_request", worker_name, getattr(f, "buildersuffix", "")),
factory=f,
tags=tags,
locks=[cpulock.access("counting")],
)

# This worker runs pyperformance at 12am. If a build is scheduled between
# 10pm and 2am, it will be delayed at 2am.
if worker_name == "diegorusso-aarch64-bigmem":
builder.nextBuild = no_builds_between(22, 2)

c["builders"].append(builder)

c["schedulers"].append(
GitHubPrScheduler(
name="pull-request-scheduler",
Expand Down

0 comments on commit 5c4e84b

Please sign in to comment.