scikit-build / scikit-ci-addons

Command line tool and a set of scripts useful to help drive CI
http://scikit-ci-addons.readthedocs.org/
Apache License 2.0
5 stars 9 forks source link

Set security protocol in Windows PowerShell install scripts #105

Closed tbirdso closed 1 year ago

tbirdso commented 1 year ago

Addresses errors where utilities could not be installed in PowerShell 7.2.9 due to the security protocol not being set.

It appears that SSL3 is obsolete and TLS 1.0 is deprecated. Both protocols are removed from the list of security protocols to try to set.

The previous error message was misleading and has been updated for better future proofing.

Resolves an issue in building ITK remote modules where SSL3 is not supported in PowerShell 7.2.9 in GitHub Actions windows-2022 runners, so PowerShell is not set to use TLS 1.2 for fetching sources from python.org, therefore fetching sometimes fails.

xref https://github.com/InsightSoftwareConsortium/itk-wasm/actions/runs/4053853776/jobs/6982667101

With these changes ITK module builds successfully fetch Python sources using install_python.ps1: https://github.com/tbirdso/ITKSplitComponents/actions/runs/4138506454/jobs/7154995112

cc @thewtex @jcfr

tbirdso commented 1 year ago

Note that this introduces an implicit requirement that windows/install_utils.ps1 is run with PowerShell 5.1 or higher (requiring .NET Framework 4.5 or higher) so that security protocol type enums can be interpreted. The current recommended LTS version of PowerShell is 7.2.