Build and Test on Windows #118
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: Build and Test on Windows | |
| on: | |
| schedule: | |
| - cron: '0 23 * * 3' | |
| push: | |
| paths: | |
| - .github/workflows/nightly.yml | |
| workflow_dispatch: # 允许手动触发 | |
| jobs: | |
| setup_matrix: | |
| defaults: | |
| run: | |
| shell: pwsh | |
| runs-on: windows-2019 | |
| outputs: | |
| matrix-version: ${{steps.setup_matrix.outputs.matrix-version}} | |
| Ig: ${{steps.setup_matrix.outputs.Ig}} | |
| Mg: ${{steps.setup_matrix.outputs.Mg}} | |
| Pg: ${{steps.setup_matrix.outputs.Pg}} | |
| steps: | |
| - name: setup matrix | |
| id: setup_matrix | |
| run: | | |
| # $response = Invoke-RestMethod -Method Get -Uri "https://windows.php.net/downloads/releases/releases.json" | |
| $jsonFilePath = "releases.json" | |
| # 使用 PowerShell 获取 JSON 数据并正确序列化 | |
| $response = Invoke-RestMethod -Method Get -Uri "https://windows.php.net/downloads/releases/releases.json" | |
| # 将 PowerShell 对象转换为 JSON 字符串并保存到文件 | |
| $jsonFilePath = "releases.json" | |
| $vers = $response | ConvertTo-Json -Compress | |
| # 输出转换后的 JSON 数据供调试 | |
| Write-Output "Serialized JSON Data:" | |
| Write-Output $vers | |
| $versions =echo $vers |jq '[to_entries[] | select(.value["test_pack"].sha256 != null ) | .key]' | |
| # 输出保存的版本结果供调试 | |
| Write-Output "Version Result:" | |
| Write-Output $versions | |
| # $response|get-member -membertype NoteProperty | |
| # $tag=$response.PSObject.Properties | Select-Object -Expand Name | |
| # $tt=@() | |
| # foreach($t in $tag){ | |
| # $tt+="$t" | |
| # } | |
| # $j=$tt|convertto-json | |
| # $v= $j|jq -c . | |
| # echo "phpversion latest version:$tag,type:$type,tt:$tt,json:$tt|jq -s -c" | |
| # 将版本转换为 JSON 数组格式 | |
| #$versionArray = $versions -join '","' | |
| #$versionArray = '["' + $versionArray + '"]' | |
| echo "version is $versions" | |
| echo "::set-output name=matrix-version::$versions" | |
| echo "::set-output name=Pg::master" | |
| echo "memcached latest version:$tag" | |
| echo "Pg=$tag" >> $env:GITHUB_ENV | |
| $response = Invoke-RestMethod -Method Get -Uri "https://api.github.com/repos/msgpack/msgpack-php/releases/latest" | |
| $tag=$response|select-object -ExpandProperty "tag_name" | |
| $tag=$tag -replace "msgpack-","" | |
| echo "msgpack latest version:$tag" | |
| echo "::set-output name=Mg::$tag" | |
| echo "Mg=$tag" >> $env:GITHUB_ENV | |
| $response = Invoke-RestMethod -Method Get -Uri "https://api.github.com/repos/igbinary/igbinary/releases/latest" | |
| $tag=$response|select-object -ExpandProperty "tag_name" | |
| echo "igbinary latest version:$tag" | |
| echo "Ig=$tag" >> $env:GITHUB_ENV | |
| echo "::set-output name=Ig::$tag" | |
| $type=$tag.gettype() | |
| ts74-x64-msgpack: | |
| needs: ["setup_matrix"] | |
| env: | |
| Ig: ${{needs.setup_matrix.outputs.Ig}} | |
| Pg: ${{needs.setup_matrix.outputs.Pg}} | |
| Mg: ${{needs.setup_matrix.outputs.Mg}} | |
| defaults: | |
| run: | |
| shell: powershell | |
| runs-on: windows-2019 | |
| outputs: | |
| Ig: ${{needs.setup_matrix.outputs.Ig}} | |
| Mg: ${{needs.setup_matrix.outputs.Mg}} | |
| Pg: ${{needs.setup_matrix.outputs.Pg}} | |
| strategy: | |
| matrix: | |
| version: ${{ fromjson(needs.setup_matrix.outputs.matrix-version)}} | |
| #version: ["8.2"] | |
| arch: [x64,x86] | |
| #arch: [x64] | |
| ts: [ts,nts] | |
| #ts: [ts] | |
| #ext: ["basic"] | |
| ext: ["basic","igbinary","msgpack"] | |
| steps: | |
| - name: vc15 | |
| if: matrix.version=='7.4' | |
| run: | | |
| env | |
| echo "Vs=vc15" >> $env:GITHUB_ENV | |
| - name: vs16 | |
| if: matrix.version!='7.4' | |
| run: | | |
| env | |
| echo "Vs=vs16" >> $env:GITHUB_ENV | |
| echo "github runner_id ${{github.run_id}},runtime_url: ${{ env.ACTIONS_RUNTIME_URL }}" | |
| # - name: set latest version | |
| # id: ts74-x64-msgpack | |
| # run: | | |
| # $response = Invoke-RestMethod -Method Get -Uri "https://api.github.com/repos/php-memcached-dev/php-memcached/releases/latest" | |
| # $tag=$response|select-object -ExpandProperty "tag_name" | |
| # $tag=$tag -replace "v","" | |
| # echo "memcached latest version:$tag" | |
| # echo "Pg=$tag" >> $env:GITHUB_ENV | |
| # $response = Invoke-RestMethod -Method Get -Uri "https://api.github.com/repos/msgpack/msgpack-php/releases/latest" | |
| # $tag=$response|select-object -ExpandProperty "tag_name" | |
| # $tag=$tag -replace "msgpack-","" | |
| # echo "msgpack latest version:$tag" | |
| # echo "Mg=$tag" >> $env:GITHUB_ENV | |
| # $response = Invoke-RestMethod -Method Get -Uri "https://api.github.com/repos/igbinary/igbinary/releases/latest" | |
| # $tag=$response|select-object -ExpandProperty "tag_name" | |
| # echo "igbinary latest version:$tag" | |
| # echo "Ig=$tag" >> $env:GITHUB_ENV | |
| # - name: Setup the Artifact API environment | |
| # uses: actions/github-script@v6 | |
| # with: | |
| # script: "core.exportVariable(\"ACTIONS_RUNTIME_TOKEN\", process.env[\"ACTIONS_RUNTIME_TOKEN\"])\ncore.exportVariable(\"ACTIONS_RUNTIME_URL\", process.env[\"ACTIONS_RUNTIME_URL\"])\ncore.exportVariable(\"GITHUB_RETENTION_DAYS\", process.env[\"GITHUB_RETENTION_DAYS\"])" | |
| # - name: show env | |
| # run: | | |
| # echo "action runtime url=${{env.ACTIONS_RUNTIME_URL}}" | |
| # $header=@{ | |
| # "Authorization"="Bearer ${{env.ACTIONS_RUNTIME_TOKEN}}" | |
| # } | |
| # $response = Invoke-RestMethod -Method Get -Uri "${{env.ACTIONS_RUNTIME_URL}}_apis/pipelines/workflows/${{github.run_id}}/artifacts?api-version=6.0-preview" -Headers $header | |
| # $response|get-member | |
| # $counts = $response|select-object -ExpandProperty "count" | |
| # echo "counts:$counts" | |
| # echo "response =$response" | |
| # $content = $response.content | |
| # $rc=$response.rawContent | |
| # echo "$content,$rc" | |
| # $json = ConvertTo-Json $response | |
| # | |
| # $count = $json.count | |
| #1 $value=$json.value | |
| # echo "count value $count,value $value" | |
| - name: Setup PHP | |
| id: setup-php | |
| uses: php/setup-php-sdk@v0.10 | |
| with: | |
| version: ${{matrix.version}} | |
| arch: ${{matrix.arch}} | |
| ts: ${{matrix.ts}} | |
| deps: zlib,zip,libxml,libiconv,libjpeg,edit,libssl,libzip | |
| cache: true | |
| - name: Enable Developer Command Prompt | |
| uses: ilammy/msvc-dev-cmd@v1 | |
| with: | |
| arch: ${{matrix.arch}} | |
| toolset: ${{steps.setup-php.outputs.toolset}} | |
| - name : show deps | |
| shell: cmd | |
| run: | | |
| dir /N /S ..\deps | |
| - name: get php source and deps | |
| run: | | |
| #if("${{matrix.version}}" -eq "8.2" -and "${{env.Pg}}" -eq "3.2.0"){ | |
| # echo "3.2.0不支持php8.2" | |
| #}else{ | |
| phpsdk_buildtree.bat ${{matrix.version}}-${{matrix.arch}} | |
| echo "copy cmdb deps to phpsource deps" | |
| xcopy /S /E ..\deps ${{matrix.version}}-${{matrix.arch}}\${{env.Vs}}\${{matrix.arch}}\deps | |
| echo "get latest php version" | |
| curl https://windows.php.net/downloads/releases/releases.json -o r.json | |
| $CLRJson = Get-Content -Raw -Path "r.json" | ConvertFrom-Json | |
| $version = $CLRJson."${{matrix.version}}".version | |
| rm r.json | |
| cd ${{matrix.version}}-${{matrix.arch}}/${{env.Vs}}/${{matrix.arch}} | |
| echo "get latest php source code" | |
| curl https://windows.php.net/downloads/releases/php-$version-src.zip -o ${{matrix.version}}-${{matrix.arch}}-${{matrix.ts}}-${{matrix.ext}}.zip | |
| if("${{matrix.version}}" -eq "7.4"){ | |
| $tmp_path="php-"+$version+"-src" | |
| echo "tmp_path:$tmp_path" | |
| mkdir $tmp_path | |
| 7z x ${{matrix.version}}-${{matrix.arch}}-${{matrix.ts}}-${{matrix.ext}}.zip -otmp_php | |
| Get-ChildItem -Path tmp_php\* -Recurse | Move-Item -Destination $tmp_path | |
| Get-ChildItem -Path $tmp_path | |
| }else{ | |
| 7z x ${{matrix.version}}-${{matrix.arch}}-${{matrix.ts}}-${{matrix.ext}}.zip # | |
| } | |
| Get-ChildItem -Path . | |
| rm ${{matrix.version}}-${{matrix.arch}}-${{matrix.ts}}-${{matrix.ext}}.zip | |
| cd php-$version-src | |
| echo "get memcached dependency" | |
| curl https://github.com/lifenglsf/libmemcached-window-dll-lib/blob/main/${{matrix.arch}}.zip?raw=true -o ${{matrix.arch}}.zip | |
| 7z x ${{matrix.arch}}.zip -odeps | |
| xcopy /S /E /Y deps ..\deps | |
| rm ${{matrix.arch}}.zip | |
| dir | |
| remove-item .\deps -Recurse | |
| echo "get memcached ext source code" | |
| curl https://codeload.github.com/php-memcached-dev/php-memcached/zip/refs/heads/master -o m.zip | |
| 7z x m.zip | |
| xcopy /S /E /Y php-memcached-${{env.Pg}} ..\deps\include | |
| md .\ext\memcached | |
| xcopy /S /E /Y php-memcached-${{env.Pg}} ext\memcached | |
| rm m.zip | |
| remove-item .\php-memcached-master -Recurse | |
| if("${{matrix.ext}}" -eq "basic"){ | |
| .\buildconf.bat | |
| if("${{matrix.ts}}" -eq "nts"){ | |
| .\configure --enable-memcached=shared --enable-memcached-session --enable-memcached-json --with-php-build=..\deps --disable-zts | |
| }else{ | |
| .\configure --enable-memcached=shared --enable-memcached-session --enable-memcached-json --with-php-build=..\deps | |
| } | |
| } | |
| if("${{matrix.ext}}" -eq "msgpack"){ | |
| curl https://github.com/msgpack/msgpack-php/archive/refs/tags/msgpack-${{env.Mg}}.zip -o msgpack.zip | |
| 7z x msgpack.zip | |
| xcopy /S /E /Y msgpack-php-msgpack-${{env.Mg}} ..\deps\include | |
| md .\ext\msgpack | |
| xcopy /S /E /Y msgpack-php-msgpack-${{env.Mg}} .\ext\msgpack | |
| remove-item .\msgpack-php-msgpack-${{env.Mg}} -Recurse | |
| .\buildconf.bat | |
| if("${{matrix.ts}}" -eq "nts"){ | |
| .\configure --enable-memcached=shared --enable-memcached-session --enable-memcached-json --enable-memcached-msgpack --enable-msgpack=shared --with-php-build=..\deps --disable-zts | |
| }else{ | |
| .\configure --enable-memcached=shared --enable-memcached-session --enable-memcached-json --enable-memcached-msgpack --enable-msgpack=shared --with-php-build=..\deps | |
| } | |
| } | |
| if("${{matrix.ext}}" -eq "igbinary"){ | |
| curl https://github.com/igbinary/igbinary/archive/refs/tags/${{env.Ig}}.zip -o igbinary.zip | |
| 7z x igbinary.zip | |
| xcopy /S /E /Y igbinary-${{env.Ig}} ..\deps\include | |
| md .\ext\igbinary | |
| xcopy /S /E /Y igbinary-${{env.Ig}} .\ext\igbinary | |
| remove-item .\igbinary-${{env.Ig}} -Recurse | |
| .\buildconf.bat | |
| if("${{matrix.ts}}" -eq "nts"){ | |
| .\configure --enable-memcached=shared --enable-memcached-session --enable-memcached-json --enable-memcached-igbinary --enable-igbinary=shared --with-php-build=..\deps --disable-zts | |
| }else{ | |
| .\configure --enable-memcached=shared --enable-memcached-session --enable-memcached-json --enable-memcached-igbinary --enable-igbinary=shared --with-php-build=..\deps | |
| } | |
| } | |
| dir ext\memcached | |
| nmake | |
| mkdir -p ${{github.workspace}}\${{env.Pg}}-${{matrix.ext}}-php${{matrix.version}}-${{matrix.ts}}_${{matrix.arch}} | |
| copy ..\deps\bin\libmemcached.dll ${{github.workspace}}\${{env.Pg}}-${{matrix.ext}}-php${{matrix.version}}-${{matrix.ts}}_${{matrix.arch}} | |
| if('${{matrix.arch}}' -eq 'x86'){ | |
| if('${{matrix.ts}}' -eq 'nts'){ | |
| copy Release\php_memcached.dll ${{github.workspace}}\${{env.Pg}}-${{matrix.ext}}-php${{matrix.version}}-${{matrix.ts}}_${{matrix.arch}} | |
| }else{ | |
| copy Release_TS\php_memcached.dll ${{github.workspace}}\${{env.Pg}}-${{matrix.ext}}-php${{matrix.version}}-${{matrix.ts}}_${{matrix.arch}} | |
| } | |
| }else{ | |
| if('${{matrix.ts}}' -eq 'nts'){ | |
| copy x64\Release\php_memcached.dll ${{github.workspace}}\${{env.Pg}}-${{matrix.ext}}-php${{matrix.version}}-${{matrix.ts}}_${{matrix.arch}} | |
| }else{ | |
| copy x64\Release_TS\php_memcached.dll ${{github.workspace}}\${{env.Pg}}-${{matrix.ext}}-php${{matrix.version}}-${{matrix.ts}}_${{matrix.arch}} | |
| } | |
| } | |
| dir | |
| 7z a ${{github.workspace}}\${{env.Pg}}-${{matrix.ext}}-php${{matrix.version}}-${{matrix.ts}}_${{matrix.arch}}.7z ${{github.workspace}}\${{env.Pg}}-${{matrix.ext}}-php${{matrix.version}}-${{matrix.ts}}_${{matrix.arch}}\*.* | |
| #} | |
| - name: Accidentally upload to the same artifact via multiple jobs | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{env.Pg}}-${{matrix.ext}}-php${{matrix.version}}-${{matrix.ts}}_${{matrix.arch}} | |
| path: ${{ github.workspace }}\${{env.Pg}}-${{matrix.ext}}-php${{matrix.version}}-${{matrix.ts}}_${{matrix.arch}}.7z | |
| create_release: | |
| needs: [ts74-x64-msgpack] | |
| defaults: | |
| run: | |
| shell: cmd | |
| runs-on: windows-2019 | |
| env: | |
| Ig: ${{needs.ts74-x64-msgpack.outputs.Ig}} | |
| Pg: ${{needs.ts74-x64-msgpack.outputs.Pg}} | |
| Mg: ${{needs.ts74-x64-msgpack.outputs.Mg}} | |
| steps: | |
| - uses: actions/checkout@v3 | |
| # - name: Setup the Artifact API environment | |
| # uses: actions/github-script@v6 | |
| # with: | |
| # script: "core.exportVariable(\"ACTIONS_RUNTIME_TOKEN\", process.env[\"ACTIONS_RUNTIME_TOKEN\"])\ncore.exportVariable(\"ACTIONS_RUNTIME_URL\", process.env[\"ACTIONS_RUNTIME_URL\"])\ncore.exportVariable(\"GITHUB_RETENTION_DAYS\", process.env[\"GITHUB_RETENTION_DAYS\"])" | |
| # - name: show env | |
| # shell: powershell | |
| # run: | | |
| # echo "action runtime url=${{env.ACTIONS_RUNTIME_URL}}" | |
| # $header=@{ | |
| # "Authorization"="Bearer ${{env.ACTIONS_RUNTIME_TOKEN}}" | |
| # } | |
| # $response = Invoke-RestMethod -Method Get -Uri "${{env.ACTIONS_RUNTIME_URL}}_apis/pipelines/workflows/${{github.run_id}}/artifacts?api-version=6.0-preview" -Headers $header|ConvertTo-json | |
| # $json = $response|ConvertFrom-Json | |
| # $value = $json|select-object -ExpandProperty "value" | |
| # $count=$json|select-object -ExpandProperty "count" | |
| # echo "nums:$count" | |
| # Foreach($tmp in $value){ | |
| # $aname=$tmp|select-object -ExpandProperty "name" | |
| # $aurl=$tmp|select-object -ExpandProperty "fileContainerResourceUrl" | |
| # echo "items name:$aname" | |
| # echo "items url:$aurl" | |
| # $r = Invoke-RestMethod -Method Get -Uri "$aurl" -Headers $header | |
| # $c =$r|select-object -ExpandProperty "count" | |
| # echo "cc value $c" | |
| # $itemsList = $r|select-object -ExpandProperty "value" | |
| # foreach($items in $itemsList){ | |
| # echo "item:$items" | |
| # $itemType=$items|select-object -ExpandProperty "itemType" | |
| # $contentLocation=$items|select-object -ExpandProperty "contentLocation" | |
| # if($itemType -eq "file"){ | |
| # $file = Invoke-RestMethod -Method Get -Uri "$contentLocation" -Headers $header | |
| # echo "file response $file" | |
| # } | |
| # } | |
| # } | |
| # Get-ChildItem -Path ${{ github.workspace }} | |
| # curl "${{env.ACTIONS_RUNTIME_URL}}_apis/pipelines/workflows/${{github.run_id}}/artifacts?api-version=6.0-preview" -H "Authorization:Bearer ${{env.ACTIONS_RUNTIME_TOKEN}}" >a.json | |
| # cat a.json | |
| # - name: prepare release | |
| # shell: powershell | |
| # run: | | |
| # curl https://api.github.com/repos/lifenglsf/php_memcached_dll/actions/runs/${{github.run_id}}/artifacts -o r.json | |
| # Get-Content -Raw -Path "r.json" | |
| # $version="7.4","8.0","8.1" | |
| # $arch="x64","x86" | |
| # $ts="ts","nts" | |
| # $ext="basic","igbinary","msgpack" | |
| # $filepath=@() | |
| # $workspace = @() | |
| # Foreach($v in $version){ | |
| # Foreach($a in $arch){ | |
| # Foreach($t in $ts){ | |
| # Foreach($e in $ext){ | |
| # $tmp=-join("${{env.Pg}}","-",$e,"-","php",$v,"-",$t,"_",$a) | |
| # $filepath+=$tmp | |
| # $workspace+="${{ github.workspace }}" | |
| # } | |
| # } | |
| # } | |
| # } | |
| # $rpath=$filepath -join " " | |
| # $wpath=$workspace -join " " | |
| # echo "Release_path=$rpath" >> $env:GITHUB_ENV | |
| # echo "Workspace_path=$wpath" >> $env:GITHUB_ENV | |
| # curl ${{ env.ACTIONS_RUNTIME_URL }}_apis/pipelines/workflows/${{github.run_id}}/artifacts?api-version=6.0-preview -o a.json | |
| # cat a.json | |
| - name : download artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: ${{env.Pg}}-artifacts | |
| - name: Display structure of downloaded files | |
| run: ls -R | |
| - name: test | |
| shell: powershell | |
| run: | | |
| Get-ChildItem -Path ${{ github.workspace }}\${{env.Pg}}-artifacts -Recurse -Filter "*.7z" | |
| Get-ChildItem -Path ${{ github.workspace }}\${{env.Pg}}-artifacts -Recurse -Filter "*.7z"|Foreach-Object{ | |
| echo "filename:$_"; | |
| $oname=$_.name -replace ".7z","" | |
| $dir = $oname -replace "-","\" | |
| $dir = "auto"+"-"+$dir | |
| echo "oname:$oname,dir:$dir" | |
| $flag=(Test-Path $dir) | |
| echo "flag value $flag" | |
| if(-not ($flag)){ | |
| echo "dir not exists" | |
| mkdir -p $dir | |
| }else{ | |
| echo "dir exists" | |
| } | |
| 7z x $_.fullname | |
| $fflag=(Test-Path '.\ucrtbased.dll') | |
| if($fflag){ | |
| Remove-Item '.\ucrtbased.dll' | |
| } | |
| move-item -path libmemcached.dll -destination $dir -force | |
| move-item -path php_memcached.dll -destination $dir -force | |
| } | |
| remove-item ${{ github.workspace }}\${{env.Pg}}-artifacts -Recurse | |
| - name: git commit | |
| run: | | |
| git config --local user.name "GitHub Actions" | |
| git config --local user.email "actions@github.com" | |
| git add auto-${{env.Pg}}* && git commit --allow-empty -m "${{env.Pg}} automatic compilation" && git push origin master | |
| - name: delete_tag | |
| uses: dev-drprasad/delete-tag-and-release@v0.2.1 | |
| with: | |
| delete_release: true | |
| tag_name: nightly # tag name to delete | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: make release | |
| uses: actions/create-release@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token | |
| with: | |
| tag_name: nightly | |
| release_name: nightly | |
| body: | | |
| nightly | |
| prerelease: true | |
| draft: false | |
| # - name: nmake | |
| # run: | | |
| # nmake | |
| # - name: Checkout memcached | |
| # uses: actions/checkout@v3 | |
| # with: | |
| # repository: lifenglsf/php-memcached | |
| # ref: ${{ env.ver }} | |
| # - name: Setup PHP | |
| # id: setup-php | |
| # uses: cmb69/setup-php-sdk@v0.3 | |
| # with: | |
| # version: ${{matrix.version}} | |
| # arch: ${{matrix.arch}} | |
| # ts: ${{matrix.ts}} | |
| # deps: zlib | |
| # - name: Download deps | |
| # run: | | |
| # curl -L https://github.com/lifenglsf/libmemcached-window-dll-lib/blob/main/${{matrix.arch}}.zip?raw=true -o ${{matrix.arch}}.zip | |
| # 7z x ${{matrix.arch}}.zip -o..\deps | |
| # echo "stable version ${{ env.ver }}" | |
| # curl -L https://github.com/msgpack/msgpack-php/archive/refs/heads/master.zip -o msgpack.zip | |
| # 7z x msgpack.zip -o.\ | |
| # xcopy /S /E msgpack-php-master ..\deps\include | |
| # md.\ext\msgpack | |
| # xcopy /S /E msgpack-php-master .\ext\msgpack | |
| # dir ext /N /S | |
| # curl -L https://windows.php.net/downloads/pecl/releases/msgpack/${{env.Mg}}/php_msgpack-${{env.Mg}}-${{matrix.version}}-${{matrix.ts}}-${{env.Vs}}-${{matrix.arch}}.zip -o msgpack-php.zip | |
| # 7z x msgpack-php.zip -o.\msgpack_dll | |
| # copy msgpack_dll\php_msgpack.dll ${{steps.setup-php.outputs.prefix}}\ext | |
| # - name: Enable Developer Command Prompt | |
| # uses: ilammy/msvc-dev-cmd@v1 | |
| # with: | |
| # arch: ${{matrix.arch}} | |
| # toolset: ${{steps.setup-php.outputs.toolset}} | |
| # - name: phpize | |
| # run: | | |
| # phpize | |
| # - name: configure | |
| # run: | | |
| # configure --enable-memcached=shared --enable-memcached-session --enable-memcached-json --enable-memcached-msgpack --enable-msgpack=shared --with-php-build=..\deps --with-prefix=${{steps.setup-php.outputs.prefix}} --with-config-file-path=${{steps.setup-php.outputs.prefix}} | |
| # - name: make | |
| # run: nmake | |
| # - name: make install | |
| # run: nmake install | |
| # - name: copy ini | |
| # run: copy ${{steps.setup-php.outputs.prefix}}\php.ini-development ${{steps.setup-php.outputs.prefix}}\php.ini | |
| # - name: copy libmemcached | |
| # run: copy ..\deps\bin\libmemcached.dll ${{steps.setup-php.outputs.prefix}} | |
| # - name: set extension dir | |
| # run : echo extension_dir="${{steps.setup-php.outputs.prefix}}\ext"; >>${{steps.setup-php.outputs.prefix}}\php.ini | |
| # - name: show file | |
| # run: dir ${{steps.setup-php.outputs.prefix}} /N /S | |
| # - name: extension path | |
| # run: php -i|grep "extension_dir" | |
| # - name: add memcached msgpack ext | |
| # run : | | |
| # echo extension=msgpack; >>${{steps.setup-php.outputs.prefix}}\php.ini | |
| # echo extension=memcached; >>${{steps.setup-php.outputs.prefix}}\php.ini | |
| # - name: show ini config | |
| # run: php --ini | |
| # - name: php module | |
| # run: php -m | |
| # - name: copy file | |
| # run: | | |
| # mkdir -p ${{github.workspace}}\php-${{matrix.version}}-${{matrix.arch}}-${{matrix.ts}} | |
| # copy ..\deps\bin\libmemcached.dll ${{ github.workspace }}\php-${{matrix.version}}-${{matrix.arch}}-${{matrix.ts}} | |
| # copy ${{steps.setup-php.outputs.prefix}}\ext\php_memcached.dll ${{ github.workspace }}\php-${{matrix.version}}-${{matrix.arch}}-${{matrix.ts}} | |
| # dir ${{ github.workspace }} /N /S | |
| # 7z a ${{ github.workspace }}\php-${{ env.Ver }}-${{matrix.version}}-${{matrix.arch}}-${{matrix.ts}}.7z ${{ github.workspace }}\php-${{matrix.version}}-${{matrix.arch}}-${{matrix.ts}}\*.* | |
| # #- name: test | |
| # # run: nmake test | |
| # # - name: Accidentally upload to the same artifact via multiple jobs | |
| # # uses: actions/upload-artifact@v3 | |
| # # with: | |
| # # name: php-${{ env.Ver }}-${{matrix.version}}-${{matrix.arch}}-${{matrix.ts}} | |
| # # path: ${{ github.workspace }}\php-${{ env.Ver }}-${{matrix.version}}-${{matrix.arch}}-${{matrix.ts}}.7z | |
| # create_tag: | |
| # needs: [ts74-x64-msgpack] | |
| # defaults: | |
| # run: | |
| # shell: cmd | |
| # runs-on: windows-2019 | |
| # steps: | |
| # - name : download artifact | |
| # uses: marcofaggian/action-download-multiple-artifacts@v3.0.7 | |
| # with: | |
| # names: php-${{ env.Ver }}-7.4-x64-ts php-${{ env.Ver }}-8.0-x64-ts php-${{ env.Ver }}-8.1-x64-ts php-${{ env.Ver }}-7.4-x64-nts php-${{ env.Ver }}-8.0-x64-nts php-${{ env.Ver }}-8.1-x64-nts php-${{ env.Ver }}-7.4-x86-nts php-${{ env.Ver }}-8.0-x86-nts php-${{ env.Ver }}-8.1-x86-nts php-${{ env.Ver }}-7.4-x86-ts php-${{ env.Ver }}-8.0-x86-ts php-${{ env.Ver }}-8.1-x86-ts | |
| # paths: ${{ github.workspace }} ${{ github.workspace }} ${{ github.workspace }} ${{ github.workspace }} ${{ github.workspace }} ${{ github.workspace }} ${{ github.workspace }} ${{ github.workspace }} ${{ github.workspace }} ${{ github.workspace }} ${{ github.workspace }} ${{ github.workspace }} | |
| # #- name: delete_tag | |
| # # uses: dev-drprasad/delete-tag-and-release@v0.2.0 | |
| # # with: | |
| # # delete_release: true # default: false | |
| # # tag_name: ${{ env.Ver }} # tag name to delete | |
| # # env: | |
| # # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| # #- name: create release | |
| # # uses: ncipollo/release-action@v1 | |
| # # with: | |
| # # artifacts: "${{github.workspace}}\\php-${{ env.Ver }}-7.4-x64-ts.7z,${{github.workspace}}\\php-${{ env.Ver }}-8.0-x64-ts.7z,${{github.workspace}}\\php-${{ env.Ver }}-8.1-x64-ts.7z,${{github.workspace}}\\php-${{ env.Ver }}-7.4-x64-nts.7z,${{github.workspace}}\\php-${{ env.Ver }}-8.0-x64-nts.7z,${{github.workspace}}\\php-${{ env.Ver }}-8.1-x64-nts.7z,${{github.workspace}}\\php-${{ env.Ver }}-7.4-x86-ts.7z,${{github.workspace}}\\php-${{ env.Ver }}-8.0-x86-ts.7z,${{github.workspace}}\\php-${{ env.Ver }}-8.1-x86-ts.7z,${{github.workspace}}\\php-${{ env.Ver }}-7.4-x86-nts.7z,${{github.workspace}}\\php-${{ env.Ver }}-8.0-x86-nts.7z,${{github.workspace}}\\php-${{ env.Ver }}-8.1-x86-nts.7z" | |
| # # token: ${{ secrets.GITHUB_TOKEN }} | |
| # # tag: ${{ env.Ver }} |