src/Pure/Admin/isabelle_cronjob.scala
changeset 66898 8b7c4679c05b
parent 66897 d2f983fe3e73
child 66902 f6bc83ffda02
equal deleted inserted replaced
66897:d2f983fe3e73 66898:8b7c4679c05b
   186         detect = Build_Log.Prop.build_tags + " = " + SQL.string("polyml-test")),
   186         detect = Build_Log.Prop.build_tags + " = " + SQL.string("polyml-test")),
   187       Remote_Build("Mac OS X 10.8 Mountain Lion", "macbroy30", options = "-m32 -M2", args = "-a",
   187       Remote_Build("Mac OS X 10.8 Mountain Lion", "macbroy30", options = "-m32 -M2", args = "-a",
   188         detect = Build_Log.Prop.build_start + " < date '2017-03-03'"))
   188         detect = Build_Log.Prop.build_start + " < date '2017-03-03'"))
   189 
   189 
   190 
   190 
   191   val remote_builds: List[List[Remote_Build]] =
   191   val remote_builds1: List[List[Remote_Build]] =
   192   {
   192   {
   193     List(
   193     List(
   194       List(Remote_Build("Poly/ML 5.7.1 Linux", "lxbroy8",
   194       List(Remote_Build("Poly/ML 5.7.1 Linux", "lxbroy8",
   195         history_base = "37074e22e8be",
   195         history_base = "37074e22e8be",
   196         options = "-m32 -B -M1x2,2 -t polyml-5.7.1-pre1 -i 'init_component /home/isabelle/contrib/polyml-test-e7a662f8f9c4'",
   196         options = "-m32 -B -M1x2,2 -t polyml-5.7.1-pre1 -i 'init_component /home/isabelle/contrib/polyml-test-e7a662f8f9c4'",
   235             " -e ISABELLE_OCAML=ocaml -e ISABELLE_OCAMLC=ocamlc" +
   235             " -e ISABELLE_OCAML=ocaml -e ISABELLE_OCAMLC=ocamlc" +
   236             " -e ISABELLE_GHC=/usr/local/ghc-8.0.2/bin/ghc" +
   236             " -e ISABELLE_GHC=/usr/local/ghc-8.0.2/bin/ghc" +
   237             " -e ISABELLE_SMLNJ=/usr/local/smlnj-110.81/bin/sml",
   237             " -e ISABELLE_SMLNJ=/usr/local/smlnj-110.81/bin/sml",
   238           args = "-a",
   238           args = "-a",
   239           detect = Build_Log.Settings.ML_PLATFORM + " = " + SQL.string("x86_64-windows"))),
   239           detect = Build_Log.Settings.ML_PLATFORM + " = " + SQL.string("x86_64-windows"))),
   240       List(
       
   241         Remote_Build("AFP slow", "lrzcloud1", shared_home = false,
       
   242           options = "-m64 -M6 -U30000 -s10 -t AFP",
       
   243           args = "-g slow",
       
   244           afp = true,
       
   245           detect = Build_Log.Prop.build_tags + " = " + SQL.string("AFP")))
       
   246     ) :::
   240     ) :::
   247     {
   241     {
   248       for { (host, n) <- List("lxbroy6" -> 1, "lxbroy7" -> 2) }
   242       for { (host, n) <- List("lxbroy6" -> 1, "lxbroy7" -> 2) }
   249       yield {
   243       yield {
   250         List(Remote_Build("AFP " + n, host = host,
   244         List(Remote_Build("AFP " + n, host = host,
   253           afp = true,
   247           afp = true,
   254           detect = Build_Log.Prop.build_tags + " = " + SQL.string("AFP")))
   248           detect = Build_Log.Prop.build_tags + " = " + SQL.string("AFP")))
   255       }
   249       }
   256     }
   250     }
   257   }
   251   }
       
   252 
       
   253   val remote_builds2: List[List[Remote_Build]] =
       
   254     List(
       
   255       List(
       
   256         Remote_Build("AFP slow", "lrzcloud1", shared_home = false,
       
   257           options = "-m64 -M6 -U30000 -s10 -t AFP",
       
   258           args = "-g slow",
       
   259           afp = true,
       
   260           detect = Build_Log.Prop.build_tags + " = " + SQL.string("AFP"))))
   258 
   261 
   259   private def remote_build_history(
   262   private def remote_build_history(
   260     rev: String, afp_rev: Option[String], i: Int, r: Remote_Build): Logger_Task =
   263     rev: String, afp_rev: Option[String], i: Int, r: Remote_Build): Logger_Task =
   261   {
   264   {
   262     val task_name = "build_history-" + r.host
   265     val task_name = "build_history-" + r.host
   289             })
   292             })
   290       })
   293       })
   291   }
   294   }
   292 
   295 
   293   val build_status_profiles: List[Build_Status.Profile] =
   296   val build_status_profiles: List[Build_Status.Profile] =
   294     (remote_builds_old :: remote_builds).flatten.map(_.profile)
   297     (remote_builds_old :: remote_builds1 ::: remote_builds2).flatten.map(_.profile)
   295 
   298 
   296 
   299 
   297 
   300 
   298   /** task logging **/
   301   /** task logging **/
   299 
   302 
   448 
   451 
   449     run(main_start_date,
   452     run(main_start_date,
   450       Logger_Task("isabelle_cronjob", logger =>
   453       Logger_Task("isabelle_cronjob", logger =>
   451         run_now(
   454         run_now(
   452           SEQ(List(build_release, build_history_base,
   455           SEQ(List(build_release, build_history_base,
   453             PAR(remote_builds.map(seq =>
   456             PAR(List(remote_builds1, remote_builds2).map(remote_builds =>
   454               SEQ(
   457               SEQ(List(
   455                 for {
   458                 PAR(remote_builds.map(seq =>
   456                   (r, i) <- (if (seq.length <= 1) seq.map((_, -1)) else seq.zipWithIndex)
   459                   SEQ(
   457                   (isabelle_rev, afp_rev) <- r.pick(logger.options, rev, history_base_filter(r))
   460                     for {
   458                 } yield remote_build_history(isabelle_rev, afp_rev, i, r)))),
   461                       (r, i) <- (if (seq.length <= 1) seq.map((_, -1)) else seq.zipWithIndex)
   459             Logger_Task("jenkins_logs", _ => Jenkins.download_logs(jenkins_jobs, main_dir)),
   462                       (isabelle_rev, afp_rev) <- r.pick(logger.options, rev, history_base_filter(r))
   460             Logger_Task("build_log_database",
   463                     } yield remote_build_history(isabelle_rev, afp_rev, i, r)))),
   461               logger => Isabelle_Devel.build_log_database(logger.options, build_log_dirs)),
   464                 Logger_Task("jenkins_logs", _ => Jenkins.download_logs(jenkins_jobs, main_dir)),
   462             Logger_Task("build_status",
   465                 Logger_Task("build_log_database",
   463               logger => Isabelle_Devel.build_status(logger.options)))))))
   466                   logger => Isabelle_Devel.build_log_database(logger.options, build_log_dirs)),
       
   467                 Logger_Task("build_status",
       
   468                   logger => Isabelle_Devel.build_status(logger.options)))))))))))
   464 
   469 
   465     log_service.shutdown()
   470     log_service.shutdown()
   466 
   471 
   467     main_state_file.file.delete
   472     main_state_file.file.delete
   468   }
   473   }