File tree 2 files changed +28
-8
lines changed
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 :
@@ -646,17 +647,13 @@ jobs:
646
647
with :
647
648
token : ${{ secrets.ACTION_MONITORING_SLACK }}
648
649
WINDOWS :
650
+ needs : GENERATE_MATRIX
651
+ if : ${{ needs.GENERATE_MATRIX.outputs.branches != '[]' }}
649
652
strategy :
650
653
fail-fast : false
651
654
matrix :
652
- include :
653
- - x64 : true
654
- zts : true
655
- opcache : true
656
- - x64 : false
657
- zts : false
658
- opcache : false
659
- name : " WINDOWS_${{ matrix.x64 && 'X64' || 'X86' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}"
655
+ include : ${{ fromJson(needs.GENERATE_MATRIX.outputs.windows-matrix-include) }}
656
+ name : " ${{ matrix.branch.name }}_WINDOWS_${{ matrix.x64 && 'X64' || 'X86' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}"
660
657
runs-on : windows-2019
661
658
env :
662
659
PHP_BUILD_CACHE_BASE_DIR : C:\build-cache
@@ -674,6 +671,8 @@ jobs:
674
671
run : git config --global core.autocrlf false && git config --global core.eol lf
675
672
- name : git checkout
676
673
uses : actions/checkout@v3
674
+ with :
675
+ ref : ${{ matrix.branch.ref }}
677
676
- name : Setup
678
677
uses : ./.github/actions/setup-windows
679
678
- name : Build
You can’t perform that action at this time.
0 commit comments