Skip to content
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

Updates to Windows CI #561

Merged
merged 6 commits into from
Oct 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,30 @@ jobs:
shell: cmd
strategy:
matrix:
version: ['8.3']
version: ['8.3', '8.4']
arch: [x64, x86]
ts: [nts, zts]
exclude:
- { version: '8.4', arch: x64, ts: zts }
- { version: '8.4', arch: x86, ts: nts }
- { version: '8.4', arch: x86, ts: zts }
runs-on: windows-latest
steps:
- name: Checkout memcached
uses: actions/checkout@v4
- name: Setup PHP
id: setup-php
uses: php/setup-php-sdk@v0.9
uses: php/setup-php-sdk@v0.10
with:
version: ${{matrix.version}}
arch: ${{matrix.arch}}
ts: ${{matrix.ts}}
deps: zlib
cache: true
- name: Fetch libmemcached
run: curl -OLs https://windows.php.net/downloads/pecl/deps/libmemcached-1.1.1-${{steps.setup-php.outputs.vs}}-${{matrix.arch}}.zip && 7z x libmemcached-1.1.1-${{steps.setup-php.outputs.vs}}-${{matrix.arch}}.zip -o..\deps
run: |
set MEMCACHED_FILENAME=libmemcached-1.1.1-${{steps.setup-php.outputs.vs == 'vs17' && 'vs16' || steps.setup-php.outputs.vs}}-${{matrix.arch}}.zip
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why 1.1.1 from 2021?
libmemcached is currently at 1.1.4 which actually contains a fix for a possible security issue.
I totally understand, though, if the answer is obviously manpower, etc...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why 1.1.1 from 2021?

Must be one of the more recent dependency builds. Anyhow, let's see how https://github.com/winlibs/winlib-builder/actions/runs/11332741118 goes.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like I'll have to revert awesomized/libmemcached@1a15a08 to get back to PHP Windows naming conventions.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That commit looks like a fix to not end up with liblibfoo.a
What's the exact problem on your side?
I guess we could fix both sides if we get rid of the ALIAS shenanigans.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without the patch, on Windows memcached.lib is built; with the fix it's libmemcached.lib. The former is probably common on Windows, but the latter is the PHP convention for import libraries (would be libmemcached_a.lib for static libs). If you "fix" this, others building the library might not get the library names they want/expect.

Anyway, applying a patch is not hard, and the build was successful. I've built ext/memcached locally successfully against libmemcached 1.1.4.

The actual problems are lack of automation of doing and testing dependency builds, and of course, that we can hardly watch for new dependency releases (way too many packages). And some packages need way more heavy patching anyway.

Now, someone needs to upload the libmemcached-1.1.4 builds to the download server. Maybe @shivammathur is in the mood. :)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uploaded

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR to use it for Windows CI: #564.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🥳

curl -OLs https://downloads.php.net/~windows/pecl/deps/%MEMCACHED_FILENAME% && 7z x %MEMCACHED_FILENAME% -o..\deps
- name: Enable Developer Command Prompt
uses: ilammy/msvc-dev-cmd@v1
with:
Expand Down