[FL-2832] fbt: more fixes & improvements (#1854)

* github: bundling debug folder with scripts; docs: fixes & updates; fbt: added FAP_EXAMPLES variable to enable building example apps. Disabled by default. fbt: added TERM to list of proxied environment variables
* fbt: better help output; disabled implicit_deps_unchanged; added color to import validator reports
* fbt: moved debug configuration to separate tool
* fbt: proper dependency tracker for SDK source file; renamed linker script for external apps
* fbt: fixed debug elf path
* fbt: packaging sdk archive
* scripts: fixed sconsdist.py
* fbt: reworked sdk packing; docs: updates
* docs: info on cli target; linter fixes
* fbt: moved main code to scripts folder
* scripts: packing update into .tgz
* fbt, scripts: reworked copro_dist to build .tgz
* scripts: fixed naming for archived updater package
* Scripts: fix ぐるぐる回る

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
This commit is contained in:
hedger
2022-10-12 20:12:05 +04:00
committed by GitHub
parent afff1adf8f
commit eb4ff3c0fd
41 changed files with 413 additions and 272 deletions

View File

@@ -1,6 +1,5 @@
import SCons
from SCons.Platform import TempFileMunge
from fbt import util
from fbt.util import tempfile_arg_esc_func, single_quote, wrap_tempfile
import os
import multiprocessing
@@ -13,14 +12,18 @@ forward_os_env = {
}
# Proxying CI environment to child processes & scripts
variables_to_forward = [
# CI/CD variables
"WORKFLOW_BRANCH_OR_TAG",
"DIST_SUFFIX",
# Python & other tools
"HOME",
"APPDATA",
"PYTHONHOME",
"PYTHONNOUSERSITE",
"TMP",
"TEMP",
# Colors for tools
"TERM",
]
if proxy_env := GetOption("proxy_env"):
variables_to_forward.extend(proxy_env.split(","))
@@ -79,7 +82,7 @@ if not coreenv["VERBOSE"]:
SetOption("num_jobs", multiprocessing.cpu_count())
# Avoiding re-scan of all sources on every startup
SetOption("implicit_cache", True)
SetOption("implicit_deps_unchanged", True)
# SetOption("implicit_deps_unchanged", True)
# More aggressive caching
SetOption("max_drift", 1)
# Random task queue - to discover isses with build logic faster
@@ -87,10 +90,10 @@ SetOption("max_drift", 1)
# Setting up temp file parameters - to overcome command line length limits
coreenv["TEMPFILEARGESCFUNC"] = util.tempfile_arg_esc_func
util.wrap_tempfile(coreenv, "LINKCOM")
util.wrap_tempfile(coreenv, "ARCOM")
coreenv["TEMPFILEARGESCFUNC"] = tempfile_arg_esc_func
wrap_tempfile(coreenv, "LINKCOM")
wrap_tempfile(coreenv, "ARCOM")
coreenv["SINGLEQUOTEFUNC"] = util.single_quote
coreenv["SINGLEQUOTEFUNC"] = single_quote
Return("coreenv")