-
Notifications
You must be signed in to change notification settings - Fork 265
PHPLIB-519: Allow testing against development driver versions #706
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
42f16e3 to
ffc8a9a
Compare
| php: "7.1" | ||
| before_install: [] | ||
| before_script: | ||
| - pecl install -f mongodb-${DRIVER_VERSION} |
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.
I actually don't recall why we stopped using the tpecl command, which caches the install. It looks like it was removed in 8774590.
.travis.yml still has the tpecl definition, but it looks like it's no longer being used since that commit. Do you want to try relocating it to install-extension.sh and use it when installing based on $DRIVER_VERSION? Otherwise, I suppose we should just delete it entirely (can do so in a separate issue/PR).
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.
I'll change it back to using tpecl, makes sense to cache it when possible.
.travis/install-extension.sh
Outdated
| @@ -0,0 +1,23 @@ | |||
| #!/bin/sh | |||
|
|
|||
| if [ "x${DRIVER_VERSION}" != "x" ]; then | |||
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.
As a sanity check, I think it would make sense to raise an error at the top of this script if both $DRIVER_VERSION and $DRIVER_BRANCH are non-empty. As-is, we're likely to compile the driver twice and end up with the branch version (last one wins).
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.
I'll change this around to use an else if and give precedence to a branch build. This allows us to omit setting DRIVER_VERSION="" in the env for branch builds. If none of the drivers can be installed, the following php --ri call will fail, but I can also exit with a non-zero code in this script to break the build earlier.
aa31ce9 to
614b086
Compare
614b086 to
672c34e
Compare
This allows us to later switch to always test against dev driver versions until the RC phase of the extension, saving us the trouble of releasing alpha builds of the driver for internal testing purposes.