1
mirror of https://github.com/DarkFlippers/unleashed-firmware.git synced 2025-12-12 12:42:30 +04:00

github: workflow improvements (#3032)

* github: compact build: status reporting step
* github: build: matrix strategy
* debugging
* github: added version_token to /uploadfiles request
* github: reworked main build flow
* github: suppressed non-zero cp status
* github: build: fixed comment lookup; experimental changes to apps build order
* github: removed summary step for compact builds; united map analyzer steps
* fbt: added get_apiversion target; moved ext apps processing logic to AppBuildset
* ufbt: added missing global
* fbt: Moved incompatible app list to firmware config output
* fbt: cleaner extapps processing
* github: build: added automation for SDK publishing
This commit is contained in:
hedger
2023-09-05 14:49:39 +03:00
committed by GitHub
parent 0b806c2360
commit 452e27b05e
8 changed files with 167 additions and 88 deletions

View File

@@ -193,8 +193,19 @@ class AppManager:
raise FlipperManifestException(f"Duplicate app declaration: {app.appid}")
self.known_apps[app.appid] = app
def filter_apps(self, applist: List[str], hw_target: str):
return AppBuildset(self, applist, hw_target)
def filter_apps(
self,
*,
applist: List[str],
ext_applist: List[str],
hw_target: str,
):
return AppBuildset(
self,
hw_target=hw_target,
appnames=applist,
extra_ext_appnames=ext_applist,
)
class AppBuilderException(Exception):
@@ -211,6 +222,12 @@ class AppBuildset:
FlipperAppType.SETTINGS,
FlipperAppType.STARTUP,
)
EXTERNAL_APP_TYPES = (
FlipperAppType.EXTERNAL,
FlipperAppType.MENUEXTERNAL,
FlipperAppType.PLUGIN,
FlipperAppType.DEBUG,
)
@staticmethod
def print_writer(message):
@@ -219,16 +236,21 @@ class AppBuildset:
def __init__(
self,
appmgr: AppManager,
appnames: List[str],
hw_target: str,
appnames: List[str],
*,
extra_ext_appnames: List[str],
message_writer: Callable | None = None,
):
self.appmgr = appmgr
self.appnames = set(appnames)
self.incompatible_extapps, self.extapps = [], []
self._extra_ext_appnames = extra_ext_appnames
self._orig_appnames = appnames
self.hw_target = hw_target
self._writer = message_writer if message_writer else self.print_writer
self._process_deps()
self._process_ext_apps()
self._check_conflicts()
self._check_unsatisfied() # unneeded?
self._check_target_match()
@@ -271,6 +293,27 @@ class AppBuildset:
break
self.appnames.update(provided)
def _process_ext_apps(self):
extapps = [
app
for apptype in self.EXTERNAL_APP_TYPES
for app in self.get_apps_of_type(apptype, True)
]
extapps.extend(map(self.appmgr.get, self._extra_ext_appnames))
for app in extapps:
(
self.extapps
if app.supports_hardware_target(self.hw_target)
else self.incompatible_extapps
).append(app)
def get_ext_apps(self):
return self.extapps
def get_incompatible_ext_apps(self):
return self.incompatible_extapps
def _check_conflicts(self):
conflicts = []
for app in self.appnames: