customize

This commit is contained in:
AF 2023-08-05 17:57:14 +00:00
parent 7f4cefd0a6
commit b133d8a135

View File

@ -3,7 +3,7 @@
import os
from buildbot.plugins import *
from buildbot.plugins import worker, changes, util, steps, schedulers, reporters
from buildbot.www.authz.roles import RolesFromBase
# This is a sample buildmaster config file. It must be installed as
@ -32,6 +32,7 @@ c["workers"] = [
worker.Worker("worker-rust-1-71", "pass", properties={"rust_version": "1.71"}),
]
rust_workers_1_65 = ["worker-rust-1-65"]
rust_workers_1_71 = ["worker-rust-1-71"]
if "BUILDBOT_MQ_URL" in os.environ:
c["mq"] = {
@ -153,7 +154,7 @@ def cargo_fmt(name: str, workernames: list[str]):
append_factory(factory, name, workernames)
def cargo_doc(name: str, workernames: list[str], latest: bool):
def cargo_doc(name: str, workernames: list[str], specific: bool, latest: bool):
factory = basic_factory()
factory.addStep(
steps.ShellCommand(
@ -165,6 +166,7 @@ def cargo_doc(name: str, workernames: list[str], latest: bool):
env=env,
)
)
if specific:
factory.addStep(
steps.DirectoryUpload(
workersrc=DOC_DIR,
@ -189,8 +191,9 @@ def cargo_doc(name: str, workernames: list[str], latest: bool):
cargo_test("cargo test (1.65)", rust_workers_1_65)
cargo_clippy("cargo clippy (1.65)", rust_workers_1_65)
cargo_fmt("cargo fmt (1.65)", rust_workers_1_65)
cargo_doc("cargo doc (1.65)", rust_workers_1_65, True)
cargo_clippy("cargo clippy (1.71)", rust_workers_1_71)
cargo_fmt("cargo fmt (1.71)", rust_workers_1_71)
cargo_doc("cargo doc (1.71)", rust_workers_1_71, False, True)
####### SCHEDULERS