PHPC-2661: Use php-windows-builder for Windows extension builds#1907
PHPC-2661: Use php-windows-builder for Windows extension builds#1907alcaeus merged 6 commits intomongodb:v1.21from
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the setup-php-sdk action version to fix Windows build pipeline failures caused by a NullReferenceException in the upstream action.
Key Changes:
- Bumps
setup-php-sdkaction from v0.10 to v0.12
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
ecd9996 to
70406f7
Compare
33e8fa1 to
dc177a4
Compare
jmikola
left a comment
There was a problem hiding this comment.
Some questions on the bool option being passed around, but this looks fine otherwise.
| run-tests: | ||
| description: "Whether to run tests after building" | ||
| required: false | ||
| default: "false" |
There was a problem hiding this comment.
Why a string value instead of a bool?
There was a problem hiding this comment.
Inputs for composite actions are always strings, I wanted to make this explicit here.
| - name: Build driver | ||
| shell: cmd | ||
| run: nmake /nologo | ||
| run-tests: ${{ inputs.run-tests == 'true' && true || false }} |
There was a problem hiding this comment.
Noted that you just look for a string value here. What is && true || false accomplishing?
There was a problem hiding this comment.
This is a ternary since I don't trust type coercion in YAML. Could potentially be simplified but I didn't want to run the risk of it misbehaving
| php-version: ${{ matrix.php-version }} | ||
| arch: ${{ matrix.arch }} | ||
| ts: ${{ matrix.ts }} | ||
| run-tests: false |
There was a problem hiding this comment.
Here you are passing a bool and overriding the default string value ("false").
| - name: "Upload assets to release" | ||
| if: ${{ inputs.upload_release_assets }} | ||
| run: | | ||
| gh release upload ${{ inputs.version }} artifacts/php_mongodb* --clobber |
There was a problem hiding this comment.
Probably not necessary but you could restrict the extension to "zip" and "sig". I assume the directory starts empty, though.
1.21.1 (2025-06-13) What's Changed * PHPC-2558: Update to libmongoc 1.30.3 by @alcaeus in mongodb/mongo-php-driver#1806 * Add CODEOWNERS for 1.21+ by @alcaeus in mongodb/mongo-php-driver#1810 * PHPC-2537 Update to newer Ubuntu version in GitHub Actions workflows by @GromNaN in mongodb/mongo-php-driver#1814 * PHPLIB-1678: Use assume_role command before accessing secrets by @alcaeus in mongodb/mongo-php-driver#1832 * Ignore branches that are no longer maintained when merging up by @alcaeus in mongodb/mongo-php-driver#1838 * PHPC-2593: Update libmongoc to 1.30.5 by @alcaeus in mongodb/mongo-php-driver#1841 1.21.2 (2025-10-07) What's Changed * Fix wrong PHP version constraint for pie by @alcaeus in mongodb/mongo-php-driver#1874 * PHPC-2635: Remove serverless URIs from Atlas connectivity tests by @jmikola in mongodb/mongo-php-driver#1879 * PHPC-2637: Update to libmongoc 1.30.6 by @alcaeus in mongodb/mongo-php-driver#1882 1.21.3 (seems not be released) 1.21.4 (2026-01-28) What's Changed * PHPC-2661: Use php-windows-builder for Windows extension builds by @alcaeus in mongodb/mongo-php-driver#1907 * Refactor release process to support php-windows-builder by @alcaeus in mongodb/mongo-php-driver#1916 * Fix broken release workflow by @alcaeus in mongodb/mongo-php-driver#1919 1.21.5 (2026-02-04) What's Changed * Fix artifact signing by @alcaeus in mongodb/mongo-php-driver#1923 * PHPC-2670: Upgrade libmongoc to 1.30.7 by @alcaeus in mongodb/mongo-php-driver#1930 * PHPC-2636: Respect libbson nesting limit when parsing PHP objects by @alcaeus in mongodb/mongo-php-driver#1934
PHPC-2661
This PR changes the build and release process to use php-windows-builder for Windows extension builds. Since php-windows-builder provides fully built zip packages for Windows extensions, this also changes the release process slightly: instead of packaging a detached signature file for the DLL in the package, we're now uploading a detached signature file for the entire package to the release, as we already do for the pecl package.