|
1 | 1 | <?php |
2 | 2 |
|
3 | 3 | const BRANCHES = [ |
4 | | - ['ref' => 'master', 'version' => [8, 6]], |
5 | | - ['ref' => 'PHP-8.5', 'version' => [8, 5]], |
6 | | - ['ref' => 'PHP-8.4', 'version' => [8, 4]], |
7 | | - ['ref' => 'PHP-8.3', 'version' => [8, 3]], |
8 | | - ['ref' => 'PHP-8.2', 'version' => [8, 2]], |
| 4 | + ['name' => 'master', 'ref' => 'refs/heads/master', 'version' => [8, 6]], |
| 5 | + ['name' => 'PHP-8.5', 'ref' => 'refs/heads/PHP-8.5', 'version' => [8, 5]], |
| 6 | + ['name' => 'PHP-8.4', 'ref' => 'refs/heads/PHP-8.4', 'version' => [8, 4]], |
| 7 | + ['name' => 'PHP-8.3', 'ref' => 'refs/heads/PHP-8.3', 'version' => [8, 3]], |
| 8 | + ['name' => 'PHP-8.2', 'ref' => 'refs/heads/PHP-8.2', 'version' => [8, 2]], |
9 | 9 | ]; |
10 | 10 |
|
11 | 11 | function get_branch_commit_cache_file_path(): string { |
@@ -81,7 +81,7 @@ function select_jobs($repository, $trigger, $nightly, $labels, $php_version, $re |
81 | 81 | : ['type' => ['asan']]; |
82 | 82 | $jobs['COMMUNITY']['config']['symfony_version'] = version_compare($php_version, '8.4', '>=') ? '8.1' : '7.4'; |
83 | 83 | } |
84 | | - if (($all_jobs && $ref === 'master') || $test_coverage) { |
| 84 | + if (($all_jobs && $ref === 'refs/heads/master') || $test_coverage) { |
85 | 85 | $jobs['COVERAGE'] = true; |
86 | 86 | } |
87 | 87 | if ($all_jobs || $test_libmysqlclient) { |
@@ -129,7 +129,7 @@ function select_jobs($repository, $trigger, $nightly, $labels, $php_version, $re |
129 | 129 | if ($all_jobs || $test_opcache_variation) { |
130 | 130 | $jobs['OPCACHE_VARIATION'] = true; |
131 | 131 | } |
132 | | - if (($all_jobs && $ref === 'master') || $test_pecl) { |
| 132 | + if (($all_jobs && $ref === 'refs/heads/master') || $test_pecl) { |
133 | 133 | $jobs['PECL'] = true; |
134 | 134 | } |
135 | 135 | if ($all_jobs || !$no_jobs || $test_windows) { |
@@ -160,14 +160,14 @@ function select_jobs($repository, $trigger, $nightly, $labels, $php_version, $re |
160 | 160 | if ($discard_cache) { |
161 | 161 | @unlink(get_branch_commit_cache_file_path()); |
162 | 162 | } |
163 | | -$branch = $argv[3] ?? 'master'; |
164 | | -$branches = $branch === 'master' |
| 163 | +$branch = $argv[3] ?? 'refs/heads/master'; |
| 164 | +$nightly = $trigger === 'schedule' || $trigger === 'workflow_dispatch'; |
| 165 | +$branches = $nightly && $branch === 'refs/heads/master' |
165 | 166 | ? get_branches() |
166 | | - : [['ref' => $branch, 'version' => get_current_version()]]; |
| 167 | + : [['name' => 'Suite', 'ref' => $branch, 'version' => get_current_version()]]; |
167 | 168 |
|
168 | 169 | $labels = json_decode($argv[4] ?? '[]', true) ?? []; |
169 | 170 | $labels = array_column($labels, 'name'); |
170 | | -$nightly = $trigger === 'schedule' || $trigger === 'workflow_dispatch'; |
171 | 171 | $all_variations = $nightly || in_array('CI: All variations', $labels, true); |
172 | 172 |
|
173 | 173 | $repository = $argv[5] ?? null; |
|
0 commit comments