Repository navigation
Run tests on macOS and Windows #313
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
Changes from all commits
3e3dd9e
de98958
e5a5012
2eef886
0cbbd23
e957c5c
56063c7
95a3b63
6f3f5d3
5015c8c
3d26b50
419c4e5
4c7090d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| <?php | ||
|
|
||
| declare(strict_types=1); | ||
|
|
||
| // Check which extensions are loaded. A failed `extension=` load is only a | ||
| // warning, and the test suite passes without the C extension or gmp, so CI | ||
| // runs this before PHPUnit with the same PHP options. | ||
| // | ||
| // Usage: php [-d ...] check-extensions.php <name>... | ||
| // | ||
| // A name that starts with ":" must not be loaded. This is the syntax that | ||
| // setup-php uses to disable an extension. | ||
|
|
||
| if ($argc < 2) { | ||
| fwrite(\STDERR, "usage: check-extensions.php <name>...\n"); | ||
|
|
||
| exit(1); | ||
| } | ||
|
|
||
| $failed = false; | ||
| foreach (array_slice($argv, 1) as $arg) { | ||
| if (substr($arg, 0, 1) === ':') { | ||
| $name = substr($arg, 1); | ||
| if (extension_loaded($name)) { | ||
| echo "::error::{$name} is loaded, but this job must not load it\n"; | ||
| $failed = true; | ||
| } | ||
| } elseif (!extension_loaded($arg)) { | ||
| echo "::error::{$arg} is not loaded\n"; | ||
| $failed = true; | ||
| } | ||
| } | ||
|
|
||
| exit($failed ? 1 : 0); |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -528,11 +528,11 @@ static void handle_uint32(const MMDB_entry_data_list_s *entry_data_list, | |
| zval *z_value TSRMLS_DC) { | ||
| uint32_t val = entry_data_list->entry_data.uint32; | ||
|
|
||
| #if LONG_MAX >= UINT32_MAX | ||
| #if ZEND_LONG_MAX >= UINT32_MAX | ||
| ZVAL_LONG(z_value, val); | ||
| return; | ||
| #else | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. After this change, this Before this change, every Windows build compiled and ran this path, because 🤖 Comment by Claude Opus 5.5.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Reply from Claude Code (an AI agent) on behalf of the PR author. Agreed. No job builds 32-bit PHP since 7095078 replaced the i386 jobs with arm64, so this is not changed here. |
||
| if (val <= LONG_MAX) { | ||
| if (val <= ZEND_LONG_MAX) { | ||
| ZVAL_LONG(z_value, val); | ||
| return; | ||
| } | ||
|
|
@@ -550,11 +550,7 @@ static void handle_uint64(const MMDB_entry_data_list_s *entry_data_list, | |
| zval *z_value TSRMLS_DC) { | ||
| uint64_t val = entry_data_list->entry_data.uint64; | ||
|
|
||
| #if LONG_MAX >= UINT64_MAX | ||
| ZVAL_LONG(z_value, val); | ||
| return; | ||
| #else | ||
| if (val <= LONG_MAX) { | ||
| if (val <= ZEND_LONG_MAX) { | ||
| ZVAL_LONG(z_value, val); | ||
| return; | ||
| } | ||
|
|
@@ -565,7 +561,6 @@ static void handle_uint64(const MMDB_entry_data_list_s *entry_data_list, | |
|
|
||
| ZVAL_STRING(z_value, int_str); | ||
| efree(int_str); | ||
| #endif | ||
| } | ||
|
|
||
| static void maxminddb_free_storage(free_obj_t *object TSRMLS_DC) { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The matrix keeps the default
fail-fast: true. The new macOS and Windows jobs depend on Homebrew and the network. If one of them fails (for example, a temporarybrew installfailure, or a macOS-only-Werrorfailure from a new Xcode clang with--enable-maxminddb-debug), GitHub cancels all the Linux jobs that are still running, and their results are lost.test-bundled.ymlsetsfail-fast: falsefor this reason. Should this matrix do the same?🤖 Comment by Claude Opus 5.5.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems fine to leave
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reply from Claude Code (an AI agent) on behalf of the PR author.
OK, leaving
fail-fastat the default.