-
Notifications
You must be signed in to change notification settings - Fork 14
GitHub Actions CI #6
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
Conversation
.github/workflows/ci.yml
Outdated
runs-on: ubuntu-latest | ||
steps: | ||
- name: Install DB2 library | ||
# XXX: Can this be optimized to not constantly redownload? Or be put in a better place? |
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.
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.
Definitely would be helpful to cache, I think. I know the PRs for python-ibmdb were failing for a while due to flakiness in the IBM download site.
Beaten into better shape, though the PHP 8.0 failure is bizarre; it's as if it was trying to link it as a normal executable instead of a library? |
|
Seems to be some something weird with libtool. It's calling |
#ifdef PASE /* i5/OS ease of use turn off/on */ | ||
ZEND_BEGIN_MODULE_GLOBALS(pdo_ibm) |
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.
Another option would be to define a "uses globals" flag instead of hardcoding to PASE in case other platforms need it in the future, eg.
#if defined(PASE)
#define PDO_IBM_USES_GLOBALS
#endif
#ifdef PDO_IBM_USES_GLOBALS
ZEND_BEGIN_MODULE_GLOBALS(pdo_ibm)
...
#endif
Of course, that might be needless future-proofing.
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.
Not a bad idea, but considering ibm_db2 went a long while without any non-PASE globals, might also be needless, yeah.
The PDO extensions bundled with PHP moved to this style (well, they don't include the legacy check; this mirrors how it was in 7.3) Pushed to CI branch to see how it affects it.
This only builds the driver on Ubuntu. macOS and Windows, as well as starting the LUW Docker container are TODO.
MSVC doesn't allow it, so should unbreak Windows builds. Made to CI branch, but can cherry pick back to main.
Christoph pointed out this was wrong with the new macro; very subtle!
In spirit to what PHP does with MSSQL.
Add additional environment variables for the DSN INI et al
the "automatic storage yes" is something I remembered last time I had to deal with LUW. Try to remove tty/interactive flags from docker exec Try to wait for Db2 to finish up setup (not ideal) We don't need to create the database, the Docker container made one all along Actually check if setup is complete
It's hard to predict what we'll be running on.
Do fwrite instead.
The 1/2 keys will always be empty, whereas before they had some cruft about non-existent files. In theory we could force it to be like how it was, but no other drivers do so.
I'm not sure how the original version of the test ever made sense when I was reading it. The behaviour it expects seemed counter-intuitive with how it was expecting casting to happen. Bizarrely, the IBM i version does match the behaviour of modern PHP and Db2. So, let's just put that in its place.
Not sure how to get this working for now, but we can revisit it.
It seems on PHP 7.x, the order in which they're inserted matters, at least for `fvt_025_ColumnMetaData`. Tested on PHP 7.4/LUW.
On PHP 8.1, the skip cache seemingly collates all the reused skip sections into a single file. However, the skip check relies on using the name of the test to determine if it should be skipped based on platform. This is why the skip blocks that *aren't* the same will trigger reliably. This will slow it down a smidge, but work reliably until the skip checks are refactored.
One of the LOB tests exhibited this. I don't know if NULL is the best thing to return, but it can be considered.
This: