@@ -97,6 +97,33 @@ function get_windows_matrix_include(array $branches) {
97
97
return $ jobs ;
98
98
}
99
99
100
+ function get_macos_matrix_include (array $ branches ) {
101
+ $ jobs = [];
102
+ foreach ($ branches as $ branch ) {
103
+ foreach ([true , false ] as $ debug ) {
104
+ foreach ([true , false ] as $ zts ) {
105
+ $ jobs [] = [
106
+ 'branch ' => $ branch ,
107
+ 'debug ' => $ debug ,
108
+ 'zts ' => $ zts ,
109
+ 'os ' => $ branch === 'master ' ? '13 ' : '12 ' ,
110
+ 'arch ' => 'X32 ' ,
111
+ ];
112
+ if ($ branch ['name ' ] === 'master ' ) {
113
+ $ jobs [] = [
114
+ 'branch ' => $ branch ,
115
+ 'debug ' => $ debug ,
116
+ 'zts ' => $ zts ,
117
+ 'os ' => '14 ' ,
118
+ 'arch ' => 'ARM64 ' ,
119
+ ];
120
+ }
121
+ }
122
+ }
123
+ }
124
+ return $ jobs ;
125
+ }
126
+
100
127
$ trigger = $ argv [1 ] ?? 'schedule ' ;
101
128
$ attempt = (int ) ($ argv [2 ] ?? 1 );
102
129
$ discard_cache = ($ trigger === 'schedule ' && $ attempt !== 1 ) || $ trigger === 'workflow_dispatch ' ;
@@ -107,7 +134,11 @@ function get_windows_matrix_include(array $branches) {
107
134
$ branches = get_branches ();
108
135
$ matrix_include = get_matrix_include ($ branches );
109
136
$ windows_matrix_include = get_windows_matrix_include ($ branches );
137
+ $ macos_matrix_include = get_macos_matrix_include ($ branches );
110
138
111
- echo '::set-output name=branches:: ' . json_encode ($ branches , JSON_UNESCAPED_SLASHES ) . "\n" ;
112
- echo '::set-output name=matrix-include:: ' . json_encode ($ matrix_include , JSON_UNESCAPED_SLASHES ) . "\n" ;
113
- echo '::set-output name=windows-matrix-include:: ' . json_encode ($ windows_matrix_include , JSON_UNESCAPED_SLASHES ) . "\n" ;
139
+ $ f = fopen (getenv ('GITHUB_OUTPUT ' ), 'a ' );
140
+ fwrite ($ f , 'branches= ' . json_encode ($ branches , JSON_UNESCAPED_SLASHES ) . "\n" );
141
+ fwrite ($ f , 'matrix-include= ' . json_encode ($ matrix_include , JSON_UNESCAPED_SLASHES ) . "\n" );
142
+ fwrite ($ f , 'windows-matrix-include= ' . json_encode ($ windows_matrix_include , JSON_UNESCAPED_SLASHES ) . "\n" );
143
+ fwrite ($ f , 'macos-matrix-include= ' . json_encode ($ macos_matrix_include , JSON_UNESCAPED_SLASHES ) . "\n" );
144
+ fclose ($ f );
0 commit comments