def main(): parser = optparse.OptionParser() parser.add_option("--build_type", dest="build_type", default="RELEASE") parser.add_option("--mode", choices=['orca', 'codegen', 'orca_codegen', 'planner']) parser.add_option("--compiler", dest="compiler") parser.add_option("--cxxflags", dest="cxxflags") parser.add_option("--output_dir", dest="output_dir", default="install") parser.add_option("--gpdb_name", dest="gpdb_name") (options, args) = parser.parse_args() if options.mode == 'orca': ciCommon = GpBuild(options.mode) elif options.mode == 'planner': ciCommon = GpBuild(options.mode) elif options.mode == 'codegen': ciCommon = GpcodegenBuild() elif options.mode == 'orca_codegen': ciCommon = GporcacodegenBuild() status = ciCommon.install_system_deps() if status: return status for dependency in args: status = ciCommon.install_dependency(dependency) if status: return status status = install_gpdb(options.gpdb_name) if status: return status status = ciCommon.configure() if status: return status status = create_gpadmin_user() if status: return status status = ciCommon.icg() if status: copy_output() return status
def main(): parser = optparse.OptionParser() parser.add_option("--build_type", dest="build_type", default="RELEASE") parser.add_option("--mode", choices=['orca', 'codegen', 'orca_codegen', 'planner'], default="orca_codegen") parser.add_option("--compiler", dest="compiler") parser.add_option("--cxxflags", dest="cxxflags") parser.add_option("--output_dir", dest="output_dir", default="install") (options, args) = parser.parse_args() if options.mode == 'orca': ciCommon = GpBuild(options.mode) elif options.mode == 'planner': ciCommon = GpBuild(options.mode) elif options.mode == 'codegen': ciCommon = GpcodegenBuild() elif options.mode == 'orca_codegen': ciCommon = GporcacodegenBuild() status = ciCommon.install_system_deps() if status: return status for dependency in args: status = ciCommon.install_dependency(dependency) if status: return status status = ciCommon.configure() if status: return status status = make(ciCommon.num_cpus()) if status: return status status = unittest() if status: return status status = install(options.output_dir) if status: return status return 0