-
Notifications
You must be signed in to change notification settings - Fork 4k
compiler: add retry loop and enable allowEmptyChecksums on Windows #12962
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,20 @@ | ||
| choco feature enable -n allowEmptyChecksums | ||
|
|
||
| set RETRY=0 | ||
| :install_pkgconfig | ||
| choco install -y pkgconfiglite --allow-empty-checksums | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| if %ERRORLEVEL% neq 0 ( | ||
| if %RETRY% lss 3 ( | ||
| set /a RETRY=%RETRY%+1 | ||
| echo pkgconfiglite installation failed. Retrying %RETRY% of 3 in 5 seconds... | ||
| @rem Sleep for 5 seconds using the loopback ping trick (timeout command fails in non-interactive CI) | ||
| ping -n 6 127.0.0.1 >nul | ||
| goto :install_pkgconfig | ||
| ) | ||
| echo Failed to install pkgconfiglite after 3 attempts. | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should either loop 2 times for this statement to hold true. Or we can say here- |
||
| exit /b 1 | ||
| ) | ||
|
|
||
| choco install -y openjdk --version=17.0 | ||
| set PATH=%PATH%;"c:\Program Files\OpenJDK\jdk-17\bin" | ||
| set PROTOBUF_VER=35.1 | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this modifies the global Chocolatey state, do we need to disable it (
choco feature disable -n allowEmptyChecksums) after the installation finishes? Or is it safe to leave it permanently enabled?