@@ -91,6 +91,33 @@ function get_windows_matrix_include(array $branches) {
91
91
return $ jobs ;
92
92
}
93
93
94
+ function get_macos_matrix_include (array $ branches ) {
95
+ $ jobs = [];
96
+ foreach ($ branches as $ branch ) {
97
+ foreach ([true , false ] as $ debug ) {
98
+ foreach ([true , false ] as $ zts ) {
99
+ $ jobs [] = [
100
+ 'branch ' => $ branch ,
101
+ 'debug ' => $ debug ,
102
+ 'zts ' => $ zts ,
103
+ 'os ' => $ branch === 'master ' ? '13 ' : '12 ' ,
104
+ 'arch ' => 'X32 ' ,
105
+ ];
106
+ if ($ branch ['name ' ] === 'master ' ) {
107
+ $ jobs [] = [
108
+ 'branch ' => $ branch ,
109
+ 'debug ' => $ debug ,
110
+ 'zts ' => $ zts ,
111
+ 'os ' => '14 ' ,
112
+ 'arch ' => 'ARM64 ' ,
113
+ ];
114
+ }
115
+ }
116
+ }
117
+ }
118
+ return $ jobs ;
119
+ }
120
+
94
121
function get_current_version (): array {
95
122
$ file = dirname (__DIR__ ) . '/main/php_version.h ' ;
96
123
$ content = file_get_contents ($ file );
@@ -114,9 +141,11 @@ function get_current_version(): array {
114
141
: [['name ' => strtoupper ($ branch ), 'ref ' => $ branch , 'version ' => get_current_version ()]];
115
142
$ matrix_include = get_matrix_include ($ branches );
116
143
$ windows_matrix_include = get_windows_matrix_include ($ branches );
144
+ $ macos_matrix_include = get_macos_matrix_include ($ branches );
117
145
118
146
$ f = fopen (getenv ('GITHUB_OUTPUT ' ), 'a ' );
119
147
fwrite ($ f , 'branches= ' . json_encode ($ branches , JSON_UNESCAPED_SLASHES ) . "\n" );
120
148
fwrite ($ f , 'matrix-include= ' . json_encode ($ matrix_include , JSON_UNESCAPED_SLASHES ) . "\n" );
121
149
fwrite ($ f , 'windows-matrix-include= ' . json_encode ($ windows_matrix_include , JSON_UNESCAPED_SLASHES ) . "\n" );
150
+ fwrite ($ f , 'macos-matrix-include= ' . json_encode ($ macos_matrix_include , JSON_UNESCAPED_SLASHES ) . "\n" );
122
151
fclose ($ f );
0 commit comments