Installer freezes in windows-2022 GitHub Action
Michele Locati
michele@locati.it
Fri Oct 18 20:58:34 GMT 2024
Hello everybody,
In a GitHub Action running on windows-2022 [1], I have a couple of
steps like this:
-
name: Download Cygwin installer
shell: pwsh
run: |
Invoke-WebRequest -Uri https://cygwin.com/setup-x86_64.exe
-OutFile C:\CygwinInstaller.exe
$expectedHash = (Invoke-WebRequest -Uri
https://cygwin.com/sha512.sum).ToString()
$actualHash = Get-FileHash -LiteralPath C:\CygwinInstaller.exe
-Algorithm SHA512
if (-not($expectedHash.ToLower().Contains("${$actualHash.Hash.ToLower()}
setup-x86_64.exe"))) {
throw 'Invalid hash of downloaded cygwin installer'
}
-
name: Install Cygwin
shell: cmd
run: >
C:\CygwinInstaller.exe
--root C:\cygwin
--local-package-dir C:\cygwin-packages
--packages wget,file,make,unzip,dos2unix,mingw64-x86_64-gcc-core,mingw64-x86_64-gcc-g++,mingw64-x86_64-headers,mingw64-x86_64-runtime
--site https://mirrors.kernel.org/sourceware/cygwin/
--only-site
--quiet-mode
--upgrade-also
--no-shortcuts
--no-admin
--no-replaceonreboot
--no-version-check
--no-write-registry
--verbose
The problem is that sometimes (but not always) the second step gets
stuck: absolutely nothing is printed (even if the --verbose option is
specified) and GitHub aborts the execution after a few hours.
Has anyone encountered this problem before? What could be the cause?
Is there a solution?
--
Michele
[1] https://github.com/mlocati/gettext-iconv-windows/blob/main/.github/workflows/build.yml
More information about the Cygwin
mailing list