File tree Expand file tree Collapse file tree 2 files changed +28
-8
lines changed Expand file tree Collapse file tree 2 files changed +28
-8
lines changed Original file line number Diff line number Diff line change @@ -78,6 +78,25 @@ function get_matrix_include(array $branches) {
78
78
return $ jobs ;
79
79
}
80
80
81
+ function get_windows_matrix_include (array $ branches ) {
82
+ $ jobs = [];
83
+ foreach ($ branches as $ branch ) {
84
+ $ jobs [] = [
85
+ 'branch ' => $ branch ,
86
+ 'x64 ' => true ,
87
+ 'zts ' => true ,
88
+ 'opcache ' => true ,
89
+ ];
90
+ $ jobs [] = [
91
+ 'branch ' => $ branch ,
92
+ 'x64 ' => false ,
93
+ 'zts ' => false ,
94
+ 'opcache ' => false ,
95
+ ];
96
+ }
97
+ return $ jobs ;
98
+ }
99
+
81
100
$ trigger = $ argv [1 ] ?? 'schedule ' ;
82
101
$ attempt = (int ) ($ argv [2 ] ?? 1 );
83
102
$ discard_cache = ($ trigger === 'schedule ' && $ attempt !== 1 ) || $ trigger === 'workflow_dispatch ' ;
@@ -87,6 +106,8 @@ function get_matrix_include(array $branches) {
87
106
88
107
$ branches = get_branches ();
89
108
$ matrix_include = get_matrix_include ($ branches );
109
+ $ windows_matrix_include = get_windows_matrix_include ($ branches );
90
110
91
111
echo '::set-output name=branches:: ' . json_encode ($ branches , JSON_UNESCAPED_SLASHES ) . "\n" ;
92
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" ;
Original file line number Diff line number Diff line change 11
11
outputs :
12
12
branches : ${{ steps.set-matrix.outputs.branches }}
13
13
matrix-include : ${{ steps.set-matrix.outputs.matrix-include }}
14
+ windows-matrix-include : ${{ steps.set-matrix.outputs.windows-matrix-include }}
14
15
steps :
15
16
- uses : actions/checkout@v3
16
17
with :
@@ -655,17 +656,13 @@ jobs:
655
656
with :
656
657
token : ${{ secrets.ACTION_MONITORING_SLACK }}
657
658
WINDOWS :
659
+ needs : GENERATE_MATRIX
660
+ if : ${{ needs.GENERATE_MATRIX.outputs.branches != '[]' }}
658
661
strategy :
659
662
fail-fast : false
660
663
matrix :
661
- include :
662
- - x64 : true
663
- zts : true
664
- opcache : true
665
- - x64 : false
666
- zts : false
667
- opcache : false
668
- name : " WINDOWS_${{ matrix.x64 && 'X64' || 'X86' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}"
664
+ include : ${{ fromJson(needs.GENERATE_MATRIX.outputs.windows-matrix-include) }}
665
+ name : " ${{ matrix.branch.name }}_WINDOWS_${{ matrix.x64 && 'X64' || 'X86' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}"
669
666
runs-on : windows-2019
670
667
env :
671
668
PHP_BUILD_CACHE_BASE_DIR : C:\build-cache
@@ -683,6 +680,8 @@ jobs:
683
680
run : git config --global core.autocrlf false && git config --global core.eol lf
684
681
- name : git checkout
685
682
uses : actions/checkout@v3
683
+ with :
684
+ ref : ${{ matrix.branch.ref }}
686
685
- name : Setup
687
686
uses : ./.github/actions/setup-windows
688
687
- name : Build
You can’t perform that action at this time.
0 commit comments