• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/usr/bin/env python2.7
2# Copyright 2017 gRPC authors.
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8#     http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15
16# Dictionaries used for client matrix testing.
17
18
19def get_github_repo(lang):
20    return {
21        'dart': 'https://github.com/grpc/grpc-dart.git',
22        'go': 'https://github.com/grpc/grpc-go.git',
23        'java': 'https://github.com/grpc/grpc-java.git',
24        'node': 'https://github.com/grpc/grpc-node.git',
25        # all other languages use the grpc.git repo.
26    }.get(lang, 'https://github.com/grpc/grpc.git')
27
28
29def get_release_tags(lang):
30    return map(lambda r: get_release_tag_name(r), LANG_RELEASE_MATRIX[lang])
31
32
33def get_release_tag_name(release_info):
34    assert len(release_info.keys()) == 1
35    return release_info.keys()[0]
36
37
38def should_build_docker_interop_image_from_release_tag(lang):
39    if lang in ['go', 'java', 'node']:
40        return False
41    return True
42
43
44# Dictionary of runtimes per language
45LANG_RUNTIME_MATRIX = {
46    'cxx': ['cxx'],  # This is actually debian8.
47    'go': ['go1.7', 'go1.8'],
48    'java': ['java_oracle8'],
49    'python': ['python'],
50    'node': ['node'],
51    'ruby': ['ruby'],
52    'php': ['php', 'php7'],
53    'csharp': ['csharp', 'csharpcoreclr'],
54}
55
56# Dictionary of releases per language.  For each language, we need to provide
57# a release tag pointing to the latest build of the branch.
58LANG_RELEASE_MATRIX = {
59    'cxx': [
60        {
61            'v1.0.1': None
62        },
63        {
64            'v1.1.4': None
65        },
66        {
67            'v1.2.5': None
68        },
69        {
70            'v1.3.9': None
71        },
72        {
73            'v1.4.2': None
74        },
75        {
76            'v1.6.6': None
77        },
78        {
79            'v1.7.2': None
80        },
81        {
82            'v1.8.0': None
83        },
84        {
85            'v1.9.1': None
86        },
87        {
88            'v1.10.1': None
89        },
90        {
91            'v1.11.1': None
92        },
93        {
94            'v1.12.0': None
95        },
96        {
97            'v1.13.0': None
98        },
99        {
100            'v1.14.1': None
101        },
102        {
103            'v1.15.0': None
104        },
105    ],
106    'go': [
107        {
108            'v1.0.5': None
109        },
110        {
111            'v1.2.1': None
112        },
113        {
114            'v1.3.0': None
115        },
116        {
117            'v1.4.2': None
118        },
119        {
120            'v1.5.2': None
121        },
122        {
123            'v1.6.0': None
124        },
125        {
126            'v1.7.4': None
127        },
128        {
129            'v1.8.2': None
130        },
131        {
132            'v1.9.2': None
133        },
134        {
135            'v1.10.1': None
136        },
137        {
138            'v1.11.3': None
139        },
140        {
141            'v1.12.0': None
142        },
143    ],
144    'java': [
145        {
146            'v1.0.3': None
147        },
148        {
149            'v1.1.2': None
150        },
151        {
152            'v1.2.0': None
153        },
154        {
155            'v1.3.1': None
156        },
157        {
158            'v1.4.0': None
159        },
160        {
161            'v1.5.0': None
162        },
163        {
164            'v1.6.1': None
165        },
166        {
167            'v1.7.0': None
168        },
169        {
170            'v1.8.0': None
171        },
172        {
173            'v1.9.1': None
174        },
175        {
176            'v1.10.1': None
177        },
178        {
179            'v1.11.0': None
180        },
181        {
182            'v1.12.0': None
183        },
184        {
185            'v1.13.1': None
186        },
187        {
188            'v1.14.0': None
189        },
190        {
191            'v1.15.0': None
192        },
193    ],
194    'python': [
195        {
196            'v1.0.x': None
197        },
198        {
199            'v1.1.4': None
200        },
201        {
202            'v1.2.5': None
203        },
204        {
205            'v1.3.9': None
206        },
207        {
208            'v1.4.2': None
209        },
210        {
211            'v1.6.6': None
212        },
213        {
214            'v1.7.2': None
215        },
216        {
217            'v1.8.1': None  # first python 1.8 release is 1.8.1
218        },
219        {
220            'v1.9.1': None
221        },
222        {
223            'v1.10.1': None
224        },
225        {
226            'v1.11.1': None
227        },
228        {
229            'v1.12.0': None
230        },
231        {
232            'v1.13.0': None
233        },
234        {
235            'v1.14.1': None
236        },
237        {
238            'v1.15.0': None
239        },
240    ],
241    'node': [
242        {
243            'v1.0.1': None
244        },
245        {
246            'v1.1.4': None
247        },
248        {
249            'v1.2.5': None
250        },
251        {
252            'v1.3.9': None
253        },
254        {
255            'v1.4.2': None
256        },
257        {
258            'v1.6.6': None
259        },
260        # TODO: https://github.com/grpc/grpc-node/issues/235.
261        #{
262        #    'v1.7.2': None
263        #},
264        {
265            'v1.8.4': None
266        },
267        {
268            'v1.9.1': None
269        },
270        {
271            'v1.10.0': None
272        },
273        {
274            'v1.11.3': None
275        },
276        {
277            'v1.12.4': None
278        },
279    ],
280    'ruby': [
281        {
282            'v1.0.1': {
283                'patch': [
284                    'tools/dockerfile/interoptest/grpc_interop_ruby/Dockerfile',
285                    'tools/dockerfile/interoptest/grpc_interop_ruby/build_interop.sh',
286                ]
287            }
288        },
289        {
290            'v1.1.4': None
291        },
292        {
293            'v1.2.5': None
294        },
295        {
296            'v1.3.9': None
297        },
298        {
299            'v1.4.2': None
300        },
301        {
302            'v1.6.6': None
303        },
304        {
305            'v1.7.2': None
306        },
307        {
308            'v1.8.0': None
309        },
310        {
311            'v1.9.1': None
312        },
313        {
314            'v1.10.1': None
315        },
316        {
317            'v1.11.1': None
318        },
319        {
320            'v1.12.0': None
321        },
322        {
323            'v1.13.0': None
324        },
325        {
326            'v1.14.1': None
327        },
328        {
329            'v1.15.0': None
330        },
331    ],
332    'php': [
333        {
334            'v1.0.1': None
335        },
336        {
337            'v1.1.4': None
338        },
339        {
340            'v1.2.5': None
341        },
342        {
343            'v1.3.9': None
344        },
345        {
346            'v1.4.2': None
347        },
348        {
349            'v1.6.6': None
350        },
351        {
352            'v1.7.2': None
353        },
354        {
355            'v1.8.0': None
356        },
357        {
358            'v1.9.1': None
359        },
360        {
361            'v1.10.1': None
362        },
363        {
364            'v1.11.1': None
365        },
366        {
367            'v1.12.0': None
368        },
369        {
370            'v1.13.0': None
371        },
372        {
373            'v1.14.1': None
374        },
375        {
376            'v1.15.0': None
377        },
378    ],
379    'csharp': [
380        {
381            'v1.0.1': {
382                'patch': [
383                    'tools/dockerfile/interoptest/grpc_interop_csharp/Dockerfile',
384                    'tools/dockerfile/interoptest/grpc_interop_csharpcoreclr/Dockerfile',
385                ]
386            }
387        },
388        {
389            'v1.1.4': None
390        },
391        {
392            'v1.2.5': None
393        },
394        {
395            'v1.3.9': None
396        },
397        {
398            'v1.4.2': None
399        },
400        {
401            'v1.6.6': None
402        },
403        {
404            'v1.7.2': None
405        },
406        {
407            'v1.8.0': None
408        },
409        {
410            'v1.9.1': None
411        },
412        {
413            'v1.10.1': None
414        },
415        {
416            'v1.11.1': None
417        },
418        {
419            'v1.12.0': None
420        },
421        {
422            'v1.13.0': None
423        },
424        {
425            'v1.14.1': None
426        },
427        {
428            'v1.15.0': None
429        },
430    ],
431}
432
433# This matrix lists the version of testcases to use for a release. As new
434# releases come out, some older docker commands for running tests need to be
435# changed, hence the need for specifying which commands to use for a
436# particular version in some cases. If not specified, xxx__master file will be
437# used. For example, all java versions will run the commands in java__master.
438# The testcases files exist under the testcases directory.
439TESTCASES_VERSION_MATRIX = {
440    'node_v1.0.1': 'node__v1.0.1',
441    'node_v1.1.4': 'node__v1.1.4',
442    'node_v1.2.5': 'node__v1.1.4',
443    'node_v1.3.9': 'node__v1.1.4',
444    'node_v1.4.2': 'node__v1.1.4',
445    'node_v1.6.6': 'node__v1.1.4',
446    'ruby_v1.0.1': 'ruby__v1.0.1',
447    'csharp_v1.0.1': 'csharp__v1.1.4',
448    'csharp_v1.1.4': 'csharp__v1.1.4',
449    'csharp_v1.2.5': 'csharp__v1.1.4',
450    'python_v1.0.x': 'python__v1.0.x',
451    'python_v1.1.4': 'python__v1.0.x',
452    'python_v1.2.5': 'python__v1.0.x',
453    'python_v1.3.9': 'python__v1.0.x',
454    'python_v1.4.2': 'python__v1.0.x',
455    'python_v1.6.6': 'python__v1.0.x',
456    'python_v1.7.2': 'python__v1.0.x',
457    'python_v1.8.1': 'python__v1.0.x',
458    'python_v1.9.1': 'python__v1.0.x',
459    'python_v1.10.1': 'python__v1.0.x',
460}
461