-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathloop.rb
134 lines (129 loc) · 2.84 KB
/
loop.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
# An infinite loop to run all the benches.
ocaml = ARGV[0]
repositories = ["released", "extra-dev"]
coqs = {
"released" => [
"8.3",
"8.4pl1",
"8.4pl2",
"8.4pl4",
"8.4.5",
"8.4.6~camlp4",
"8.4.6",
"8.5.0~camlp4",
"8.5.0",
"8.5.1",
"8.5.2~camlp4",
"8.5.2",
"8.5.3",
"8.6",
"8.6.1",
"8.7.0",
"8.7.1",
"8.7.1+1",
"8.7.1+2",
"8.7.2",
"8.8.0",
"8.8.1",
"8.8.2",
"8.9.0",
"8.9.1",
"8.10.0",
"8.10.1",
"8.10.2",
"8.11.0",
"8.11.1",
"8.11.2",
"8.12.0",
"8.12.1",
"8.12.2",
"8.13.0",
"8.13.1",
"8.13.2",
"8.14.0",
"8.14.1",
"8.15.0",
"8.15.1",
"8.15.2",
"8.16.0",
"8.16.1",
"8.17.0",
"8.17.1",
"8.18.0",
# future versions
"8.18.1",
"8.18.2",
"8.19.0",
"8.19.1",
"8.19.2",
"8.20.0",
"8.20.1",
"8.20.2",
"8.21.0",
"8.21.1",
"8.21.2",
"8.22.0",
"8.22.1",
"8.22.2"
],
"extra-dev" => [
# "8.0.dev",
# "8.1.dev",
# "8.2.dev",
# "8.3.dev",
# "8.4.dev",
# "8.5.dev",
# "8.6.dev",
# "8.7.dev",
# "8.8.dev",
# "8.9.dev",
# "8.10.0",
# "8.10.dev",
# "8.11.dev",
"dev"
]
}
configurations = []
for repository in repositories do
for coq in coqs[repository] do
configurations << {coq: coq, repository: repository}
end
end
configurations.shuffle!
while true do
for configuration in configurations do
mode = :clean
coq = configuration[:coq]
repository = configuration[:repository]
# Initialize OPAM.
system("rm -Rf ~/.opam*")
system("opam init -n")
Process.waitall
# Create an OCaml switch with the same version as the system, to have a fresh and official install.
system("opam switch create ocaml-base-compiler.#{ocaml}")
# Add the repositories.
system("rm -Rf opam-coq-archive && git clone https://github.com/coq/opam-coq-archive.git")
# We do not enable the core-dev repository for stable packages to check that packages can be installed
# with at least one stable version of Coq.
if repository != "released" then
system("opam repo add core-dev opam-coq-archive/core-dev")
end
# Install Coq.
Process.waitall
if system("opam install -y coq.#{coq}") then
# We remove back the `released` repository.
system("opam repo remove released")
# Run the bench.
system("ruby #{mode}.rb #{repository} ../database/#{mode}")
Process.waitall
# Update the HTML.
system("cd ../make-html && git pull")
system("cd ../make-html/html && git pull")
system("cd ../make-html && ruby make_html.rb ../database html")
system("cd ../make-html/html && git add .;
git commit -m \"Coq #{coq}, repo #{repository}, mode #{mode}.\";
git push")
end
Process.waitall
end
end