From fbee8f43d3566ac7824f3cd0df620f4ce26cd90f Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 29 Apr 2026 05:03:19 +0000 Subject: [PATCH 1/2] Initial plan From ae61f735e8a7cb780fc5de50a6e5322e47d7ce78 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 29 Apr 2026 05:04:54 +0000 Subject: [PATCH 2/2] Fix Windows CI: harden OpenSSL install step and CMake bundling - Retry choco install openssl.light up to 3 times with 20s delay - Only export OPENSSL_ROOT when openssl.exe actually exists - Check file existence before install(FILES ...) in CMakeLists.txt - Emit CMake WARNING and skip bundling when files are missing Agent-Logs-Url: https://github.com/Range-Software/range-fea/sessions/4f20a97f-0645-4e88-b88c-8f7c62f41dc1 Co-authored-by: tomas-soltys <17273282+tomas-soltys@users.noreply.github.com> --- .github/workflows/ci.yml | 23 +++++++++++++++++++---- src/CMakeLists.txt | 13 ++++++++++--- 2 files changed, 29 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 614306b..e4f3718 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -79,11 +79,26 @@ jobs: - name: Install OpenSSL (Windows) if: startsWith(matrix.os, 'windows-') - run: | - choco install openssl.light -y --params "/InstallDir:C:\OpenSSL" || echo "OpenSSL may already be installed" - # Persist OPENSSL_ROOT for later CMake configure step - Write-Output "OPENSSL_ROOT=C:\OpenSSL" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append shell: pwsh + run: | + $ErrorActionPreference = 'Stop' + $installDir = 'C:\OpenSSL' + $max = 3 + for ($i = 1; $i -le $max; $i++) { + try { + choco install openssl.light -y --params "/InstallDir:$installDir" + break + } catch { + if ($i -eq $max) { throw } + Write-Host "OpenSSL install failed (attempt $i/$max). Retrying in 20s..." + Start-Sleep -Seconds 20 + } + } + if (Test-Path "$installDir\bin\openssl.exe") { + "OPENSSL_ROOT=$installDir" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + } else { + Write-Host "OpenSSL not found at $installDir; not setting OPENSSL_ROOT." + } # Qt - name: Install Qt 6.10.2 + QtIFW diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 8076670..dd807c8 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -283,9 +283,16 @@ if(WIN32) install(DIRECTORY ${_qt_deploy_dir}/ DESTINATION bin COMPONENT Application) install(FILES ${CMAKE_BINARY_DIR}/LICENSE.txt DESTINATION doc COMPONENT Application) if(OPENSSL_ROOT) - install(FILES ${OPENSSL_ROOT}/bin/openssl.exe DESTINATION bin COMPONENT Application) - install(FILES ${OPENSSL_ROOT}/bin/libcrypto-3-x64.dll DESTINATION bin COMPONENT Application) - install(FILES ${OPENSSL_ROOT}/bin/libssl-3-x64.dll DESTINATION bin COMPONENT Application) + set(_openssl_exe "${OPENSSL_ROOT}/bin/openssl.exe") + set(_openssl_crypto "${OPENSSL_ROOT}/bin/libcrypto-3-x64.dll") + set(_openssl_ssl "${OPENSSL_ROOT}/bin/libssl-3-x64.dll") + if(EXISTS "${_openssl_exe}" AND EXISTS "${_openssl_crypto}" AND EXISTS "${_openssl_ssl}") + install(FILES "${_openssl_exe}" DESTINATION bin COMPONENT Application) + install(FILES "${_openssl_crypto}" DESTINATION bin COMPONENT Application) + install(FILES "${_openssl_ssl}" DESTINATION bin COMPONENT Application) + else() + message(WARNING "OPENSSL_ROOT is set to '${OPENSSL_ROOT}', but required OpenSSL runtime files were not found. Skipping bundling OpenSSL into the installer.") + endif() endif() elseif(APPLE) install(DIRECTORY ${CMAKE_BINARY_DIR}/${PROJECT_TARGET_NAME}/${PROJECT_SHORT_REL_NAME}.app DESTINATION . USE_SOURCE_PERMISSIONS COMPONENT Application)