docs(readme): add fastchart to PHP Performance Toolkit cross-promo #2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Windows Build | |
| on: | |
| push: | |
| branches: [master] | |
| pull_request: | |
| branches: [master] | |
| release: | |
| types: [published] | |
| env: | |
| LIBXL_VERSION: "5.1.0" | |
| jobs: | |
| windows-matrix: | |
| name: Generate Windows build matrix | |
| runs-on: ubuntu-latest | |
| outputs: | |
| matrix: ${{ steps.matrix.outputs.matrix }} | |
| steps: | |
| - id: matrix | |
| uses: php/php-windows-builder/extension-matrix@v1 | |
| with: | |
| extension-url: ${{ github.event.repository.html_url }} | |
| php-version-list: '8.3, 8.4, 8.5' | |
| windows-build: | |
| name: Build ${{ matrix.php-version }} ${{ matrix.arch }} ${{ matrix.ts }} | |
| needs: windows-matrix | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: ${{ fromJson(needs.windows-matrix.outputs.matrix) }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Download and prepare LibXL | |
| shell: pwsh | |
| run: | | |
| Invoke-WebRequest -Uri "https://www.libxl.com/download/libxl-win-${{ env.LIBXL_VERSION }}.zip" -OutFile libxl.zip | |
| Expand-Archive libxl.zip -DestinationPath libxl-extract | |
| $dir = Get-ChildItem -Path libxl-extract -Directory | Select-Object -First 1 | |
| $depsDir = "libxl-deps" | |
| New-Item -ItemType Directory -Path $depsDir -Force | |
| # Headers (include_c/ for config.w32) | |
| Copy-Item -Path "$($dir.FullName)\include_c" -Destination "$depsDir\" -Recurse -Force | |
| # Select lib and bin for target architecture | |
| if ("${{ matrix.arch }}" -eq "x64") { | |
| Copy-Item -Path "$($dir.FullName)\lib64\libxl.lib" -Destination "$depsDir\libxl.lib" -Force | |
| Copy-Item -Path "$($dir.FullName)\bin64\libxl.dll" -Destination "$depsDir\libxl.dll" -Force | |
| } else { | |
| Copy-Item -Path "$($dir.FullName)\lib\libxl.lib" -Destination "$depsDir\libxl.lib" -Force | |
| Copy-Item -Path "$($dir.FullName)\bin\libxl.dll" -Destination "$depsDir\libxl.dll" -Force | |
| } | |
| Get-ChildItem $depsDir -Recurse | Select-Object FullName | |
| - name: Build extension | |
| uses: php/php-windows-builder/extension@v1 | |
| with: | |
| php-version: ${{ matrix.php-version }} | |
| ts: ${{ matrix.ts }} | |
| arch: ${{ matrix.arch }} | |
| args: --with-excel --with-libxl=${{ github.workspace }}\libxl-deps | |
| release: | |
| name: Attach Windows DLLs to release | |
| if: github.event_name == 'release' | |
| needs: windows-build | |
| runs-on: ubuntu-latest | |
| # Explicit write scope for releases; default GITHUB_TOKEN is read-only | |
| # for the contents permission on newly-created repos and the | |
| # php-windows-builder/release@v1 action calls POST /releases. Older | |
| # repos like this one predate that default tightening, but newer | |
| # ones (lchash) need this block or the upload 403s. | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Upload release artifacts | |
| uses: php/php-windows-builder/release@v1 | |
| with: | |
| release: ${{ github.event.release.tag_name }} | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |