Skip to content

Commit 91d4fc7

Browse files
committed
Add macos-14 to the nightly workflow
1 parent ecbed4b commit 91d4fc7

File tree

2 files changed

+33
-5
lines changed

2 files changed

+33
-5
lines changed

.github/nightly_matrix.php

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,33 @@ function get_windows_matrix_include(array $branches) {
9191
return $jobs;
9292
}
9393

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+
94121
function get_current_version(): array {
95122
$file = dirname(__DIR__) . '/main/php_version.h';
96123
$content = file_get_contents($file);
@@ -114,9 +141,11 @@ function get_current_version(): array {
114141
: [['name' => strtoupper($branch), 'ref' => $branch, 'version' => get_current_version()]];
115142
$matrix_include = get_matrix_include($branches);
116143
$windows_matrix_include = get_windows_matrix_include($branches);
144+
$macos_matrix_include = get_macos_matrix_include($branches);
117145

118146
$f = fopen(getenv('GITHUB_OUTPUT'), 'a');
119147
fwrite($f, 'branches=' . json_encode($branches, JSON_UNESCAPED_SLASHES) . "\n");
120148
fwrite($f, 'matrix-include=' . json_encode($matrix_include, JSON_UNESCAPED_SLASHES) . "\n");
121149
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");
122151
fclose($f);

.github/workflows/nightly.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ jobs:
1414
branches: ${{ steps.set-matrix.outputs.branches }}
1515
matrix-include: ${{ steps.set-matrix.outputs.matrix-include }}
1616
windows-matrix-include: ${{ steps.set-matrix.outputs.windows-matrix-include }}
17+
macos-matrix-include: ${{ steps.set-matrix.outputs.macos-matrix-include }}
1718
steps:
1819
- uses: actions/checkout@v4
1920
with:
@@ -230,11 +231,9 @@ jobs:
230231
strategy:
231232
fail-fast: false
232233
matrix:
233-
branch: ${{ fromJson(needs.GENERATE_MATRIX.outputs.branches) }}
234-
debug: [true, false]
235-
zts: [true, false]
236-
name: "${{ matrix.branch.name }}_MACOS_${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}"
237-
runs-on: macos-${{ matrix.branch.version.minor >= 4 && '13' || '12' }}
234+
include: ${{ fromJson(needs.GENERATE_MATRIX.outputs.macos-matrix-include) }}
235+
name: "${{ matrix.branch.name }}_MACOS_${{ matrix.arch }}_${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}"
236+
runs-on: macos-${{ matrix.os }}
238237
steps:
239238
- name: git checkout
240239
uses: actions/checkout@v4

0 commit comments

Comments
 (0)