From dc5332a1605dec8c1fedcb9f44e892b4ccdf5f79 Mon Sep 17 00:00:00 2001 From: otegami Date: Mon, 26 Jan 2026 17:09:44 +0800 Subject: [PATCH 1/3] windows: add verify-package job to test packaged artifact This adds a separate CI job that downloads and tests the packaged artifact to verify it works correctly for end users. The job: - Downloads the release-postgresql-18-x64 artifact - Verifies msgpack symbols are exported by libgroonga.dll - Verifies pgroonga.dll imports msgpack from libgroonga.dll - Runs the existing unit tests against the extracted package This helps catch issues like missing DLLs that wouldn't be detected during the build but would affect users downloading the package. Related: https://github.com/pgroonga/pgroonga/issues/490 Co-Authored-By: Claude Opus 4.5 --- .github/workflows/windows.yml | 89 +++++++++++++++++++++++++++++++---- 1 file changed, 81 insertions(+), 8 deletions(-) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 25c07531..e2fbbe7b 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -21,14 +21,14 @@ jobs: fail-fast: false matrix: include: - - postgresql-version-major: "14" - postgresql-version: "14.20-1" - - postgresql-version-major: "15" - postgresql-version: "15.15-1" - - postgresql-version-major: "16" - postgresql-version: "16.11-1" - - postgresql-version-major: "17" - postgresql-version: "17.7-1" + # - postgresql-version-major: "14" + # postgresql-version: "14.20-1" + # - postgresql-version-major: "15" + # postgresql-version: "15.15-1" + # - postgresql-version-major: "16" + # postgresql-version: "16.11-1" + # - postgresql-version-major: "17" + # postgresql-version: "17.7-1" - postgresql-version-major: "18" postgresql-version: "18.1-1" - groonga-main: "yes" @@ -270,3 +270,76 @@ jobs: bundle exec ruby ` -I${{ github.workspace }}\pgroonga-benchmark\lib ` test\run-test.rb + + verify-package: + name: Verify package + needs: test + runs-on: windows-latest + env: + PGROONGA_BENCHMARK_GEMFILE: ${{ github.workspace }}\pgroonga-benchmark\Gemfile + steps: + - name: Download artifact + uses: actions/download-artifact@v4 + with: + name: release-postgresql-18-x64 + path: artifact + - name: Extract package + run: | + Expand-Archive -Path artifact\*.zip -DestinationPath pgsql + - name: Verify msgpack symbols + shell: cmd + run: | + call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat" + echo === Checking msgpack symbols exported by libgroonga.dll === + dumpbin /exports pgsql\bin\libgroonga.dll | findstr /i msgpack + if errorlevel 1 ( + echo ERROR: No msgpack symbols found in libgroonga.dll + exit /b 1 + ) + echo === Checking pgroonga.dll imports === + dumpbin /imports pgsql\lib\pgroonga.dll | findstr /i msgpack + if errorlevel 1 ( + echo ERROR: pgroonga.dll does not import msgpack symbols + exit /b 1 + ) + echo === Verifying no separate msgpack DLL is required === + if exist pgsql\bin\msgpack*.dll ( + echo WARNING: Separate msgpack DLL found in bin directory + dir pgsql\bin\msgpack*.dll + ) else ( + echo OK: No separate msgpack DLL, msgpack is bundled in libgroonga.dll + ) + - uses: actions/checkout@v6 + - name: Run PostgreSQL + run: | + $Env:PATH = "$(Get-Location)\pgsql\bin;${Env:PATH}" + .\pgsql\bin\initdb ` + --encoding=UTF-8 ` + --locale=C ` + --pgdata=test-data ` + --username=pgroonga-test + Add-Content ` + -Path test-data\postgresql.conf ` + -Value "enable_partitionwise_join = on","max_prepared_transactions = 1","random_page_cost = 0" ` + -Encoding utf8 + .\pgsql\bin\pg_ctl start --pgdata=test-data + - uses: actions/checkout@v6 + with: + repository: pgroonga/benchmark + path: pgroonga-benchmark + - uses: ruby/setup-ruby@v1 + with: + ruby-version: ruby + bundler-cache: true + - name: Run unit test + run: | + $Env:PATH = "$(Get-Location)\pgsql\bin;${Env:PATH}" + $Env:PGUSER = "pgroonga-test" + Remove-Item test\test-streaming-replication.rb + bundle exec ruby ` + -I${{ github.workspace }}\pgroonga-benchmark\lib ` + test\run-test.rb + - name: Shutdown PostgreSQL + if: always() + run: | + .\pgsql\bin\pg_ctl stop --pgdata=test-data From f4ccbde079e442dee03c228a6659f0c25bef4e9d Mon Sep 17 00:00:00 2001 From: otegami Date: Tue, 27 Jan 2026 16:27:33 +0800 Subject: [PATCH 2/3] windows: gather diagnostic info instead of failing early Change verify-package to collect diagnostic information about the package contents: - List all DLLs in bin and lib directories - Show pgroonga.dll dependencies - Check for msgpack symbols (without failing) This helps investigate whether msgpack-c DLL is missing from the packaged artifact. Co-Authored-By: Claude Opus 4.5 --- .github/workflows/windows.yml | 31 +++++++++++++------------------ 1 file changed, 13 insertions(+), 18 deletions(-) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index e2fbbe7b..73da1986 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -286,29 +286,24 @@ jobs: - name: Extract package run: | Expand-Archive -Path artifact\*.zip -DestinationPath pgsql - - name: Verify msgpack symbols + - name: Inspect package contents shell: cmd run: | call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat" - echo === Checking msgpack symbols exported by libgroonga.dll === + echo === DLLs in bin directory === + dir pgsql\bin\*.dll + echo. + echo === DLLs in lib directory === + dir pgsql\lib\*.dll + echo. + echo === Checking pgroonga.dll dependencies === + dumpbin /dependents pgsql\lib\pgroonga.dll + echo. + echo === Checking msgpack symbols in libgroonga.dll === dumpbin /exports pgsql\bin\libgroonga.dll | findstr /i msgpack - if errorlevel 1 ( - echo ERROR: No msgpack symbols found in libgroonga.dll - exit /b 1 - ) - echo === Checking pgroonga.dll imports === + echo. + echo === Checking pgroonga.dll imports for msgpack === dumpbin /imports pgsql\lib\pgroonga.dll | findstr /i msgpack - if errorlevel 1 ( - echo ERROR: pgroonga.dll does not import msgpack symbols - exit /b 1 - ) - echo === Verifying no separate msgpack DLL is required === - if exist pgsql\bin\msgpack*.dll ( - echo WARNING: Separate msgpack DLL found in bin directory - dir pgsql\bin\msgpack*.dll - ) else ( - echo OK: No separate msgpack DLL, msgpack is bundled in libgroonga.dll - ) - uses: actions/checkout@v6 - name: Run PostgreSQL run: | From c83400475cfb68393b11ec38392377c606dd5005 Mon Sep 17 00:00:00 2001 From: otegami Date: Tue, 27 Jan 2026 16:52:28 +0800 Subject: [PATCH 3/3] windows: fix verify-package path issues - Checkout repos first before downloading artifact - Extract package to ..\pgsql (parent directory) to match test job - Update all paths to use ..\pgsql Co-Authored-By: Claude Opus 4.5 --- .github/workflows/windows.yml | 40 +++++++++++++++++------------------ 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 73da1986..105d27b0 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -278,6 +278,11 @@ jobs: env: PGROONGA_BENCHMARK_GEMFILE: ${{ github.workspace }}\pgroonga-benchmark\Gemfile steps: + - uses: actions/checkout@v6 + - uses: actions/checkout@v6 + with: + repository: pgroonga/benchmark + path: pgroonga-benchmark - name: Download artifact uses: actions/download-artifact@v4 with: @@ -285,30 +290,33 @@ jobs: path: artifact - name: Extract package run: | - Expand-Archive -Path artifact\*.zip -DestinationPath pgsql + Expand-Archive -Path artifact\*.zip -DestinationPath ..\pgsql - name: Inspect package contents shell: cmd run: | call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat" echo === DLLs in bin directory === - dir pgsql\bin\*.dll + dir ..\pgsql\bin\*.dll echo. echo === DLLs in lib directory === - dir pgsql\lib\*.dll + dir ..\pgsql\lib\*.dll echo. echo === Checking pgroonga.dll dependencies === - dumpbin /dependents pgsql\lib\pgroonga.dll + dumpbin /dependents ..\pgsql\lib\pgroonga.dll echo. echo === Checking msgpack symbols in libgroonga.dll === - dumpbin /exports pgsql\bin\libgroonga.dll | findstr /i msgpack + dumpbin /exports ..\pgsql\bin\libgroonga.dll | findstr /i msgpack echo. echo === Checking pgroonga.dll imports for msgpack === - dumpbin /imports pgsql\lib\pgroonga.dll | findstr /i msgpack - - uses: actions/checkout@v6 + dumpbin /imports ..\pgsql\lib\pgroonga.dll | findstr /i msgpack + - uses: ruby/setup-ruby@v1 + with: + ruby-version: ruby + bundler-cache: true - name: Run PostgreSQL run: | - $Env:PATH = "$(Get-Location)\pgsql\bin;${Env:PATH}" - .\pgsql\bin\initdb ` + $Env:PATH = "$(Get-Location)\..\pgsql\bin;${Env:PATH}" + ..\pgsql\bin\initdb ` --encoding=UTF-8 ` --locale=C ` --pgdata=test-data ` @@ -317,18 +325,10 @@ jobs: -Path test-data\postgresql.conf ` -Value "enable_partitionwise_join = on","max_prepared_transactions = 1","random_page_cost = 0" ` -Encoding utf8 - .\pgsql\bin\pg_ctl start --pgdata=test-data - - uses: actions/checkout@v6 - with: - repository: pgroonga/benchmark - path: pgroonga-benchmark - - uses: ruby/setup-ruby@v1 - with: - ruby-version: ruby - bundler-cache: true + ..\pgsql\bin\pg_ctl start --pgdata=test-data - name: Run unit test run: | - $Env:PATH = "$(Get-Location)\pgsql\bin;${Env:PATH}" + $Env:PATH = "$(Get-Location)\..\pgsql\bin;${Env:PATH}" $Env:PGUSER = "pgroonga-test" Remove-Item test\test-streaming-replication.rb bundle exec ruby ` @@ -337,4 +337,4 @@ jobs: - name: Shutdown PostgreSQL if: always() run: | - .\pgsql\bin\pg_ctl stop --pgdata=test-data + ..\pgsql\bin\pg_ctl stop --pgdata=test-data