Fix Windows CI: harden OpenSSL install retry and make CPack resilient to missing OpenSSL files#12
Merged
Conversation
- 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>
tomas-soltys
approved these changes
Apr 29, 2026
Copilot
AI
changed the title
[WIP] Fix failing Windows GitHub Actions job by hardening OpenSSL install
Fix Windows CI: harden OpenSSL install retry and make CPack resilient to missing OpenSSL files
Apr 29, 2026
Copilot stopped work on behalf of
tomas-soltys due to an error
April 29, 2026 05:06
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Chocolatey transient 504s on
openssl.lightleftOPENSSL_ROOT=C:\OpenSSLunconditionally set inGITHUB_ENV, causing CPack to hard-fail when it couldn't find the binaries that never got installed..github/workflows/ci.ymlchoco install openssl.lightin a retry loop (3 attempts, 20 s back-off) to survive transient feed timeoutsOPENSSL_ROOTtoGITHUB_ENVwhenC:\OpenSSL\bin\openssl.exeis actually present after installationsrc/CMakeLists.txtinstall(FILES ...)block withif(EXISTS ...)checks on all three OpenSSL files (openssl.exe,libcrypto-3-x64.dll,libssl-3-x64.dll)message(WARNING ...)and skip bundling when files are absent, so CPack completes rather than errors outOriginal prompt
Repo: Range-Software/range-fea
Goal: Fix failing Windows GitHub Actions job by implementing both:
Context:
Required changes:
A) Update .github/workflows/ci.yml
choco install openssl.light -y --params "/InstallDir:C:\OpenSSL" || echo ...and always writes OPENSSL_ROOT=C:\OpenSSL to GITHUB_ENV).choco install openssl.lightup to 3 times with a delay (e.g., 20s) on failure.C:\OpenSSL\bin\openssl.exe.OPENSSL_ROOT=C:\OpenSSLto$env:GITHUB_ENVif the file exists; otherwise logs that OpenSSL is not present and does not set OPENSSL_ROOT.$ErrorActionPreference='Stop'and proper try/catch.B) Update src/CMakeLists.txt
if(OPENSSL_ROOT) install(FILES ...)logic with existence checks:${OPENSSL_ROOT}/bin/openssl.exe,${OPENSSL_ROOT}/bin/libcrypto-3-x64.dll,${OPENSSL_ROOT}/bin/libssl-3-x64.dllinstall(FILES ...)if all three exist.message(WARNING ...)indicating OPENSSL_ROOT is set but files are missing and OpenSSL bundling is being skipped.Acceptance criteria:
Please create a PR with these changes.
The following is the prior conversation context from the user's chat exploration (may be truncated):
User: Please find a solution for this failing job. Use the logs, job definition, and any referenced files where the failure occurred. Keep your response focused on the solution and include code suggestions when appropriate.
Assistant: The Windows job is failing during packaging/install because the workflow’s OpenSSL install step is unreliable (Chocolatey feed timeout), and your CMake install rules assume OpenSSL files exist at
C:\OpenSSL\bin\.... When Chocolatey fails,OPENSSL_ROOTstill gets set toC:\OpenSSL, so CPack later tries to install:C:/OpenSSL/bin/openssl.exeC:/OpenSSL/bin/libcrypto-3-x64.dllC:/OpenSSL/bin/libssl-3-x64.dll…and errors out in
cmake_install.cmakewith messages like:file INSTALL cannot find "C:/OpenSSL/bin/openssl.exe".Fix: make OpenSSL “presence” explicit and only install it when the files actually exist
1) Harden the workflow OpenSSL step (Windows)
Replace the current Windows OpenSSL step in
.github/workflows/ci.yml(lines ~80–86 in the log-referenced file) with a version that:OPENSSL_ROOTif the expected binaries exist.Why this helps: it prevents “lying” to CMake/CPack about
OPENSSL_ROOTwhen the install didn’t actually succeed.2) Harden the CMake install rules on Windows
In
src/CMakeLists.txt, you currently do:Change this to check file existence before attempting to install, an...
This pull request was created from Copilot chat.