def prepare_multi_configuration_build(configfile, outputfile): """Main entry point for preparing matrix builds. Reads a file with configurations to use (one configuration per line, with a list of space-separated build options on each line; comments starting with # and empty lines ignored). Writes out a file with the provided name to build/, in a format suitable for passing to Parameterized Trigger as a build parameter that can be used as a dynamic axis in a matrix build to build the provided configurations. Args: configfile (str): File that contains the configurations to use. Names without directory separators are interpreted as :file:`gromacs/admin/builds/{configfile}.txt`. outputfile (str): File to write the configurations to, under build/. """ from factory import ContextFactory from matrixbuild import prepare_build_matrix factory = ContextFactory() with factory.status_reporter: prepare_build_matrix(factory, configfile, outputfile)
def prepare_multi_configuration_build(configfile): """Main entry point for preparing matrix builds. Reads a file with configurations to use (one configuration per line, with a list of space-separated build options on each line; comments starting with # and empty lines ignored). Args: configfile (str): File that contains the configurations to use. Names without directory separators are interpreted as :file:`gromacs/admin/builds/{configfile}.txt`. """ from factory import ContextFactory from matrixbuild import prepare_build_matrix factory = ContextFactory() with factory.status_reporter as status: status.return_value = prepare_build_matrix(factory, configfile)
def prepare_matrix(args, factory): status = factory.status_reporter status.return_value = matrixbuild.prepare_build_matrix(factory, args.matrix)
def prepare_matrix(args, factory): status = factory.status_reporter status.return_value = matrixbuild.prepare_build_matrix( factory, args.matrix)
workspace_root = args.workspace if workspace_root is None: workspace_root = os.path.join(os.path.dirname(__file__), "..", "..") workspace_root = os.path.abspath(workspace_root) project = Project.GROMACS if args.project is not None: project = Project.parse(args.project) env = dict(os.environ) env.update({ 'CHECKOUT_PROJECT': Project.RELENG, 'CHECKOUT_REFSPEC': 'HEAD', 'GROMACS_REFSPEC': 'HEAD', 'RELENG_REFSPEC': 'HEAD', 'REGRESSIONTESTS_REFSPEC': 'HEAD', 'WORKSPACE': workspace_root }) # Please ensure that run_build() in __init__.py stays in sync. factory = ContextFactory(default_project=project, system=args.system, env=env) if not args.run: from executor import DryRunExecutor factory.init_executor(cls=DryRunExecutor) factory.init_gerrit_integration(user=args.user) with factory.status_reporter: if args.matrix: prepare_build_matrix(factory, args.matrix, os.path.basename(args.matrix)) else: BuildContext._run_build(factory, args.build, args.job_type, args.opts)