|
| 1 | +name: Check FrankenPHP Windows build |
| 2 | + |
| 3 | +on: |
| 4 | + workflow_dispatch: |
| 5 | + inputs: |
| 6 | + version: |
| 7 | + description: php version |
| 8 | + default: '8.5' |
| 9 | + type: string |
| 10 | + extensions: |
| 11 | + description: extensions to compile (comma separated) |
| 12 | + default: 'bcmath,ctype,curl,dom,filter,fileinfo,iconv,mbstring,opcache,openssl,pdo,pdo_sqlite,phar,session,simplexml,sockets,sqlite3,tokenizer,xml,xmlreader,xmlwriter,zip,zlib' |
| 13 | + type: string |
| 14 | + push: |
| 15 | + paths: |
| 16 | + - src/Package/Target/php/frankenphp.php |
| 17 | + - .github/workflows/frankenphp-windows-check.yml |
| 18 | + |
| 19 | +env: |
| 20 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 21 | + PHP_VER: ${{ inputs.version || '8.5' }} |
| 22 | + EXTS: ${{ inputs.extensions || 'bcmath,ctype,curl,dom,filter,fileinfo,iconv,mbstring,opcache,openssl,pdo,pdo_sqlite,phar,session,simplexml,sockets,sqlite3,tokenizer,xml,xmlreader,xmlwriter,zip,zlib' }} |
| 23 | + |
| 24 | +jobs: |
| 25 | + build: |
| 26 | + name: frankenphp ${{ inputs.version || '8.5' }} on Windows x86_64 |
| 27 | + runs-on: windows-latest |
| 28 | + timeout-minutes: 180 |
| 29 | + steps: |
| 30 | + - uses: actions/checkout@v4 |
| 31 | + - uses: shivammathur/setup-php@v2 |
| 32 | + with: |
| 33 | + php-version: '8.4' |
| 34 | + - run: composer update --no-dev --classmap-authoritative |
| 35 | + # FrankenPHP requires Go >= 1.26; make sure the runner's older Go cannot shadow it |
| 36 | + - uses: actions/setup-go@v6 |
| 37 | + with: |
| 38 | + go-version: stable |
| 39 | + cache: false |
| 40 | + - run: go version |
| 41 | + - run: ./bin/spc doctor --auto-fix |
| 42 | + - run: ./bin/spc download --with-php="$env:PHP_VER" --for-extensions="$env:EXTS" --for-libs=nghttp2 --ignore-cache-sources=php-src --retry 5 |
| 43 | + - name: Build php-embed |
| 44 | + run: ./bin/spc build:php-embed --enable-zts "--with-libs=nghttp2,pthreads4w" "$env:EXTS" |
| 45 | + - name: Inspect php8embed.lib for zend_atomic_bool_store |
| 46 | + run: | |
| 47 | + $lib = Get-ChildItem -Recurse -Filter php8embed.lib | Select-Object -First 1 |
| 48 | + Write-Host "lib: $($lib.FullName)" |
| 49 | + $dumpbin = (Get-ChildItem "C:/Program Files/Microsoft Visual Studio/*/*/VC/Tools/MSVC/*/bin/HostX64/x64/dumpbin.exe" | Select-Object -First 1).FullName |
| 50 | + & $dumpbin /SYMBOLS $lib.FullName | Select-String "zend_atomic_bool_store|InitSecurityInterface|PathCchCanonicalize" | Select-Object -First 20 |
| 51 | + - name: Build frankenphp |
| 52 | + run: ./bin/spc build:frankenphp --enable-zts --with-libs=nghttp2 "$env:EXTS" |
| 53 | + - name: Smoke test binary |
| 54 | + run: | |
| 55 | + $bin = Get-ChildItem -Recurse -Filter frankenphp.exe | Select-Object -First 1 |
| 56 | + & $bin.FullName version |
| 57 | + & $bin.FullName build-info |
| 58 | + - uses: actions/upload-artifact@v7 |
| 59 | + if: always() |
| 60 | + with: |
| 61 | + name: frankenphp-windows-x86_64 |
| 62 | + path: buildroot/bin/frankenphp.exe |
| 63 | + if-no-files-found: ignore |
| 64 | + - uses: actions/upload-artifact@v7 |
| 65 | + if: failure() |
| 66 | + with: |
| 67 | + name: spc-logs |
| 68 | + path: log/ |
0 commit comments