-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[ci] refactor: Cleanup tooling for handling arch build output <= Flutter v3.13.x #11399
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: main
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 |
|---|---|---|
|
|
@@ -678,50 +678,35 @@ this command. | |
| var hasMissingBuild = false; | ||
| var buildFailed = false; | ||
| String? arch; | ||
| const x64DirName = 'x64'; | ||
| const arm64DirName = 'arm64'; | ||
| if (platform.isWindows) { | ||
| arch = _abi == Abi.windowsX64 ? x64DirName : arm64DirName; | ||
| arch = switch (_abi) { | ||
| Abi.windowsX64 => 'x64', | ||
| Abi.windowsArm64 => 'arm64', | ||
| _ => null, | ||
| }; | ||
| } else if (platform.isLinux) { | ||
| // TODO(stuartmorgan): Support arm64 if that ever becomes a supported | ||
| // CI configuration for the repository. | ||
| // See: https://github.com/flutter/flutter/issues/114349 | ||
| arch = 'x64'; | ||
| } | ||
|
|
||
| if (arch == null) { | ||
| return _PlatformResult( | ||
| RunState.failed, | ||
| error: | ||
| 'Testing on platform and architecture "$_abi" as CMakeProjects is not supported.', | ||
|
Collaborator
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. This should be
Collaborator
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. I'm not sure what "as CMakeProjects" means exactly. This should probably just say "Google Test testing is not supported on $platformName $_abi." |
||
| ); | ||
| } | ||
|
|
||
| for (final RepositoryPackage example in plugin.getExamples()) { | ||
| var project = CMakeProject( | ||
| final project = CMakeProject( | ||
| example.directory, | ||
| buildMode: buildMode, | ||
| processRunner: processRunner, | ||
| platform: platform, | ||
| arch: arch, | ||
| ); | ||
| if (platform.isWindows) { | ||
| if (arch == arm64DirName && !project.isConfigured()) { | ||
| // Check for x64, to handle builds newer than 3.13, but that don't yet | ||
|
Collaborator
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. Per the previous discussion, AFAICT removing this particular block is still incorrect. Only the next block where it checks for the pre-3.13 structure is obsolete. |
||
| // have https://github.com/flutter/flutter/issues/129807. | ||
| // TODO(stuartmorgan): Remove this when CI no longer supports a | ||
| // version of Flutter without the issue above fixed. | ||
| project = CMakeProject( | ||
| example.directory, | ||
| buildMode: buildMode, | ||
| processRunner: processRunner, | ||
| platform: platform, | ||
| arch: x64DirName, | ||
| ); | ||
| } | ||
| if (!project.isConfigured()) { | ||
| // Check again without the arch subdirectory, since 3.13 doesn't | ||
| // have it yet. | ||
| // TODO(stuartmorgan): Remove this when CI no longer supports Flutter | ||
| // 3.13. | ||
| project = CMakeProject( | ||
| example.directory, | ||
| buildMode: buildMode, | ||
| processRunner: processRunner, | ||
| platform: platform, | ||
| ); | ||
| } | ||
| } | ||
| if (!project.isConfigured()) { | ||
| printError( | ||
| 'ERROR: Run "flutter build" on ${example.displayName}, ' | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
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.
I used this check, to be more explicit and perhaps its easier in the future to unify the handling for Linux and Windows in the same switch statement.