Skip to content

Commit acc19fc

Browse files
committed
Add macos-14 to the nightly workflow
1 parent f3c929d commit acc19fc

File tree

2 files changed

+38
-8
lines changed

2 files changed

+38
-8
lines changed

.github/nightly_matrix.php

Lines changed: 34 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,33 @@ function get_windows_matrix_include(array $branches) {
9797
return $jobs;
9898
}
9999

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+
100127
$trigger = $argv[1] ?? 'schedule';
101128
$attempt = (int) ($argv[2] ?? 1);
102129
$discard_cache = ($trigger === 'schedule' && $attempt !== 1) || $trigger === 'workflow_dispatch';
@@ -107,7 +134,11 @@ function get_windows_matrix_include(array $branches) {
107134
$branches = get_branches();
108135
$matrix_include = get_matrix_include($branches);
109136
$windows_matrix_include = get_windows_matrix_include($branches);
137+
$macos_matrix_include = get_macos_matrix_include($branches);
110138

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);

.github/workflows/nightly.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ jobs:
1212
branches: ${{ steps.set-matrix.outputs.branches }}
1313
matrix-include: ${{ steps.set-matrix.outputs.matrix-include }}
1414
windows-matrix-include: ${{ steps.set-matrix.outputs.windows-matrix-include }}
15+
macos-matrix-include: ${{ steps.set-matrix.outputs.macos-matrix-include }}
1516
steps:
1617
- uses: actions/checkout@v4
1718
with:
@@ -200,11 +201,9 @@ jobs:
200201
strategy:
201202
fail-fast: false
202203
matrix:
203-
branch: ${{ fromJson(needs.GENERATE_MATRIX.outputs.branches) }}
204-
debug: [true, false]
205-
zts: [true, false]
206-
name: "${{ matrix.branch.name }}_MACOS_${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}"
207-
runs-on: macos-12
204+
include: ${{ fromJson(needs.GENERATE_MATRIX.outputs.macos-matrix-include) }}
205+
name: "${{ matrix.branch.name }}_MACOS_${{ matrix.arch }}_${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}"
206+
runs-on: macos-${{ matrix.os }}
208207
steps:
209208
- name: git checkout
210209
uses: actions/checkout@v4

0 commit comments

Comments
 (0)