forked from vmware/differential-datalog
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
248 lines (213 loc) · 7.03 KB
/
.gitlab-ci.yml
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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
default:
image: ddlog/gitlab-ci:latest
variables:
# Controls differential dataflow's eager compaction behavior
DIFFERENTIAL_EAGER_MERGE: 100000
# Some of our tests assume certain functionality to be available in
# the CI pipeline (and will fail if that is not the case). This
# variable is how this information is conveyed. Note that GitLab
# already provides similar variables (e.g., `CI`; see
# https://docs.gitlab.com/ee/ci/variables/predefined_variables.html)
# but we opted to have our own, in order to not depend on
# potentially changing GitLab behavior as well as to achieve some
# form of independence of the underlying CI pipeline.
IS_CI_RUN: 1
# Template for tests that expect ddlog to be in the $PATH.
.install-ddlog:
before_script:
- stack install
# Test Rust template only.
test-rust:
variables:
ZOOKEEPER_ENDPOINTS: "127.0.0.1:2181"
script:
- /usr/share/zookeeper/bin/zkServer.sh start
- (cd rust/template/ && cargo fmt --all -- --check)
- (cd lib && rustfmt *.rs --check)
- (cd rust/template/ && cargo clippy --all -- -D warnings)
- for i in $(seq 100); do
/usr/share/zookeeper/bin/zkServer.sh status && break;
done
- (cd rust/template/ && cargo test --all)
- (cd rust/template/distributed_datalog && (
i=0;
true;
while [ $? -eq 0 -a $i -lt 100 ]; do
i=$((i+1));
cargo test -- tcp_channel::;
done
))
# Run individual stack-based tests, when possible combining them with Java tests
# that depend on the same DDlog program.
test-tutorial:
script: stack --no-terminal test --ta "-p tutorial"
# Test individual libraries
test-libs:
extends: .install-ddlog
script:
- (cd test/datalog_tests &&
./test-libs.sh)
test-server_api:
script:
# The NF variable is defined by the Haskell tasty package, documented here:
# http://hackage.haskell.org/package/tasty
- stack --no-terminal test --ta '-p "$(NF) == \"generate server_api\" || ($(NF-1) == \"compiler tests\" && $(NF) == \"server_api\")"';
- cd test/datalog_tests/server_api/;
i=0;
true;
while [ $? -eq 0 -a $i -lt 100 ]; do
i=$((i+1));
RUST_LOG=trace cargo test;
done
test-simple:
tags:
- ddlog-ci-1
script:
- stack --no-terminal test --ta '-p "$(NF) == \"generate simple\" || ($(NF-1) == \"compiler tests\" && $(NF) == \"simple\")"'
- cd test/datalog_tests/simple_ddlog/ && LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/ cargo build --features='profile'
test-simple2:
script:
- (cd test/datalog_tests && ./run-test.sh simple2 release)
test-modules:
script: stack --no-terminal test --ta "-p modules"
test-ovn-ftl:
script: stack --no-terminal test --ta "-p ovn_ftl"
test-ovn:
script: stack test --ta '-p "$(NF) == \"generate ovn\" || ($(NF-1) == \"compiler tests\" && $(NF) == \"ovn\")"'
test-path:
script:
- stack --no-terminal test --ta "-p fail"
- stack --no-terminal test --ta "-p path"
test-souffle0:
extends: .install-ddlog
tags:
- ddlog-ci-1
script:
- (cd test/souffle0 &&
../../tools/souffle_converter.py test.dl souffle --convert-dnf &&
../datalog_tests/run-test.sh souffle.dl release)
test-redist:
extends: .install-ddlog
tags:
- ddlog-ci-1
script:
- STACK_CARGO_FLAGS='--release' stack test --ta '-p "$(NF) == \"generate redist\" || ($(NF-1) == \"compiler tests\" && $(NF) == \"redist\")"'
- (cd java/test1 && ./run.sh)
- (cd java/test_flatbuf && ./run.sh)
test-span_string:
extends: .install-ddlog
script:
- stack --no-terminal test --ta "-p span_string"
- (cd java/test3 && ./run.sh)
test-output-internal:
script: ./test/datalog_tests/run-tests.sh three
# All other Java tests.
test-span_uuid:
extends: .install-ddlog
script:
- stack --no-terminal test --ta "-p span_uuid"
- (cd java/test && ./run.sh)
test-java1:
extends: .install-ddlog
script:
- (cd java/test2 && ./run.sh)
- (cd java/test4 && ./run.sh)
# these tests are currently failing (#372)
#test-java2:
# extends: .install-ddlog
# script:
# - (cd java/test5 && ./run.sh)
# - (cd java/test6 && ./run.sh)
test-flatbuf:
extends: .install-ddlog
tags:
- ddlog-ci-1
script:
- (cd java/test_flatbuf1 && ./run.sh)
# Template for souffle tests
.test-imported-souffle:
extends: .install-ddlog
tags:
- ddlog-ci-1
# Tests from the souffle github repo.
test-imported-souffle-tests1:
extends: .test-imported-souffle
script:
- (cd test && ./run-souffle-tests-in-batches.py 0 24)
test-imported-souffle-tests2:
extends: .test-imported-souffle
script:
- (cd test && ./run-souffle-tests-in-batches.py 25 49)
test-imported-souffle-tests3:
extends: .test-imported-souffle
script:
- (cd test && ./run-souffle-tests-in-batches.py 50 74)
test-imported-souffle-tests4:
extends: .test-imported-souffle
script:
- (cd test && ./run-souffle-tests-in-batches.py 75 99)
test-imported-souffle-tests5:
extends: .test-imported-souffle
script:
- (cd test && ./run-souffle-tests-in-batches.py 100 124)
test-imported-souffle-tests6:
extends: .test-imported-souffle
script:
- (cd test && ./run-souffle-tests-in-batches.py 125 149)
test-imported-souffle-tests7:
extends: .test-imported-souffle
script:
- (cd test && ./run-souffle-tests-in-batches.py 150 175)
# Test DDlog code from the Declarative Cluster Management project
test-dcm:
extends: .install-ddlog
tags:
- ddlog-ci-1
script:
- (cd test/datalog_tests &&
git clone https://github.com/ddlog-dev/dcm-test-data.git &&
./test-dcm.sh)
# Torture-test optimized version of redist
test-redist_opt:
extends: .install-ddlog
tags:
- ddlog-ci-2
script:
- (cd test/datalog_tests &&
git clone https://github.com/ddlog-dev/redist_opt-test-data.git &&
./test-redist_opt.sh)
# Test ovn-northd-ddlog
test-ovn-northd:
extends: .install-ddlog
# Don't use eager merging, as northd tends to perform many small
# transactions, making things slow.
variables: {}
tags:
- ddlog-ci-2
script:
- cd test
- git clone https://github.com/openvswitch/ovs.git
- git clone https://github.com/ryzhyk/ovn.git
- git clone https://github.com/ddlog-dev/ovn-test-data.git
- ./test-ovn.sh
# Test antrea
test-antrea:
extends: .install-ddlog
tags:
- ddlog-ci-1
script:
- cd test/antrea
- git clone https://github.com/ddlog-dev/antrea-test-data.git
- ./test-antrea.sh
# Test the SQL-to-DDlog compiler.
test-sql:
extends: .install-ddlog
script:
- (cd java && make)
- (cd sql && ./install-ddlog-jar.sh && mvn test)
# Test Go bindings
test-golang:
extends: .install-ddlog
script:
- (cd go && ./test.sh)
- (cd go && ./run-example.sh)