Skip to content
Open
Changes from 1 commit
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
57 changes: 56 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,59 @@ jobs:
name: mailparse-${{matrix.version}}-${{matrix.arch}}-${{matrix.ts}}
path: binaries
- name: test
run: nmake test TESTS="--show-diff tests"
run: nmake test TESTS="--show-diff tests"
windows-php-8-4:
runs-on: windows-2022
continue-on-error: false
strategy:
fail-fast: false
matrix:
version: ["8.4"]
arch: [x64, x86]
ts: [nts, ts]
steps:
- name: Configure Git
run: git config --global core.autocrlf false
- name: Checkout mailparse
uses: actions/checkout@v4
with:
submodules: true
- name: Setup PHP ${{ matrix.version }}
id: setup-php-sdk
uses: php/[email protected]
with:
version: ${{matrix.version}}
arch: ${{matrix.arch}}
ts: ${{matrix.ts}}
- name: Enable Developer Command Prompt
uses: ilammy/msvc-dev-cmd@v1
with:
arch: ${{matrix.arch}}
toolset: ${{steps.setup-php-sdk.outputs.toolset}}
- name: Build mailparse for Windows
run: |
phpize
./configure --enable-test-ini --enable-mailparse --with-prefix=${{steps.setup-php-sdk.outputs.prefix}}
nmake
- name: patch test ini
run: |
if ("${{matrix.ts}}" -eq "ts") {$releaseDir = "Release_TS"} else {$releaseDir = "Release"}
if ("${{matrix.arch}}" -eq "x64") {$my_ini_file = "x64\$releaseDir\tmp-php.ini"} else {$my_ini_file = "$releaseDir\tmp-php.ini"}
$currentDir = pwd
$mbstring = "$currentDir\php-bin\ext\php_mbstring.dll"
$content = [System.IO.File]::ReadAllText($my_ini_file)
$pattern = [regex]"\nextension="
$content = $pattern.replace($content, "`nextension=$mbstring`nextension=", 1)
[System.IO.File]::WriteAllText($my_ini_file, $content)
type $my_ini_file
- name: package
run: |
md binaries
Get-ChildItem -Recurse -Filter "php_mailparse.dll" | ForEach-Object {Copy-Item -Path $_.FullName -Destination "binaries"}
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: mailparse-${{matrix.version}}-${{matrix.arch}}-${{matrix.ts}}
path: binaries
- name: test
run: nmake test TESTS="--show-diff tests"