mirror of
https://github.com/php/php-src.git
synced 2024-09-21 09:57:23 +00:00
Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1: Use per-branch matrix for windows nightly
This commit is contained in:
commit
e11b55d219
21
.github/nightly_matrix.php
vendored
21
.github/nightly_matrix.php
vendored
@ -78,6 +78,25 @@ function get_matrix_include(array $branches) {
|
||||
return $jobs;
|
||||
}
|
||||
|
||||
function get_windows_matrix_include(array $branches) {
|
||||
$jobs = [];
|
||||
foreach ($branches as $branch) {
|
||||
$jobs[] = [
|
||||
'branch' => $branch,
|
||||
'x64' => true,
|
||||
'zts' => true,
|
||||
'opcache' => true,
|
||||
];
|
||||
$jobs[] = [
|
||||
'branch' => $branch,
|
||||
'x64' => false,
|
||||
'zts' => false,
|
||||
'opcache' => false,
|
||||
];
|
||||
}
|
||||
return $jobs;
|
||||
}
|
||||
|
||||
$trigger = $argv[1] ?? 'schedule';
|
||||
$attempt = (int) ($argv[2] ?? 1);
|
||||
$discard_cache = ($trigger === 'schedule' && $attempt !== 1) || $trigger === 'workflow_dispatch';
|
||||
@ -87,6 +106,8 @@ if ($discard_cache) {
|
||||
|
||||
$branches = get_branches();
|
||||
$matrix_include = get_matrix_include($branches);
|
||||
$windows_matrix_include = get_windows_matrix_include($branches);
|
||||
|
||||
echo '::set-output name=branches::' . json_encode($branches, JSON_UNESCAPED_SLASHES) . "\n";
|
||||
echo '::set-output name=matrix-include::' . json_encode($matrix_include, JSON_UNESCAPED_SLASHES) . "\n";
|
||||
echo '::set-output name=windows-matrix-include::' . json_encode($windows_matrix_include, JSON_UNESCAPED_SLASHES) . "\n";
|
||||
|
15
.github/workflows/nightly.yml
vendored
15
.github/workflows/nightly.yml
vendored
@ -11,6 +11,7 @@ jobs:
|
||||
outputs:
|
||||
branches: ${{ steps.set-matrix.outputs.branches }}
|
||||
matrix-include: ${{ steps.set-matrix.outputs.matrix-include }}
|
||||
windows-matrix-include: ${{ steps.set-matrix.outputs.windows-matrix-include }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
@ -655,17 +656,13 @@ jobs:
|
||||
with:
|
||||
token: ${{ secrets.ACTION_MONITORING_SLACK }}
|
||||
WINDOWS:
|
||||
needs: GENERATE_MATRIX
|
||||
if: ${{ needs.GENERATE_MATRIX.outputs.branches != '[]' }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- x64: true
|
||||
zts: true
|
||||
opcache: true
|
||||
- x64: false
|
||||
zts: false
|
||||
opcache: false
|
||||
name: "WINDOWS_${{ matrix.x64 && 'X64' || 'X86' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}"
|
||||
include: ${{ fromJson(needs.GENERATE_MATRIX.outputs.windows-matrix-include) }}
|
||||
name: "${{ matrix.branch.name }}_WINDOWS_${{ matrix.x64 && 'X64' || 'X86' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}"
|
||||
runs-on: windows-2019
|
||||
env:
|
||||
PHP_BUILD_CACHE_BASE_DIR: C:\build-cache
|
||||
@ -683,6 +680,8 @@ jobs:
|
||||
run: git config --global core.autocrlf false && git config --global core.eol lf
|
||||
- name: git checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
ref: ${{ matrix.branch.ref }}
|
||||
- name: Setup
|
||||
uses: ./.github/actions/setup-windows
|
||||
- name: Build
|
||||
|
Loading…
Reference in New Issue
Block a user