-
Notifications
You must be signed in to change notification settings - Fork 208
PHPC-2649: Use output from setup-php-sdk in packaging step #1732
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
PHPC-2649: Use output from setup-php-sdk in packaging step #1732
Conversation
I'll test it out as soon as a new version is released, thank you for keeping me up to date. 😄 |
ARCHIVE=php_mongodb-${{ inputs.version }}-${{ inputs.php }}-${{ inputs.ts }}-${{ env.COMPILER }}-${{ inputs.arch }}.zip | ||
zip ${ARCHIVE} php_mongodb.dll php_mongodb.dll.sig php_mongodb.pdb CREDITS CONTRIBUTING.md LICENSE README.md THIRD_PARTY_NOTICES | ||
ARCHIVE=${{ env.FILENAME }}.zip | ||
zip ${ARCHIVE} ${{ env.FILENAME }}.dll ${{ env.FILENAME }}.dll.sig php_mongodb.pdb CREDITS CONTRIBUTING.md LICENSE README.md THIRD_PARTY_NOTICES |
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.
If I'm not mistaken, php_mongodb.pdb
needs to become ${{ env.FILENAME }}.pdb
.
php_mongodb-1.20.1-8.3-ts-vs16-x86_64.dll
would be converted to php_mongodb-1.20.1-8.3-ts-vs16-x86_64.pdb
in https://github.com/php/pie/blob/eaf77ea181f44c7711887474c4f33501a17cb39f/src/Installing/WindowsInstall.php#L39
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.
Hmm, according to the maintainer docs, it doesn't:
php_{extension-name}.pdb
- this will be moved alongside theC:\path\to\php\ext\php_{extension-name}.dll
Looking at the code you linked, I do agree that it should be named the same way as the DLL file.
Let me try summoning @asgrim to clarify 😉
Another concern that comes to mind is that we're now requiring people that install their extensions manually. Right now, they only need to copy php_mongodb.dll
to their extensions directory and they're done. This is valid regardless of whether they download our packages or the ones offered on pecl.php.net.
I'm sure there was a particular reason for naming the DLL file this way, but I wonder if that's truly necessary. Clearly, we can extract the relevant information (compiler, thread safety, PHP version, architecture) from the archive filename before we extract the DLL file, so we shouldn't need to re-verify this when we have the DLL file. If a user packs a DLL file into an archive for a different platform, that's their problem, not PIE's.
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.
Regarding the first part, yes the implementation is incorrect, it was always meant to be php_{extension-name}.pdb
- I've reported issue php/pie#71 and I will look into getting this fixed.
The second part; the naming was agreed since it aligns with what php/php-windows-builder action produces
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.
LGTM assuming php_mongodb.pdb
is using the correct name.
run: cp ${RELEASE_ASSETS}/php_mongodb.dll.sig . | ||
- name: "Generate file name for DLL and archive" | ||
run: | ||
echo FILENAME="php_mongodb-${{ inputs.version }}-${{ inputs.php }}-${{ inputs.ts }}-${{ needs.build.outputs.vs }}-${{ inputs.arch == 'x64' && 'x64_86' || inputs.arch }}" >> "$GITHUB_ENV" |
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.
Noted that this uses the needs
context.
PHPC-2649
This PR adds the
vs
output variable from thesetup-php-sdk
action to all actions involved in building Windows packages so that it can be used when determining the filename for the archive. This removes the need for maintaining a list of PHP versions with their compilers.In addition to this, the PR makes two more adjustments for compatibility with PIE:
x86_64
for 64-bit platforms, notx64
php_mongodb.dll
. PIE will rename the file in its install step.cc @mickverm - this should get rid of the issues you encountered, but we won't know until we release 1.20.1. Please bear with us while we sort out the initial difficulties with PIE. We do appreciate your testing efforts for PIE compatibility 💪