author | wenzelm |
Wed, 05 Dec 2018 19:42:40 +0100 | |
changeset 69401 | 7a1b7b737c02 |
parent 68229 | 18c36ac0acaa |
child 69432 | d072f3287ffa |
permissions | -rw-r--r-- |
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 RELEASE_SNAPSHOT = "release_snapshot" |
13 |
val BUILD_LOG_DB = "build_log.db" |
|
14 |
val BUILD_STATUS = "build_status" |
|
67854
8374c80165e1
publish current log file, e.g. for easy error detection;
wenzelm
parents:
66896
diff
changeset
|
15 |
val CRONJOB_LOG = "cronjob-main.log" |
8374c80165e1
publish current log file, e.g. for easy error detection;
wenzelm
parents:
66896
diff
changeset
|
16 |
|
8374c80165e1
publish current log file, e.g. for easy error detection;
wenzelm
parents:
66896
diff
changeset
|
17 |
val root = Path.explode("~/html-data/devel") |
8374c80165e1
publish current log file, e.g. for easy error detection;
wenzelm
parents:
66896
diff
changeset
|
18 |
val cronjob_log = root + Path.basic(CRONJOB_LOG) |
65771 | 19 |
|
20 |
||
21 |
/* index */ |
|
22 |
||
23 |
def make_index() |
|
24 |
{ |
|
25 |
val header = "Isabelle Development Resources" |
|
65770 | 26 |
|
65838 | 27 |
HTML.write_document(root, "index.html", |
28 |
List(HTML.title(header)), |
|
29 |
List(HTML.chapter(header), |
|
30 |
HTML.itemize( |
|
31 |
List( |
|
32 |
HTML.text("Isabelle nightly ") ::: |
|
33 |
List(HTML.link(RELEASE_SNAPSHOT, HTML.text("release snapshot"))) ::: |
|
34 |
HTML.text(" (for all platforms)"), |
|
65770 | 35 |
|
68229 | 36 |
HTML.text("Cronjob ") ::: List(HTML.link(CRONJOB_LOG, HTML.text("log file"))), |
37 |
||
65838 | 38 |
HTML.text("Isabelle ") ::: |
39 |
List(HTML.link(BUILD_STATUS + "/index.html", HTML.text("build status"))) ::: |
|
40 |
HTML.text(" information"), |
|
65771 | 41 |
|
65838 | 42 |
HTML.text("Database with recent ") ::: |
43 |
List(HTML.link(BUILD_LOG_DB, HTML.text("build log"))) ::: |
|
44 |
HTML.text(" information (e.g. for ") ::: |
|
68224 | 45 |
List(HTML.link("https://sqlitebrowser.org", |
65838 | 46 |
List(HTML.code(HTML.text("sqlitebrowser"))))) ::: |
68229 | 47 |
HTML.text(")"))))) |
65771 | 48 |
} |
65770 | 49 |
|
50 |
||
51 |
/* release snapshot */ |
|
52 |
||
53 |
def release_snapshot( |
|
69401
7a1b7b737c02
eliminated old makedist_bundle and remote_dmg: build_release does everything in Scala;
wenzelm
parents:
68229
diff
changeset
|
54 |
options: Options, |
65770 | 55 |
rev: String = "", |
56 |
afp_rev: String = "", |
|
57 |
parallel_jobs: Int = 1, |
|
58 |
remote_mac: String = "") |
|
59 |
{ |
|
60 |
Isabelle_System.with_tmp_dir("isadist")(base_dir => |
|
61 |
{ |
|
65793 | 62 |
Isabelle_System.update_directory(root + Path.explode(RELEASE_SNAPSHOT), |
63 |
website_dir => |
|
69401
7a1b7b737c02
eliminated old makedist_bundle and remote_dmg: build_release does everything in Scala;
wenzelm
parents:
68229
diff
changeset
|
64 |
Build_Release.build_release(base_dir, options, rev = rev, afp_rev = afp_rev, |
65793 | 65 |
parallel_jobs = parallel_jobs, remote_mac = remote_mac, website = Some(website_dir))) |
65770 | 66 |
}) |
67 |
} |
|
68 |
||
69 |
||
70 |
/* maintain build_log database */ |
|
71 |
||
66896 | 72 |
def build_log_database(options: Options, log_dirs: List[Path]) |
65770 | 73 |
{ |
74 |
val store = Build_Log.store(options) |
|
75 |
using(store.open_database())(db => |
|
76 |
{ |
|
66047
3e8a897042d9
more robust: store important meta info before potential failure;
wenzelm
parents:
65854
diff
changeset
|
77 |
store.update_database(db, log_dirs) |
65770 | 78 |
store.update_database(db, log_dirs, ml_statistics = true) |
65771 | 79 |
store.snapshot_database(db, root + Path.explode(BUILD_LOG_DB)) |
65770 | 80 |
}) |
81 |
} |
|
65793 | 82 |
|
83 |
||
84 |
/* present build status */ |
|
85 |
||
86 |
def build_status(options: Options) |
|
87 |
{ |
|
88 |
Isabelle_System.update_directory(root + Path.explode(BUILD_STATUS), |
|
65854 | 89 |
dir => Build_Status.build_status(options, target_dir = dir, ml_statistics = true)) |
65793 | 90 |
} |
65770 | 91 |
} |