diff options
author | Cristian Adam <cristian.adam@qt.io> | 2020-02-21 16:10:07 +0100 |
---|---|---|
committer | Alessandro Portale <alessandro.portale@qt.io> | 2020-02-21 16:08:42 +0000 |
commit | 63b0c79a46538e39eb73e7d364bae8f6205fce92 (patch) | |
tree | 12a9d9e4f253031c0e988e207de38b6b913ac5bb | |
parent | b858e58d3f223c7e04756bd24415a9d66a63912c (diff) | |
download | qt-creator-63b0c79a46538e39eb73e7d364bae8f6205fce92.tar.gz |
GitHub Actions: Add OpenSSL to resulted test artifacts
Change-Id: Ieec647abc87f87de79ef07c12378a2a32e783d8e
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
-rw-r--r-- | .github/workflows/build_cmake.yml | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/.github/workflows/build_cmake.yml b/.github/workflows/build_cmake.yml index 3926da6b0c..5722143c04 100644 --- a/.github/workflows/build_cmake.yml +++ b/.github/workflows/build_cmake.yml @@ -168,6 +168,47 @@ jobs: string(REPLACE "licheck_mac" "" qtconfig "${qtconfig}") file(WRITE "qt5/${qt_dir_prefix}/mkspecs/qconfig.pri" "${qtconfig}") + - name: Download OpenSSL + shell: cmake -P {0} + run: | + if ("${{ runner.os }}" STREQUAL "Windows") + set(url_os "windows_x86") + set(openssl_localdir "Tools/OpenSSL/Win_x64/bin") + set(openssl_dest_dir "instdir/bin") + set(shared_suffix ".dll") + elseif ("${{ runner.os }}" STREQUAL "Linux") + set(url_os "linux_x64") + set(openssl_localdir "Tools/OpenSSL/binary/lib") + set(openssl_dest_dir "instdir/lib/Qt/lib") + set(shared_suffix ".so*") + elseif ("${{ runner.os }}" STREQUAL "macOS") + # Not needed on macOS + return() + endif() + + set(openssl_base_url "https://download.qt.io/online/qtsdkrepository/${url_os}/desktop/tools_openssl_x64") + file(DOWNLOAD "${openssl_base_url}/Updates.xml" ./Updates.xml SHOW_PROGRESS) + + file(READ ./Updates.xml updates_xml) + string(REGEX MATCH + "<Name>(qt.tools.openssl.*)</Name>.*<Version>([0-9+-.]+)</Version>.*<DownloadableArchives>(.*)</DownloadableArchives>" updates_xml_output "${updates_xml}") + + set(openssl_directory ${CMAKE_MATCH_1}) + set(openssl_version ${CMAKE_MATCH_2}) + set(openssl_archive ${CMAKE_MATCH_3}) + + set(url "${openssl_base_url}/${openssl_directory}/${openssl_version}${openssl_archive}") + + file(MAKE_DIRECTORY openssl) + file(MAKE_DIRECTORY ${openssl_dest_dir}) + + message("Downloading ${url}") + file(DOWNLOAD "${url}" ./openssl.7z SHOW_PROGRESS) + execute_process(COMMAND ${CMAKE_COMMAND} -E tar xvf ../openssl.7z WORKING_DIRECTORY openssl) + + file(GLOB openssl_shared_objects "openssl/${openssl_localdir}/*${shared_suffix}") + execute_process( + COMMAND ${CMAKE_COMMAND} -E copy ${openssl_shared_objects} ${openssl_dest_dir}) - name: Download libclang id: libclang |