From ebe639d82ef3985593a9c3f3e70180c50c0529e7 Mon Sep 17 00:00:00 2001 From: Fernando Herrero Date: Tue, 27 Feb 2024 23:27:45 +0100 Subject: [PATCH 1/5] Publish windows binaries --- .editorconfig | 20 +++++++++++++ .github/workflows/ci.yml | 65 ++++++++++++++++++++++++++++++++++++---- 2 files changed, 80 insertions(+), 5 deletions(-) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..d39b1b0 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,20 @@ +# EditorConfig is awesome: https://EditorConfig.org + +# top-most EditorConfig file +root = true + +[*] +indent_style = tab +indent_size = 2 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = false + +[*.yml] +indent_style = space +indent_size = 2 + +[*.php] +indent_style = space +indent_size = 4 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2e01faf..b4f4fb9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,13 +7,22 @@ jobs: shell: cmd strategy: matrix: - version: ['8.0', '8.1'] - arch: [x64, x86] - ts: [ts] - runs-on: windows-2019 + version: ['8.3'] + arch: [x64] + ts: [ts] + runs-on: windows-latest steps: - name: Checkout xmlrpc - uses: actions/checkout@v2 + uses: actions/checkout@v4 + - name: Extract Version + shell: powershell + run: | + chcp 65001 + $r = Select-String -Path php_xmlrpc.h -Pattern 'PHP_XMLRPC_VERSION\s+"(.*)"' + $s = $r.Matches[0].Groups[1] + echo "$s" + $extension_version = 'EXTENSION_VERSION=' + $s + echo $extension_version >> $env:GITHUB_ENV - name: Setup PHP id: setup-php uses: cmb69/setup-php-sdk@v0.3 @@ -36,3 +45,49 @@ jobs: run: nmake - name: test run: nmake test TESTS="-g FAIL,SKIP --show-diff tests" + - name: Define Module Env + shell: powershell + run: | + chcp 65001 + + $dir = (Get-Location).Path + '\' + if ('x64' -eq '${{matrix.arch}}') { $dir = $dir + 'x64\' } + $dir = $dir + 'Release' + if ('ts' -eq '${{matrix.ts}}') { $dir = $dir + '_TS' } + + $artifact_name = 'php_xmlrpc-${{env.EXTENSION_VERSION}}-${{matrix.version}}' + + if ('ts' -eq '${{matrix.ts}}') { $artifact_name = $artifact_name + '-ts' } + if ('nts' -eq '${{matrix.ts}}') { $artifact_name = $artifact_name + '-nts' } + + if ('7.2' -eq '${{matrix.version}}') { $artifact_name = $artifact_name + '-vc15' } + if ('7.3' -eq '${{matrix.version}}') { $artifact_name = $artifact_name + '-vc15' } + if ('7.4' -eq '${{matrix.version}}') { $artifact_name = $artifact_name + '-vc15' } + if ('8.0' -eq '${{matrix.version}}') { $artifact_name = $artifact_name + '-vs16' } + if ('8.1' -eq '${{matrix.version}}') { $artifact_name = $artifact_name + '-vs16' } + if ('8.2' -eq '${{matrix.version}}') { $artifact_name = $artifact_name + '-vs16' } + if ('8.3' -eq '${{matrix.version}}') { $artifact_name = $artifact_name + '-vs16' } + + if ('x64' -eq '${{matrix.arch}}') { $artifact_name = $artifact_name + '-x64' } + if ('x86' -eq '${{matrix.arch}}') { $artifact_name = $artifact_name + '-x86' } + + $extension_artifact_name = "ARTIFACT_NAME=" + $artifact_name + echo $extension_artifact_name >> $env:GITHUB_ENV + + $from = $dir + '\php_xmlrpc.dll' + $to = $from + ".zip" + Compress-Archive $from $to + $extension_artifact = "ARTIFACT=" + $from + echo $extension_artifact >> $env:GITHUB_ENV + + - name: Upload artifacts + uses: actions/upload-artifact@v4 + with: + name: ${{env.ARTIFACT_NAME}} + path: ${{env.ARTIFACT}} + - name: Publish Binaries to Release + if: ${{ startsWith(github.ref, 'refs/tags') }} + uses: svenstaro/upload-release-action@v2 + with: + asset_name: ${{env.ARTIFACT_NAME}}.zip + file: ${{env.ARTIFACT}}.zip From e0bbcfbbdd1aff9657c8d5395170ab792b5b85f8 Mon Sep 17 00:00:00 2001 From: Fernando Herrero Date: Tue, 27 Feb 2024 23:34:01 +0100 Subject: [PATCH 2/5] Fix setup-php --- .github/workflows/ci.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b4f4fb9..003d5e7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,13 +25,12 @@ jobs: echo $extension_version >> $env:GITHUB_ENV - name: Setup PHP id: setup-php - uses: cmb69/setup-php-sdk@v0.3 + uses: php/setup-php-sdk@v0.8 with: - version: ${{matrix.version}} - arch: ${{matrix.arch}} - ts: ${{matrix.ts}} - deps: libiconv, libxml2 - - run: tree /a /f deps/include + version: ${{matrix.version}} + arch: ${{matrix.arch}} + ts: ${{matrix.ts}} + deps: "libiconv,libxml2" - name: Enable Developer Command Prompt uses: ilammy/msvc-dev-cmd@v1 with: From c9f03c487c2a8f37a6647402a1553f38571f5211 Mon Sep 17 00:00:00 2001 From: Fernando Herrero Date: Tue, 27 Feb 2024 23:41:16 +0100 Subject: [PATCH 3/5] Full php-8 matrix --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 003d5e7..06e477f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,9 +7,9 @@ jobs: shell: cmd strategy: matrix: - version: ['8.3'] - arch: [x64] - ts: [ts] + version: ['8.0', '8.1', '8.2', '8.3'] + arch: [x64, x86] + ts: [ts, nts] runs-on: windows-latest steps: - name: Checkout xmlrpc From 195812bbcc19093d821ce01ac7b09af1c4200985 Mon Sep 17 00:00:00 2001 From: Fernando Herrero Date: Thu, 28 Nov 2024 12:02:20 +0100 Subject: [PATCH 4/5] Added php-8.4 branch --- .github/workflows/ci.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 06e477f..b75ecb1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,7 +7,7 @@ jobs: shell: cmd strategy: matrix: - version: ['8.0', '8.1', '8.2', '8.3'] + version: ['8.0', '8.1', '8.2', '8.3', '8.4'] arch: [x64, x86] ts: [ts, nts] runs-on: windows-latest @@ -43,7 +43,7 @@ jobs: - name: make run: nmake - name: test - run: nmake test TESTS="-g FAIL,SKIP --show-diff tests" + run: nmake test TESTS="--show-diff tests" - name: Define Module Env shell: powershell run: | @@ -66,6 +66,7 @@ jobs: if ('8.1' -eq '${{matrix.version}}') { $artifact_name = $artifact_name + '-vs16' } if ('8.2' -eq '${{matrix.version}}') { $artifact_name = $artifact_name + '-vs16' } if ('8.3' -eq '${{matrix.version}}') { $artifact_name = $artifact_name + '-vs16' } + if ('8.4' -eq '${{matrix.version}}') { $artifact_name = $artifact_name + '-vs17' } if ('x64' -eq '${{matrix.arch}}') { $artifact_name = $artifact_name + '-x64' } if ('x86' -eq '${{matrix.arch}}') { $artifact_name = $artifact_name + '-x86' } From b0120dbac5a8928c488372da367d50f1565234fd Mon Sep 17 00:00:00 2001 From: Fernando Herrero Date: Thu, 28 Nov 2024 12:03:40 +0100 Subject: [PATCH 5/5] update php/setup-php-sdk to v0.10 --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b75ecb1..311b7bf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,7 +25,7 @@ jobs: echo $extension_version >> $env:GITHUB_ENV - name: Setup PHP id: setup-php - uses: php/setup-php-sdk@v0.8 + uses: php/setup-php-sdk@v0.10 with: version: ${{matrix.version}} arch: ${{matrix.arch}}