-
Notifications
You must be signed in to change notification settings - Fork 612
Introduce QA/Release Candidate Builds on main website #1261
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 2 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,170 @@ | ||
| <?php | ||
|
|
||
| /* | ||
| What this file does: | ||
| - Generates the download links found at qa.php.net | ||
| - Determines which test results are emailed to news.php.net/php.qa.reports | ||
| - Defines $QA_RELEASES for internal and external (api.php) use, contains all qa related information for future PHP releases | ||
|
|
||
| Documentation: | ||
| $QA_RELEASES documentation: | ||
| Configuration: | ||
| - Key is future PHP version number | ||
| - Example: If 5.3.6 is the latest stable release, then use 5.3.7 because 5.3.7-dev is our qa version | ||
| - Typically, this is the only part needing changed | ||
| - active (bool): | ||
| - It's active and being tested here | ||
| - Meaning, the version will be reported to the qa.reports list, and be linked at qa.php.net | ||
| - File extensions .tar.gz and .tar.bz2 are assumed to be available | ||
| - release (array): | ||
| - type: RC, alpha, and beta are examples (case should match filename case) | ||
| - version: 0 if no such release exists, otherwise an integer of the rc/alpha/beta number | ||
| - sha256_bz2: sha256 checksum of this downloadable .tar.bz2 file | ||
| - sha256_gz: sha256 checksum of this downloadable .tar.gz file | ||
| - sha256_xz: sha256 checksum of this downloadble .xz file | ||
| - date: date of release e.g., 21 May 2011 | ||
| - baseurl: base url of where these downloads are located | ||
| - Multiple checksums can be available, see the $QA_CHECKSUM_TYPES array below | ||
| Other variables within $QA_RELEASES are later defined including: | ||
| - reported: versions that make it to the qa.reports mailing list | ||
| - release: all current qa releases, including paths to dl urls (w/ sha256 info) | ||
| - dev_version: dev version | ||
| - $QA_RELEASES is made available at qa.php.net/api.php | ||
|
|
||
| TODO: | ||
| - Save all reports (on qa server) for all tests, categorize by PHP version (see buildtest-process.php) | ||
| - Consider storing rc downloads at one location, independent of release master | ||
| - Determine best way to handle rc baseurl, currently assumes .tar.gz/tar.bz2 will exist | ||
| - Determine if $QA_RELEASES is compatible with all current, and most future configurations | ||
| - Determine if $QA_RELEASES can be simplified | ||
| - Determine if alpha/beta options are desired | ||
| - Unify then create defaults for most settings | ||
| - Add option to allow current releases (e.g., retrieve current release info via daily cron, cache, check, configure ~ALLOW_CURRENT_RELEASES) | ||
| */ | ||
|
|
||
|
|
||
| $QA_RELEASES = [ | ||
|
|
||
| '8.1.27' => [ | ||
| 'active' => true, | ||
| 'release' => [ | ||
| 'type' => 'RC', | ||
| 'number' => 0, | ||
| 'sha256_gz' => '', | ||
| 'sha256_bz2' => '', | ||
| 'sha256_xz' => '', | ||
| 'date' => '07 Nov 2023', | ||
| 'baseurl' => 'https://downloads.php.net/', | ||
| ], | ||
| ], | ||
|
|
||
| '8.2.27' => [ | ||
| 'active' => true, | ||
| 'release' => [ | ||
| 'type' => 'RC', | ||
| 'number' => 0, | ||
| 'sha256_bz2' => '', | ||
| 'sha256_gz' => '', | ||
| 'sha256_xz' => '', | ||
| 'date' => '05 Dec 2024', | ||
| 'baseurl' => 'https://downloads.php.net/', | ||
| ], | ||
| ], | ||
|
|
||
| '8.3.20' => [ | ||
| 'active' => true, | ||
| 'release' => [ | ||
| 'type' => 'RC', | ||
| 'number' => 0, | ||
| 'sha256_bz2' => '', | ||
| 'sha256_gz' => '', | ||
| 'sha256_xz' => '', | ||
| 'date' => '27 Mar 2025', | ||
| 'baseurl' => 'https://downloads.php.net/', | ||
| ], | ||
| ], | ||
|
|
||
| '8.4.7' => [ | ||
| 'active' => true, | ||
| 'release' => [ | ||
| 'type' => 'RC', | ||
| 'number' => 1, | ||
| 'sha256_bz2' => 'acddb1da1b128f984df01347c907a64939f316d7d9bd138b49106f4179b7776f', | ||
| 'sha256_gz' => 'b12d97767aeda4624ea1904c1d93303efe4ffe1ba91970a3c5774ad556918e93', | ||
| 'sha256_xz' => '6cb37632eb65ee311cb4427ad070b6ab27fdaf13e8f0103701b2b78907326c93', | ||
| 'date' => '24 Apr 2025', | ||
| 'baseurl' => 'https://downloads.php.net/~saki/', | ||
| ], | ||
| ], | ||
| ]; | ||
|
|
||
| /*** End Configuration *******************************************************************/ | ||
|
|
||
| // This is a list of the possible checksum values that can be supplied with a QA release. Any | ||
| // new algorithm is read from the $QA_RELEASES array under the 'release' index for each version | ||
| // in the form of "$algorithm_$filetype". | ||
| // | ||
| // For example, if SHA512 were to be supported, the following indices would have to be added: | ||
| // | ||
| // 'sha512_bz2' => 'xxx', | ||
| // 'sha512_gz' => 'xxx', | ||
| // 'sha512_xz' => 'xxx', | ||
| $QA_CHECKSUM_TYPES = ['sha256']; | ||
|
|
||
| // $QA_RELEASES eventually contains just about everything, also for external use | ||
| // release : These are encouraged for use (e.g., linked at qa.php.net) | ||
| // reported : These are allowed to report @ the php.qa.reports mailing list | ||
|
|
||
| (function(&$QA_RELEASES) use ($QA_CHECKSUM_TYPES) { | ||
| foreach ($QA_RELEASES as $pversion => $info) { | ||
|
|
||
| if (isset($info['active']) && $info['active']) { | ||
|
|
||
| // Allow -dev versions of all active types | ||
| // Example: 5.3.6-dev | ||
| $QA_RELEASES['reported'][] = "{$pversion}-dev"; | ||
| $QA_RELEASES[$pversion]['dev_version'] = "{$pversion}-dev"; | ||
|
|
||
| // Allow -dev version of upcoming qa releases (rc/alpha/beta) | ||
| // @todo confirm this php version format for all dev versions | ||
| if ((int)$info['release']['number'] > 0) { | ||
| $QA_RELEASES['reported'][] = "{$pversion}{$info['release']['type']}{$info['release']['number']}"; | ||
| if (!empty($info['release']['baseurl'])) { | ||
|
|
||
| // php.net filename format for qa releases | ||
| // example: php-5.3.0RC2 | ||
| $fn_base = 'php-' . $pversion . $info['release']['type'] . $info['release']['number']; | ||
|
|
||
| $QA_RELEASES[$pversion]['release']['version'] = $pversion . $info['release']['type'] . $info['release']['number']; | ||
| foreach ([ 'bz2', 'gz', 'xz' ] as $file_type) { | ||
| foreach ($QA_CHECKSUM_TYPES as $algo) { | ||
| if (isset($info['release'][$algo . '_' . $file_type])) { | ||
| $QA_RELEASES[$pversion]['release']['files'][$file_type][$algo] = $info['release'][$algo . '_' . $file_type]; | ||
| } | ||
| } | ||
| if (!empty($QA_RELEASES[$pversion]['release']['files'][$file_type])) { | ||
| $QA_RELEASES[$pversion]['release']['files'][$file_type]['path']= $info['release']['baseurl'] . $fn_base . '.tar.' . $file_type; | ||
| } | ||
| } | ||
|
|
||
| if (empty($QA_RELEASES[$pversion]['release']['files'])) { | ||
| $QA_RELEASES[$pversion]['release']['enabled'] = false; | ||
| } | ||
| } | ||
| } else { | ||
| $QA_RELEASES[$pversion]['release']['enabled'] = false; | ||
| } | ||
|
|
||
| } | ||
| } | ||
|
|
||
| // Sorted information for later use | ||
| // @todo need these? | ||
| // $QA_RELEASES['releases'] : All current versions with active qa releases | ||
| foreach ($QA_RELEASES as $pversion => $info) { | ||
| if (isset($info['active']) && $info['active'] && !empty($info['release']['number'])) { | ||
| $QA_RELEASES['releases'][$pversion] = $info['release']; | ||
| } | ||
| } | ||
|
|
||
| })($QA_RELEASES); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,83 @@ | ||
| <?php | ||
| $_SERVER['BASE_PAGE'] = 'qa.php'; | ||
| include_once __DIR__ . '/include/prepend.inc'; | ||
| include_once __DIR__ . '/include/release-qa.php'; | ||
|
|
||
| $SITE_UPDATE = date("D M d H:i:s Y T", filectime(__FILE__)); | ||
|
|
||
| site_header("Release Candidates", [ | ||
| 'current' => 'downloads', | ||
| ]); | ||
|
|
||
| ?> | ||
| <h1>Release Candidate Builds</h1> | ||
| <p> | ||
| This page contains links to the Release Candidate builds that the release | ||
| managers create before each actual release. These builds are meant for the | ||
| community to test whether no inadvertent changes have been made, and | ||
| whether no regressions have been introduced. | ||
| </p> | ||
|
|
||
| <h3>Available QA Releases:</h3> | ||
| <?php show_release_qa($QA_RELEASES); ?> | ||
| <p> | ||
| <br> | ||
| <strong>Windows users:</strong> | ||
| See <a href="https://windows.php.net/qa/">here</a> for the Windows QA builds. | ||
| </p> | ||
| <?php | ||
|
|
||
| site_footer(); | ||
|
|
||
| function show_release_qa($QA_RELEASES) { | ||
| // The checksum configuration array | ||
| global $QA_CHECKSUM_TYPES; | ||
|
|
||
| echo "<!-- RELEASE QA -->\n"; | ||
|
|
||
| if (!empty($QA_RELEASES['releases'])) { | ||
|
|
||
| $plural = count($QA_RELEASES['releases']) > 1 ? 's' : ''; | ||
|
|
||
| // QA Releases | ||
| echo "<span class='lihack'>\n"; | ||
| echo "Providing QA for the following <a href='/rc.php'>test release{$plural}</a>:<br> <br>\n"; | ||
| echo "</span>\n"; | ||
| echo "<table>\n"; | ||
|
|
||
| foreach ($QA_RELEASES['releases'] as $pversion => $info) { | ||
|
|
||
| echo "<tr>\n"; | ||
| echo "<td colspan=\"" . (sizeof($QA_CHECKSUM_TYPES) + 1) . "\">\n"; | ||
| echo "<h3 style=\"margin: 0px;\">{$info['version']}</h3>\n"; | ||
| echo "</td>\n"; | ||
| echo "</tr>\n"; | ||
|
|
||
| foreach ($info['files'] as $file_type => $file_info) { | ||
| echo "<tr>\n"; | ||
| echo "<td width=\"20%\"><a href=\"{$file_info['path']}\">php-{$info['version']}.tar.{$file_type}</a></td>\n"; | ||
|
|
||
| foreach ($QA_CHECKSUM_TYPES as $algo) { | ||
| echo '<td>'; | ||
| echo '<strong>' . strtoupper($algo) . ':</strong> '; | ||
|
|
||
| if (isset($file_info[$algo]) && strlen($file_info[$algo])) { | ||
| echo $file_info[$algo]; | ||
| } else { | ||
| echo '(<em><small>No checksum value available</small></em>) '; | ||
| } | ||
|
|
||
| echo "</td>\n"; | ||
| } | ||
|
|
||
| echo "</tr>\n"; | ||
| } | ||
| } | ||
|
|
||
| echo "</table>\n"; | ||
| } else { | ||
| echo "<span class='lihack'>There are no QA releases available at the moment to test.</span>"; | ||
| } | ||
|
|
||
| echo "<!-- END -->\n"; | ||
| } | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.