Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci/win: try self build openssl #1056

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 20 additions & 12 deletions .github/workflows/cmake_win.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
- {
Expand All @@ -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
}
- {
Expand All @@ -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
}
- {
Expand All @@ -53,18 +49,30 @@ 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 }}
- 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: |
choco install --no-progress ${{ matrix.config.choco }} openssl --version 3.1.1
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 }}
nmake && nmake install

- name: Build
shell: cmd
Expand Down
12 changes: 2 additions & 10 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Loading