65770
|
1 |
/* Title: Pure/Admin/isabelle_devel.scala
|
|
2 |
Author: Makarius
|
|
3 |
|
|
4 |
Website for Isabelle development resources.
|
|
5 |
*/
|
|
6 |
|
|
7 |
package isabelle
|
|
8 |
|
|
9 |
|
|
10 |
object Isabelle_Devel
|
|
11 |
{
|
65771
|
12 |
val root = Path.explode("~/html-data/devel")
|
|
13 |
|
|
14 |
val RELEASE_SNAPSHOT = "release_snapshot"
|
|
15 |
val BUILD_LOG_DB = "build_log.db"
|
|
16 |
val BUILD_STATUS = "build_status"
|
|
17 |
|
|
18 |
val standard_log_dirs =
|
|
19 |
List(Path.explode("~/log"), Path.explode("~/afp/log"), Path.explode("~/cronjob/log"))
|
|
20 |
|
|
21 |
|
|
22 |
/* index */
|
|
23 |
|
|
24 |
def make_index()
|
|
25 |
{
|
|
26 |
val header = "Isabelle Development Resources"
|
65770
|
27 |
|
65771
|
28 |
Isabelle_System.mkdirs(root)
|
|
29 |
File.write(root + Path.explode("index.html"),
|
|
30 |
HTML.output_document(
|
|
31 |
List(HTML.title(header)),
|
|
32 |
List(HTML.chapter(header),
|
|
33 |
HTML.itemize(
|
|
34 |
List(
|
|
35 |
HTML.text("Isabelle nightly ") :::
|
|
36 |
List(HTML.link(RELEASE_SNAPSHOT, HTML.text("release snapshot"))) :::
|
|
37 |
HTML.text(" (for all platforms)"),
|
65770
|
38 |
|
65771
|
39 |
HTML.text("Isabelle ") :::
|
|
40 |
List(HTML.link(BUILD_STATUS + "/index.html", HTML.text("build status"))) :::
|
|
41 |
HTML.text(" information"),
|
|
42 |
|
|
43 |
HTML.text("Database with recent ") :::
|
|
44 |
List(HTML.link(BUILD_LOG_DB, HTML.text("build log"))) :::
|
|
45 |
HTML.text(" information (e.g. for ") :::
|
|
46 |
List(HTML.link("http://sqlitebrowser.org",
|
|
47 |
List(HTML.code(HTML.text("sqlitebrowser"))))))))))
|
|
48 |
}
|
65770
|
49 |
|
|
50 |
|
|
51 |
/* release snapshot */
|
|
52 |
|
|
53 |
def release_snapshot(
|
|
54 |
rev: String = "",
|
|
55 |
afp_rev: String = "",
|
|
56 |
parallel_jobs: Int = 1,
|
|
57 |
remote_mac: String = "")
|
|
58 |
{
|
|
59 |
Isabelle_System.with_tmp_dir("isadist")(base_dir =>
|
|
60 |
{
|
65793
|
61 |
Isabelle_System.update_directory(root + Path.explode(RELEASE_SNAPSHOT),
|
|
62 |
website_dir =>
|
|
63 |
Build_Release.build_release(base_dir, rev = rev, afp_rev = afp_rev,
|
|
64 |
parallel_jobs = parallel_jobs, remote_mac = remote_mac, website = Some(website_dir)))
|
65770
|
65 |
})
|
|
66 |
}
|
|
67 |
|
|
68 |
|
|
69 |
/* maintain build_log database */
|
|
70 |
|
65771
|
71 |
def build_log_database(options: Options, log_dirs: List[Path] = standard_log_dirs)
|
65770
|
72 |
{
|
|
73 |
val store = Build_Log.store(options)
|
|
74 |
using(store.open_database())(db =>
|
|
75 |
{
|
|
76 |
store.update_database(db, log_dirs, ml_statistics = true)
|
65771
|
77 |
store.snapshot_database(db, root + Path.explode(BUILD_LOG_DB))
|
65770
|
78 |
})
|
|
79 |
}
|
65793
|
80 |
|
|
81 |
|
|
82 |
/* present build status */
|
|
83 |
|
|
84 |
def build_status(options: Options)
|
|
85 |
{
|
|
86 |
Isabelle_System.update_directory(root + Path.explode(BUILD_STATUS),
|
|
87 |
dir => Build_Status.build_status(options, target_dir = dir))
|
|
88 |
}
|
65770
|
89 |
}
|