use same version of openssl to build x64 and x86
authorDave Cramer <davecramer@gmail.com>
Fri, 10 May 2024 18:07:53 +0000 (14:07 -0400)
committerDave Cramer <davecramer@gmail.com>
Fri, 10 May 2024 18:07:53 +0000 (14:07 -0400)
.github/workflows/configuration.xml
.github/workflows/main.yml

index d807aa817bb08103dde0d49a5b93b3158235ab4e..760dc956a4c944cc1152596348c2eb19c847e688 100644 (file)
@@ -17,9 +17,9 @@
   </x86>
   <x64>
     <libpq version="y">
-      <include>c:\Program Files\PostgreSQL\16\include</include>
-      <lib>c:\Program Files\PostgreSQL\16\lib</lib>
-      <bin>c:\Program Files\PostgreSQL\16\bin</bin>
+      <include>d:\postgresql\include</include>
+      <lib>d:\postgresql\lib</lib>
+      <bin>d:\postgresql\bin</bin>
     </libpq>
     <setvcvars>
     </setvcvars>
index b981ce77cb5615c6a6edd922379aef4208b48ae1..699050de8376b1831581b0194b72e9e3b77ae697 100644 (file)
@@ -29,7 +29,7 @@ jobs:
     - uses: actions/checkout@v4
       with:
         repository: "postgres/postgres.git"
-        ref: 'master'
+        ref: 'REL_16_STABLE'
     - name: 'get meson'
       run: |
         python -m pip install meson
@@ -74,6 +74,12 @@ jobs:
       with:
         path: C:\OTHERBIN\openssl32
         key: Win32OpenSSL-3_3_0.exe
+    - name: Cache Win32OpenSSL64 for Win64Compile
+      uses: actions/cache@v4
+      id: cacheWin64OpenSSL-3_3
+      with:
+        path: C:\OTHERBIN\openssl64
+        key: Win64OpenSSL-3_3_0.exe
     - name: Cache winflexbison for Compile using msvc
       uses: actions/cache@v4
       id: cacheWinFlexBisonZip
@@ -98,6 +104,14 @@ jobs:
         retry-times: 5
         url: https://slproweb.com/download/Win32OpenSSL-3_3_0.exe
 
+    - name: Download openssl64 for win64 compile
+      if: ${{steps.cacheWin64OpenSSL.outputs.cache-hit != 'true'}}
+      uses: suisei-cn/actions-download-file@v1.6.0
+      id: downloadWin64OpenSSL3_3_3
+      with:
+        retry-times: 5
+        url: https://slproweb.com/download/Win64OpenSSL-3_3_0.exe
+  
     - name: Download pkgconfiglite for Compile using msvc and meson
       if: ${{steps.cachePkgConfigLiteZip.outputs.cache-hit != 'true'}}
       uses: suisei-cn/actions-download-file@v1.6.0
@@ -152,6 +166,10 @@ jobs:
       shell: cmd
       run: Win32OpenSSL-3_3_0.exe /sp /silent /dir=c:\openssl32
 
+    - name: Install Win32OpenSSL
+      shell: cmd
+      run: Win64OpenSSL-3_3_0.exe /sp /silent /dir=c:\openssl64
+  
       # Choco Install winflexbison
       # BUT the "crazy-max/ghaction-chocolatey@v2" "install pkgconfiglite" file download often times-out
     - name: Extract winflexbison and add the winflexbison directory to the PATH for Compile using msvc
@@ -186,10 +204,11 @@ jobs:
     - name : 'build postgres x64'
       if: ${{steps.cachePostgres.outputs.cache-hit != 'true'}}
       run: |
-        meson setup build --prefix=d:\postgresql
+        meson setup build -Dssl=openssl -Dextra_lib_dirs=c:\openssl64\lib\VC\x64\MT -Dextra_include_dirs=c:\openssl64\include --prefix=d:\postgresql
         cd build
         ninja
         ninja install
+        cp c:\openssl64\*.dll d:\postgresql\bin
     - name: install postgresql binary
       shell: cmd
       run: |