src/Pure/Build/build_cluster.scala
changeset 80196 9308bc5f65d6
parent 79948 8fe1ed4b5705
child 80198 7883f221d6d3
equal deleted inserted replaced
80195:e2ccabd7a857 80196:9308bc5f65d6
   172     override def toString: String = ssh.toString
   172     override def toString: String = ssh.toString
   173 
   173 
   174     val build_cluster_identifier: String = options.string("build_cluster_identifier")
   174     val build_cluster_identifier: String = options.string("build_cluster_identifier")
   175     val build_cluster_root: Path = Path.explode(options.string("build_cluster_root"))
   175     val build_cluster_root: Path = Path.explode(options.string("build_cluster_root"))
   176     val built_cluster_isabelle_home: Path = build_cluster_root + Path.explode("isabelle")
   176     val built_cluster_isabelle_home: Path = build_cluster_root + Path.explode("isabelle")
   177     val build_cluster_afp_root: Option[Path] =
       
   178       if (build_context.afp_root.isEmpty) None
       
   179       else Some(built_cluster_isabelle_home + Path.explode("AFP"))
       
   180 
   177 
   181     lazy val build_cluster_isabelle: Other_Isabelle =
   178     lazy val build_cluster_isabelle: Other_Isabelle =
   182       Other_Isabelle(built_cluster_isabelle_home,
   179       Other_Isabelle(built_cluster_isabelle_home,
   183         isabelle_identifier = build_cluster_identifier, ssh = ssh)
   180         isabelle_identifier = build_cluster_identifier, ssh = ssh)
   184 
   181 
   185     def sync(): Other_Isabelle = {
   182     def sync(): Other_Isabelle = {
   186       Sync.sync(options, Rsync.Context(ssh = ssh), built_cluster_isabelle_home,
   183       Sync.sync(options, Rsync.Context(ssh = ssh), built_cluster_isabelle_home,
   187         afp_root = build_context.afp_root,
       
   188         purge_heaps = true,
   184         purge_heaps = true,
   189         preserve_jars = true)
   185         preserve_jars = true,
       
   186         dirs = Sync.afp_dirs(build_context.afp_root))
   190       build_cluster_isabelle
   187       build_cluster_isabelle
   191     }
   188     }
   192 
   189 
   193     def init(): Unit =
   190     def init(): Unit =
   194       build_cluster_isabelle.init(other_settings =
   191       build_cluster_isabelle.init(other_settings =
   213         Build.build_worker_command(host,
   210         Build.build_worker_command(host,
   214           ssh = ssh,
   211           ssh = ssh,
   215           build_options = build_options.toList,
   212           build_options = build_options.toList,
   216           build_id = build_context.build_uuid,
   213           build_id = build_context.build_uuid,
   217           isabelle_home = built_cluster_isabelle_home,
   214           isabelle_home = built_cluster_isabelle_home,
   218           afp_root = build_cluster_afp_root,
       
   219           dirs = Path.split(host.dirs).map(build_cluster_isabelle.expand_path),
   215           dirs = Path.split(host.dirs).map(build_cluster_isabelle.expand_path),
   220           quiet = true)
   216           quiet = true)
   221       build_cluster_isabelle.bash(script).check
   217       build_cluster_isabelle.bash(script).check
   222     }
   218     }
   223 
   219