Skip to content

Commit ae7e211

Browse files
committed
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2: Fix nightly job selection Fix ccache in pecl job
2 parents 6b81bfd + cb4ea1d commit ae7e211

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

.github/nightly_matrix.php

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,12 @@ function get_current_version(): array {
4646
return [$major, $minor];
4747
}
4848

49-
function select_jobs($trigger, $labels, $php_version, $ref, $all_variations) {
49+
function select_jobs($nightly, $labels, $php_version, $ref, $all_variations) {
5050
$no_jobs = in_array('CI: No jobs', $labels, true);
51-
$all_jobs = in_array('CI: All jobs', $labels, true);
51+
$all_jobs = in_array('CI: All jobs', $labels, true) || $nightly;
5252
$test_alpine = in_array('CI: Alpine', $labels, true);
5353
$test_community = in_array('CI: Community', $labels, true);
54+
$test_coverage = in_array('CI: COVERAGE', $labels, true);
5455
$test_freebsd = in_array('CI: FreeBSD', $labels, true);
5556
$test_libmysqlclient = in_array('CI: libmysqlclient', $labels, true);
5657
$test_linux_ppc64 = in_array('CI: Linux PPC64', $labels, true);
@@ -59,6 +60,7 @@ function select_jobs($trigger, $labels, $php_version, $ref, $all_variations) {
5960
$test_macos = in_array('CI: macOS', $labels, true);
6061
$test_msan = in_array('CI: MSAN', $labels, true);
6162
$test_opcache_variation = in_array('CI: Opcache Variation', $labels, true);
63+
$test_pecl = in_array('CI: PECL', $labels, true);
6264
$test_windows = in_array('CI: Windows', $labels, true);
6365

6466
$jobs = [];
@@ -71,7 +73,7 @@ function select_jobs($trigger, $labels, $php_version, $ref, $all_variations) {
7173
: ['type' => ['asan']];
7274
$jobs['COMMUNITY']['config']['symfony_version'] = version_compare($php_version, '8.4', '>=') ? '8.1' : '7.4';
7375
}
74-
if ($trigger === 'schedule' && $ref === 'master') {
76+
if (($all_jobs && $ref === 'master') || $test_coverage) {
7577
$jobs['COVERAGE'] = true;
7678
}
7779
if ($all_jobs || $test_libmysqlclient) {
@@ -119,7 +121,7 @@ function select_jobs($trigger, $labels, $php_version, $ref, $all_variations) {
119121
if ($all_jobs || $test_opcache_variation) {
120122
$jobs['OPCACHE_VARIATION'] = true;
121123
}
122-
if ($trigger === 'schedule' && $ref === 'master') {
124+
if (($all_jobs && $ref === 'master') || $test_pecl) {
123125
$jobs['PECL'] = true;
124126
}
125127
if ($all_jobs || !$no_jobs || $test_windows) {
@@ -157,11 +159,12 @@ function select_jobs($trigger, $labels, $php_version, $ref, $all_variations) {
157159

158160
$labels = json_decode($argv[4] ?? '[]', true) ?? [];
159161
$labels = array_column($labels, 'name');
160-
$all_variations = $trigger === 'schedule' || $trigger === 'workflow_dispatch' || in_array('CI: All variations', $labels, true);
162+
$nightly = $trigger === 'schedule' || $trigger === 'workflow_dispatch';
163+
$all_variations = $nightly || in_array('CI: All variations', $labels, true);
161164

162165
foreach ($branches as &$branch) {
163166
$php_version = $branch['version'][0] . '.' . $branch['version'][1];
164-
$branch['jobs'] = select_jobs($trigger, $labels, $php_version, $branch['ref'], $all_variations);
167+
$branch['jobs'] = select_jobs($nightly, $labels, $php_version, $branch['ref'], $all_variations);
165168
$branch['config']['ubuntu_version'] = version_compare($php_version, '8.5', '>=') ? '24.04' : '22.04';
166169
}
167170

.github/workflows/nightly.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -814,6 +814,9 @@ jobs:
814814
with:
815815
path: php
816816
ref: ${{ fromJson(inputs.branch).ref }}
817+
# Used for ccache action
818+
- name: Move .github
819+
run: mv php/.github .
817820
- name: git checkout apcu
818821
uses: actions/checkout@v6
819822
with:

0 commit comments

Comments
 (0)