GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — php-src/.github/matrix.php at master · php/php-src Expand file tree/ Copy pathmatrix.phpMore file actions 206 lines (189 loc) · 9.25 KB / Copy pathmatrix.phpFile metadata and controls206 lines (189 loc) · 9.25 KB 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 <?php const BRANCHES = [ ['name' => 'master', 'ref' => 'master', 'version' => [8, 7]], ['name' => 'PHP-8.6', 'ref' => 'PHP-8.6', 'version' => [8, 6]], ['name' => 'PHP-8.5', 'ref' => 'PHP-8.5', 'version' => [8, 5]], ['name' => 'PHP-8.4', 'ref' => 'PHP-8.4', 'version' => [8, 4]], ['name' => 'PHP-8.3', 'ref' => 'PHP-8.3', 'version' => [8, 3]], ['name' => 'PHP-8.2', 'ref' => 'PHP-8.2', 'version' => [8, 2]], ]; function get_branch_commit_cache_file_path(): string { return dirname(__DIR__) . '/branch-commit-cache.json'; } function get_branches() { $branch_commit_cache_file = get_branch_commit_cache_file_path(); $branch_commit_map = []; if (file_exists($branch_commit_cache_file)) { $branch_commit_map = json_decode(file_get_contents($branch_commit_cache_file), JSON_THROW_ON_ERROR); } $changed_branches = []; foreach (BRANCHES as $branch) { $previous_commit_hash = $branch_commit_map[$branch['ref']] ?? null; $current_commit_hash = trim(shell_exec('git rev-parse origin/' . $branch['ref'])); if ($previous_commit_hash !== $current_commit_hash) { $changed_branches[] = $branch; } $branch_commit_map[$branch['ref']] = $current_commit_hash; } file_put_contents($branch_commit_cache_file, json_encode($branch_commit_map)); return $changed_branches; } function get_current_version(): array { $file = dirname(__DIR__) . '/main/php_version.h'; $content = file_get_contents($file); preg_match('(^#define PHP_MAJOR_VERSION (?<num>\d+)$)m', $content, $matches); $major = (int) $matches['num']; preg_match('(^#define PHP_MINOR_VERSION (?<num>\d+)$)m', $content, $matches); $minor = (int) $matches['num']; return [$major, $minor]; } function select_jobs($repository, $trigger, $nightly, $labels, $php_version, $ref, $all_variations) { $no_jobs = in_array('CI: No jobs', $labels, true); $all_jobs = in_array('CI: All jobs', $labels, true) || $nightly; $test_alpine = in_array('CI: Alpine', $labels, true); $test_benchmarking = in_array('CI: Benchmarking', $labels, true); $test_community = in_array('CI: Community', $labels, true); $test_coverage = in_array('CI: Coverage', $labels, true); $test_freebsd = in_array('CI: FreeBSD', $labels, true); $test_libmysqlclient = in_array('CI: libmysqlclient', $labels, true); $test_linux_ppc64 = in_array('CI: Linux PPC64', $labels, true); $test_linux_x32 = in_array('CI: Linux X32', $labels, true); $test_linux_x64 = in_array('CI: Linux X64', $labels, true); $test_macos = in_array('CI: macOS', $labels, true); $test_msan = in_array('CI: MSAN', $labels, true); $test_opcache_variation = in_array('CI: Opcache Variation', $labels, true); $test_solaris = in_array('CI: Solaris', $labels, true); $test_windows = in_array('CI: Windows', $labels, true); $jobs = []; if (version_compare($php_version, '8.4', '>=') && ($all_jobs || !$no_jobs || $test_alpine)) { $jobs['ALPINE'] = true; } if (version_compare($php_version, '8.4', '>=') && !$nightly && ($all_jobs || !$no_jobs || $test_benchmarking) // push trigger is restricted to official repository. && ($repository === 'php/php-src' || $trigger === 'pull_request')) { $jobs['BENCHMARKING'] = true; } if ($all_jobs || $test_community) { $jobs['COMMUNITY']['matrix'] = version_compare($php_version, '8.4', '>=') ? ['type' => ['asan', 'verify_type_inference']] : ['type' => ['asan']]; $jobs['COMMUNITY']['config']['symfony_version'] = match (true) { version_compare($php_version, '8.3', '<=') => '7.4', default => '', }; $jobs['COMMUNITY']['config']['laravel_version'] = match (true) { version_compare($php_version, '8.2', '<=') => '12.x', default => '', }; } if (($all_jobs && $ref === 'master') || $test_coverage) { $jobs['COVERAGE'] = true; } if ($all_jobs || $test_libmysqlclient) { $jobs['LIBMYSQLCLIENT'] = true; } if (version_compare($php_version, '8.4', '>=') && ($all_jobs || $test_linux_ppc64)) { $jobs['LINUX_PPC64'] = true; } if ($all_jobs || !$no_jobs || $test_linux_x64) { $jobs['LINUX_X64']['matrix'] = $all_variations ? [ 'name' => [''], 'asan' => [false], 'debug' => [true, false], 'repeat' => [false], 'variation' => [false], 'zts' => [true, false], 'include' => [ ['name' => '_ASAN', 'asan' => true, 'debug' => true, 'repeat' => false, 'variation' => false, 'zts' => true], ['name' => '_REPEAT', 'asan' => false, 'debug' => true, 'repeat' => true, 'variation' => false, 'zts' => false], ['name' => '_VARIATION', 'asan' => false, 'debug' => true, 'repeat' => false, 'variation' => true, 'zts' => true], ], ] : ['include' => [ ['name' => '', 'asan' => false, 'debug' => false, 'repeat' => false, 'variation' => false, 'zts' => false], ['name' => '_ASAN', 'asan' => true, 'debug' => true, 'repeat' => false, 'variation' => false, 'zts' => true], ]]; $jobs['LINUX_X64']['config']['variation_enable_zend_max_execution_timers'] = version_compare($php_version, '8.3', '>='); } if ($all_jobs || !$no_jobs || $test_linux_x32) { $jobs['LINUX_X32']['matrix'] = $all_variations ? ['debug' => [true, false], 'zts' => [true, false]] : ['debug' => [true], 'zts' => [true]]; } if ($all_jobs || !$no_jobs || $test_macos) { $jobs['MACOS']['matrix'] = $all_variations ? ['arch' => ['ARM64'], 'debug' => [true, false], 'zts' => [true, false]] : ['include' => [['arch' => 'ARM64', 'debug' => true, 'zts' => false]]]; $jobs['MACOS']['config']['version'] = version_compare($php_version, '8.4', '>=') ? '26' : '15'; } if ($all_jobs || $test_msan) { $jobs['MSAN'] = true; } if ($all_jobs || $test_opcache_variation) { $jobs['OPCACHE_VARIATION'] = true; } if (version_compare($php_version, '8.6', '>=') && ($all_jobs || $test_solaris)) { $jobs['SOLARIS'] = true; } if ($all_jobs || !$no_jobs || $test_windows) { $matrix = [['asan' => false, 'opcache' => true, 'x64' => true, 'zts' => true]]; if ($all_variations) { $matrix[] = ['asan' => true, 'opcache' => true, 'x64' => true, 'zts' => true]; $matrix[] = ['asan' => false, 'opcache' => false, 'x64' => false, 'zts' => false]; if (version_compare($php_version, '8.6', '>=')) { $matrix[] = ['asan' => false, 'opcache' => true, 'x64' => true, 'zts' => true, 'clang' => true]; } } $jobs['WINDOWS']['matrix'] = ['include' => $matrix]; $jobs['WINDOWS']['config'] = match (true) { version_compare($php_version, '8.6', '>=') => ['vs_crt_version' => 'vs18', 'runs_on' => 'windows-2025-vs2026'], version_compare($php_version, '8.4', '>=') => ['vs_crt_version' => 'vs17', 'runs_on' => 'windows-2022'], default => ['vs_crt_version' => 'vs16', 'runs_on' => 'windows-2022'], }; } if ($all_jobs || !$no_jobs || $test_freebsd) { $jobs['FREEBSD']['matrix'] = $all_variations && version_compare($php_version, '8.3', '>=') ? ['zts' => [true, false]] : ['zts' => [false]]; } return $jobs; } $trigger = $argv[1] ?? 'schedule'; $attempt = (int) ($argv[2] ?? 1); $sunday = date('w', time()) === '0'; $discard_cache = $sunday || ($trigger === 'schedule' && $attempt !== 1) || $trigger === 'workflow_dispatch'; if ($discard_cache) { @unlink(get_branch_commit_cache_file_path()); } $branch = $argv[3] ?? 'master'; $nightly = $trigger === 'schedule' || $trigger === 'workflow_dispatch'; $branches = $nightly && $branch === 'master' ? get_branches() : [['name' => 'Suite', 'ref' => $branch, 'version' => get_current_version()]]; $labels = json_decode($argv[4] ?? '[]', true) ?? []; $labels = array_column($labels, 'name'); $all_variations = $nightly || in_array('CI: All variations', $labels, true); $repository = $argv[5] ?? null; foreach ($branches as &$branch) { $php_version = $branch['version'][0] . '.' . $branch['version'][1]; $branch['jobs'] = select_jobs($repository, $trigger, $nightly, $labels, $php_version, $branch['ref'], $all_variations); $branch['config']['default_run_test_jobs'] = version_compare($php_version, '8.6', '>=') ? '' : '-j2'; $branch['config']['ubuntu_version'] = version_compare($php_version, '8.5', '>=') ? '24.04' : '22.04'; $branch['config']['integrated_opcache'] = version_compare($php_version, '8.5', '>='); } echo "All variations:"; echo json_encode($all_variations, JSON_UNESCAPED_SLASHES|JSON_PRETTY_PRINT); echo "\n\nBranches:\n"; echo json_encode($branches, JSON_UNESCAPED_SLASHES|JSON_PRETTY_PRINT); echo "\n"; if (false !== ($github_output = getenv('GITHUB_OUTPUT'))) { $f = fopen($github_output, 'a'); fwrite($f, 'branches=' . json_encode($branches, JSON_UNESCAPED_SLASHES) . "\n"); fwrite($f, 'all_variations=' . json_encode($all_variations, JSON_UNESCAPED_SLASHES) . "\n"); fclose($f); } |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |