mirror of
https://github.com/php/php-src.git
synced 2024-09-21 18:07: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;
|
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';
|
$trigger = $argv[1] ?? 'schedule';
|
||||||
$attempt = (int) ($argv[2] ?? 1);
|
$attempt = (int) ($argv[2] ?? 1);
|
||||||
$discard_cache = ($trigger === 'schedule' && $attempt !== 1) || $trigger === 'workflow_dispatch';
|
$discard_cache = ($trigger === 'schedule' && $attempt !== 1) || $trigger === 'workflow_dispatch';
|
||||||
@ -87,6 +106,8 @@ if ($discard_cache) {
|
|||||||
|
|
||||||
$branches = get_branches();
|
$branches = get_branches();
|
||||||
$matrix_include = get_matrix_include($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=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=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:
|
outputs:
|
||||||
branches: ${{ steps.set-matrix.outputs.branches }}
|
branches: ${{ steps.set-matrix.outputs.branches }}
|
||||||
matrix-include: ${{ steps.set-matrix.outputs.matrix-include }}
|
matrix-include: ${{ steps.set-matrix.outputs.matrix-include }}
|
||||||
|
windows-matrix-include: ${{ steps.set-matrix.outputs.windows-matrix-include }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
@ -655,17 +656,13 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
token: ${{ secrets.ACTION_MONITORING_SLACK }}
|
token: ${{ secrets.ACTION_MONITORING_SLACK }}
|
||||||
WINDOWS:
|
WINDOWS:
|
||||||
|
needs: GENERATE_MATRIX
|
||||||
|
if: ${{ needs.GENERATE_MATRIX.outputs.branches != '[]' }}
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include: ${{ fromJson(needs.GENERATE_MATRIX.outputs.windows-matrix-include) }}
|
||||||
- x64: true
|
name: "${{ matrix.branch.name }}_WINDOWS_${{ matrix.x64 && 'X64' || 'X86' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}"
|
||||||
zts: true
|
|
||||||
opcache: true
|
|
||||||
- x64: false
|
|
||||||
zts: false
|
|
||||||
opcache: false
|
|
||||||
name: "WINDOWS_${{ matrix.x64 && 'X64' || 'X86' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}"
|
|
||||||
runs-on: windows-2019
|
runs-on: windows-2019
|
||||||
env:
|
env:
|
||||||
PHP_BUILD_CACHE_BASE_DIR: C:\build-cache
|
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
|
run: git config --global core.autocrlf false && git config --global core.eol lf
|
||||||
- name: git checkout
|
- name: git checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
ref: ${{ matrix.branch.ref }}
|
||||||
- name: Setup
|
- name: Setup
|
||||||
uses: ./.github/actions/setup-windows
|
uses: ./.github/actions/setup-windows
|
||||||
- name: Build
|
- name: Build
|
||||||
|
Loading…
Reference in New Issue
Block a user