@@ -13,14 +13,15 @@ function get_branches() {
13
13
});
14
14
}
15
15
16
- function get_matrix ( ) {
16
+ function get_test_matrix ( $ branches ) {
17
17
$ result = [];
18
18
19
- foreach (get_branches () as $ branch ) {
19
+ foreach ($ branches as $ branch ) {
20
+ $ branch_key = strtoupper (str_replace ('. ' , '' , $ branch ));
21
+
20
22
foreach (ARCHES as $ arch ) {
21
23
foreach ([true , false ] as $ debug ) {
22
24
foreach ([true , false ] as $ zts ) {
23
- $ branch_key = strtoupper (str_replace ('. ' , '' , $ branch ));
24
25
$ arch_key = strtoupper ($ arch );
25
26
$ debug_key = $ debug ? 'DEBUG ' : 'RELEASE ' ;
26
27
$ zts_key = $ zts ? 'ZTS ' : 'NTS ' ;
@@ -39,9 +40,46 @@ function get_matrix() {
39
40
}
40
41
}
41
42
}
43
+
44
+ $ result [] = [
45
+ 'name ' => $ branch_key . '_LINUX_X64_DEBUG_ZTS_ASAN_UBSAN ' ,
46
+ 'branch ' => $ branch ,
47
+ 'arch ' => 'linux-x64 ' ,
48
+ 'configurationParameters ' => '--enable-debug --enable-zts --enable-address-sanitizer --enable-undefined-sanitizer ' ,
49
+ 'runTestsParameters ' => '--asan ' ,
50
+ ];
51
+
52
+ $ result [] = [
53
+ 'name ' => $ branch_key . '_LINUX_X64_DEBUG_NTS_REPEAT ' ,
54
+ 'branch ' => $ branch ,
55
+ 'arch ' => 'linux-x64 ' ,
56
+ 'configurationParameters ' => '--enable-debug --disable-zts ' ,
57
+ 'runTestsParameters ' => '--repeat 2 ' ,
58
+ ];
59
+
60
+ $ result [] = [
61
+ 'name ' => $ branch_key . '_LINUX_X64_VARIATION_DEBUG_ZTS ' ,
62
+ 'branch ' => $ branch ,
63
+ 'arch ' => 'linux-x64 ' ,
64
+ 'configurationParameters ' => '--enable-debug --enable-zts CFLAGS="-DZEND_RC_DEBUG=1 -DPROFITABILITY_CHECKS=0 -DZEND_VERIFY_FUNC_INFO=1" ' ,
65
+ ];
42
66
}
43
67
44
68
return ['include ' => $ result ];
45
69
}
46
70
47
- echo '::set-output name=matrix:: ' . json_encode (get_matrix (), JSON_UNESCAPED_SLASHES ) . "\n" ;
71
+ function get_branch_matrix ($ branches ) {
72
+ $ result = array_map (function ($ branch ) {
73
+ $ branch_key = strtoupper (str_replace ('. ' , '' , $ branch ));
74
+ return [
75
+ 'name ' => $ branch_key ,
76
+ 'branch ' => $ branch ,
77
+ ];
78
+ }, $ branches );
79
+
80
+ return ['branches ' => $ result ];
81
+ }
82
+
83
+ $ branches = get_branches ();
84
+ echo '::set-output name=branch_matrix:: ' . json_encode (get_branch_matrix ($ branches ), JSON_UNESCAPED_SLASHES ) . "\n" ;
85
+ echo '::set-output name=test_matrix:: ' . json_encode (get_test_matrix ($ branches ), JSON_UNESCAPED_SLASHES ) . "\n" ;
0 commit comments