-
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
Changes from all commits
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 |
---|---|---|
|
@@ -38,6 +38,8 @@ jobs: | |
defaults: | ||
run: | ||
shell: cmd | ||
outputs: | ||
vs: ${{ steps.build-driver.outputs.vs }} | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
@@ -110,31 +112,22 @@ jobs: | |
with: | ||
filenames: php_mongodb.dll | ||
|
||
# Copy the signature file from the release asset directory to avoid directory issues in the ZIP file | ||
- name: "Copy signature file" | ||
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" | ||
|
||
- name: "Set compiler environment variable" | ||
# In this step, we: | ||
# - update the extension DLL file name to match the expectation of pie | ||
# - copy the signature file from the release asset directory to avoid directory issues in the archive | ||
# - rename the signature file to match the extension DLL file | ||
- name: "Copy signature file and use correct file names" | ||
run: | | ||
case "$PHP_VERSION" in | ||
"7.4") | ||
COMPILER="vc15" | ||
;; | ||
"8.0" | "8.1" | "8.2" | "8.3") | ||
COMPILER="vs16" | ||
;; | ||
"8.4") | ||
COMPILER="vs17" | ||
;; | ||
esac | ||
echo "COMPILER=${COMPILER}" >> "$GITHUB_ENV" | ||
shell: bash | ||
env: | ||
PHP_VERSION: ${{ inputs.php }} | ||
mv php_mongodb.dll ${{ env.FILENAME }}.dll | ||
cp ${RELEASE_ASSETS}/php_mongodb.dll.sig ${{ env.FILENAME }}.dll.sig | ||
|
||
- name: "Create and upload release asset" | ||
if: ${{ inputs.upload_release_asset }} | ||
run: | | ||
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 commentThe reason will be displayed to describe this comment to others. Learn more. If I'm not mistaken,
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. Hmm, according to the maintainer docs, it doesn't:
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 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 commentThe 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 The second part; the naming was agreed since it aligns with what php/php-windows-builder action produces |
||
gh release upload ${{ inputs.version }} ${ARCHIVE} |
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.