From b78e52c13ce8ca0b859e2ae26c86dd81b7505845 Mon Sep 17 00:00:00 2001 From: Sebastian Reimers Date: Tue, 16 Jan 2024 14:29:34 +0100 Subject: [PATCH 1/7] ci/win: try self build openssl --- .github/workflows/cmake_win.yml | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/.github/workflows/cmake_win.yml b/.github/workflows/cmake_win.yml index 3244235d2..337db7d0f 100644 --- a/.github/workflows/cmake_win.yml +++ b/.github/workflows/cmake_win.yml @@ -22,8 +22,7 @@ jobs: environment_script: "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\VC\\Auxiliary\\Build\\vcvars64.bat", generators: "Ninja", build: "Debug", - openssl: true, - disable_openssl: "OFF", + openssl: "VC-WIN64A", testing: true } - { @@ -32,8 +31,7 @@ jobs: environment_script: "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\VC\\Auxiliary\\Build\\vcvars64.bat", generators: "Ninja", build: "Release", - openssl: true, - disable_openssl: "OFF", + openssl: "VC-WIN64A", testing: true } - { @@ -42,9 +40,7 @@ jobs: environment_script: "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\VC\\Auxiliary\\Build\\vcvarsamd64_x86.bat", generators: "Ninja", build: "Debug", - openssl: false, - disable_openssl: "ON", - choco: "--x86", + openssl: "VC-WIN32", testing: false } - { @@ -53,18 +49,20 @@ jobs: environment_script: "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\VC\\Auxiliary\\Build\\vcvarsamd64_arm64.bat", generators: "Ninja", build: "Debug", - openssl: false, - disable_openssl: "ON", + openssl: "VC-WIN64-ARM", testing: false } steps: - uses: actions/checkout@v4 - - name: Install OpenSSL - if: ${{ matrix.config.openssl }} + - name: Build OpenSSL + shell: cmd run: | - choco install --no-progress ${{ matrix.config.choco }} openssl --version 3.1.1 + wget https://www.openssl.org/source/openssl-3.1.4.tar.gz + tar -xzf openssl-3.1.4.tar.gz && mv openssl-3.1.4 openssl + cd openssl && perl Configure ${{ matrix.config.openssl }} + cd openssl && nmake && nmake install - name: Build shell: cmd From 0f4c14fbfa68d194c86e23e6348b605e2ea16631 Mon Sep 17 00:00:00 2001 From: Sebastian Reimers Date: Tue, 16 Jan 2024 14:33:39 +0100 Subject: [PATCH 2/7] wip --- .github/workflows/cmake_win.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cmake_win.yml b/.github/workflows/cmake_win.yml index 337db7d0f..2df534242 100644 --- a/.github/workflows/cmake_win.yml +++ b/.github/workflows/cmake_win.yml @@ -59,10 +59,10 @@ jobs: - name: Build OpenSSL shell: cmd run: | - wget https://www.openssl.org/source/openssl-3.1.4.tar.gz - tar -xzf openssl-3.1.4.tar.gz && mv openssl-3.1.4 openssl - cd openssl && perl Configure ${{ matrix.config.openssl }} - cd openssl && nmake && nmake install + C:\msys64\usr\bin\wget.exe https://www.openssl.org/source/openssl-3.1.4.tar.gz + C:\msys64\usr\bin\tar.exe -xzf openssl-3.1.4.tar.gz + cd openssl-3.1.4 && perl Configure ${{ matrix.config.openssl }} + cd openssl-3.1.4 && nmake && nmake install - name: Build shell: cmd From 963ebd02a9cff8aefcc13d9f89564cb69f4a530a Mon Sep 17 00:00:00 2001 From: Sebastian Reimers Date: Tue, 16 Jan 2024 14:36:08 +0100 Subject: [PATCH 3/7] add nasm --- .github/workflows/cmake_win.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/cmake_win.yml b/.github/workflows/cmake_win.yml index 2df534242..f292b6f64 100644 --- a/.github/workflows/cmake_win.yml +++ b/.github/workflows/cmake_win.yml @@ -56,6 +56,8 @@ jobs: steps: - uses: actions/checkout@v4 + - uses: ilammy/setup-nasm@v1 + - name: Build OpenSSL shell: cmd run: | From 8502e3d6790220e752cffd5240bb298777d22bc6 Mon Sep 17 00:00:00 2001 From: Sebastian Reimers Date: Tue, 16 Jan 2024 14:40:55 +0100 Subject: [PATCH 4/7] call env script --- .github/workflows/cmake_win.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/cmake_win.yml b/.github/workflows/cmake_win.yml index f292b6f64..967c42c24 100644 --- a/.github/workflows/cmake_win.yml +++ b/.github/workflows/cmake_win.yml @@ -61,6 +61,7 @@ jobs: - name: Build OpenSSL shell: cmd run: | + call "${{ matrix.config.environment_script }}" C:\msys64\usr\bin\wget.exe https://www.openssl.org/source/openssl-3.1.4.tar.gz C:\msys64\usr\bin\tar.exe -xzf openssl-3.1.4.tar.gz cd openssl-3.1.4 && perl Configure ${{ matrix.config.openssl }} From ebef86df443c5120c57b918f9eb66c97559897ac Mon Sep 17 00:00:00 2001 From: Sebastian Reimers Date: Tue, 16 Jan 2024 14:44:41 +0100 Subject: [PATCH 5/7] fix path --- .github/workflows/cmake_win.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cmake_win.yml b/.github/workflows/cmake_win.yml index 967c42c24..3f84fe99f 100644 --- a/.github/workflows/cmake_win.yml +++ b/.github/workflows/cmake_win.yml @@ -64,8 +64,9 @@ jobs: call "${{ matrix.config.environment_script }}" C:\msys64\usr\bin\wget.exe https://www.openssl.org/source/openssl-3.1.4.tar.gz C:\msys64\usr\bin\tar.exe -xzf openssl-3.1.4.tar.gz - cd openssl-3.1.4 && perl Configure ${{ matrix.config.openssl }} - cd openssl-3.1.4 && nmake && nmake install + cd openssl-3.1.4 + perl Configure ${{ matrix.config.openssl }} + nmake && nmake install - name: Build shell: cmd From fde0cd3276dcaea54f4edd58fb99ac0d6d5dbca1 Mon Sep 17 00:00:00 2001 From: Sebastian Reimers Date: Tue, 16 Jan 2024 14:58:11 +0100 Subject: [PATCH 6/7] add cache --- .github/workflows/cmake_win.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/cmake_win.yml b/.github/workflows/cmake_win.yml index 3f84fe99f..feeee0064 100644 --- a/.github/workflows/cmake_win.yml +++ b/.github/workflows/cmake_win.yml @@ -58,6 +58,12 @@ jobs: - uses: ilammy/setup-nasm@v1 + - uses: actions/cache@v3 + id: openssl + with: + path: C:\\Program Files\OpenSSL + key: ${{ runner.os }}-${ matrix.config.openssl }-openssl-3.1.4 + - name: Build OpenSSL shell: cmd run: | From e200ff743ba6911b4814202c0b6eb952aecaab55 Mon Sep 17 00:00:00 2001 From: Sebastian Reimers Date: Tue, 16 Jan 2024 17:21:45 +0100 Subject: [PATCH 7/7] try to fix test/cmake --- test/CMakeLists.txt | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 7e2610395..185a7b0bc 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -159,16 +159,8 @@ endif() # Main target object # -set(LINKLIBS re ${OPENSSL_LIBRARIES}) -if(WIN32) - list(APPEND LINKLIBS qwave iphlpapi wsock32 ws2_32) -else() - list(APPEND LINKLIBS m ${RESOLV_LIBRARY}) -endif() - -if(ZLIB_FOUND) - list(APPEND LINKLIBS ZLIB::ZLIB) -endif() +set(LINKLIBS re) +list(APPEND LINKLIBS ${RE_LIBS}) add_executable(${PROJECT_NAME} ${SRCS}) set_property(TARGET ${PROJECT_NAME} PROPERTY ENABLE_EXPORTS 1)