CI: build Windows on every push; a failed Windows build prints the compiler errors
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
1fd4081461
commit
748d58f036
2 files changed
+13
-1
No files matched your search
@@ -60,3 +60,8 @@ jobs:
|
|||||||
dart pub get
|
dart pub get
|
||||||
if ($LASTEXITCODE) { exit 1 }
|
if ($LASTEXITCODE) { exit 1 }
|
||||||
dart test test/updater_test.dart
|
dart test test/updater_test.dart
|
||||||
|
# The release build, without publishing: a broken Windows build shows
|
||||||
|
# here, not only on a tag.
|
||||||
|
- name: Windows build
|
||||||
|
shell: powershell
|
||||||
|
run: powershell -NoProfile -ExecutionPolicy Bypass -File tool/package_windows.ps1
|
||||||
@@ -27,7 +27,14 @@ function Invoke-Checked([string]$What, [scriptblock]$Cmd) {
|
|||||||
if (-not $SkipBuild) {
|
if (-not $SkipBuild) {
|
||||||
Push-Location $App
|
Push-Location $App
|
||||||
try {
|
try {
|
||||||
Invoke-Checked 'flutter build windows' { flutter build windows --release "--dart-define=APP_VERSION=$Version" }
|
flutter build windows --release "--dart-define=APP_VERSION=$Version"
|
||||||
|
if ($LASTEXITCODE -ne 0) {
|
||||||
|
# Flutter hides MSBuild's messages: rebuild verbosely and show only
|
||||||
|
# the compiler/linker errors, so CI logs say what broke.
|
||||||
|
$log = flutter build windows --release -v "--dart-define=APP_VERSION=$Version" 2>&1
|
||||||
|
$log | Select-String -Pattern 'error C\d+|error LNK\d+|fatal error|: error ' | ForEach-Object { $_.Line } | Select-Object -First 40
|
||||||
|
throw 'flutter build windows failed'
|
||||||
|
}
|
||||||
} finally { Pop-Location }
|
} finally { Pop-Location }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user