Treasury & Bank Transfer Management System — سامانه مدیریت خزانه‌داری و حواله‌های بانکی

Add allowlisted NSIS build failure diagnostics in disposable Windows CI

davoodmehraban89 committed Oct 19, 2026 at 01:23 UTC 2b7234a57cd6229d510d3453aa78b579cca94aaf
1 file changed +24
.github/workflows/private-v6-builder-ephemeral-20261018.yml
+24
@@ -65,6 +65,30 @@ jobs:
65 WINDOWS_PATH_LENGTH='(?i)path too long|filename too long'
66 UNKNOWN_BUILDER_ERROR='(?i)error|failed|⨯'
67 }
68 + $specificClasses=[ordered]@{
69 + ASAR_ENTRY_MISSING='(?i)(?:Application entry file|main entry file|entry file.*does not exist)'
70 + ELECTRON_MAIN_MISSING='(?i)(?:main\.cjs.*not found|main\.js.*not found|entrypoint.*missing)'
71 + ELECTRON_APP_PACKAGE='(?i)(?:app\.asar.*does not exist|no app\.asar|invalid app package)'
72 + FILE_ALREADY_EXISTS='(?i)(?:file already exists|EEXIST)'
73 + PATH_IS_TOO_LONG='(?i)(?:ENAMETOOLONG|path too long|filename or extension is too long)'
74 + UNRESOLVED_DEPENDENCY='(?i)(?:unresolved dependenc|missing dependenc|cannot resolve)'
75 + APP_BUILDER_EXIT='(?i)(?:exit status [0-9]+|exit code [0-9]+|errorOut=)'
76 + CODE_SIGN_FAILURE='(?i)(?:failed to sign|signing failed|signtool.*error)'
77 + NSIS_MAKENSIS_FAILURE='(?i)(?:makensis.*failed|NSIS Error|failed to compile script)'
78 + INTEGRITY_FAILURE='(?i)(?:integrity checksum failed|incorrect integrity|checksum mismatch)'
79 + ZIP_FAILURE='(?i)(?:7zip.*error|failed to extract|archive corrupted)'
80 + RUNNER_RESOURCE_FAILURE='(?i)(?:out of memory|ENOMEM|disk full|ENOSPC)'
81 + WINDOWS_PROCESS_FAILURE='(?i)(?:spawn.*fail|The system cannot find|CreateProcess)'
82 + PACKAGING_REBUILD_FAILURE='(?i)(?:failed to rebuild|rebuilding native|node-gyp failed)'
83 + AFTER_PACK_HOOK_FAILURE='(?i)(?:afterPack.*fail|afterSign.*fail)'
84 + PUBLISH_FAILURE='(?i)(?:publish.*fail|upload.*fail)'
85 + }
86 + foreach($name in $specificClasses.Keys){
87 + Write-Host ('PRIVATE_QA_NSIS_SPECIFIC_'+$name+'='+[bool]($nsisText -match $specificClasses[$name]))
88 + }
89 + $shortCodes=[regex]::Matches($nsisText,'\\b(?:ERR_[A-Z0-9_]{4,64}|E(?:ACCES|PERM|NOENT|EXIST|CONNRESET|TIMEDOUT|NOTFOUND|NOSPC|NAMETOOLONG|PROTO|AI_AGAIN))\\b')
90 + $codes=@($shortCodes | ForEach-Object {$_.Value} | Select-Object -Unique | Select-Object -First 8)
91 + if($codes.Count -gt 0){Write-Host ('PRIVATE_QA_NSIS_SAFE_ERROR_CODES='+($codes -join ','))}
92 foreach($name in $knownClasses.Keys){
93 Write-Host ('PRIVATE_QA_NSIS_DIAGNOSTIC_'+$name+'='+[bool]($nsisText -match $knownClasses[$name]))
94 }