Minimal build (#29600)
* add build flag for minimum build * add minimal build * update * fix pj * bump opendbc * update subaru old-commit-hash: 4917e22615adbfcc9b3c3ec89b00d240e0b48883
This commit is contained in:
4
.github/workflows/selfdrive_tests.yaml
vendored
4
.github/workflows/selfdrive_tests.yaml
vendored
@@ -79,7 +79,9 @@ jobs:
|
||||
- uses: ./.github/workflows/setup
|
||||
- name: Build openpilot with all flags
|
||||
timeout-minutes: ${{ ((steps.restore-scons-cache.outputs.cache-hit == 'true') && 12 || 30) }} # allow more time when we missed the scons cache
|
||||
run: ${{ env.RUN }} "scons -j$(nproc) --extras && release/check-dirty.sh"
|
||||
run: |
|
||||
${{ env.RUN }} "scons -j$(nproc)"
|
||||
${{ env.RUN }} "release/check-dirty.sh"
|
||||
- name: Cleanup scons cache and rebuild
|
||||
timeout-minutes: ${{ ((steps.restore-scons-cache.outputs.cache-hit == 'true') && 2 || 30) }} # allow more time when we missed the scons cache
|
||||
run: |
|
||||
|
||||
2
.github/workflows/tools_tests.yaml
vendored
2
.github/workflows/tools_tests.yaml
vendored
@@ -40,7 +40,7 @@ jobs:
|
||||
- name: Unit test
|
||||
timeout-minutes: 2
|
||||
run: |
|
||||
${{ env.RUN }} "scons -j$(nproc) --directory=/tmp/openpilot/cereal && \
|
||||
${{ env.RUN }} "scons -j$(nproc) --directory=/tmp/openpilot cereal && \
|
||||
apt-get update && \
|
||||
apt-get install -y libdw-dev libqt5svg5-dev libqt5x11extras5-dev && \
|
||||
cd /tmp/openpilot/tools/plotjuggler && \
|
||||
|
||||
12
SConstruct
12
SConstruct
@@ -14,10 +14,6 @@ AGNOS = TICI
|
||||
|
||||
Decider('MD5-timestamp')
|
||||
|
||||
AddOption('--extras',
|
||||
action='store_true',
|
||||
help='build misc extras, like setup and installer files')
|
||||
|
||||
AddOption('--kaitai',
|
||||
action='store_true',
|
||||
help='Regenerate kaitai struct parsers')
|
||||
@@ -58,11 +54,11 @@ AddOption('--pc-thneed',
|
||||
dest='pc_thneed',
|
||||
help='use thneed on pc')
|
||||
|
||||
AddOption('--no-test',
|
||||
AddOption('--minimal',
|
||||
action='store_false',
|
||||
dest='test',
|
||||
dest='extras',
|
||||
default=os.path.islink(Dir('#laika/').abspath),
|
||||
help='skip building test files')
|
||||
help='the minimum build to run openpilot. no tests, tools, etc.')
|
||||
|
||||
## Architecture name breakdown (arch)
|
||||
## - larch64: linux tici aarch64
|
||||
@@ -436,7 +432,7 @@ SConscript(['selfdrive/navd/SConscript'])
|
||||
SConscript(['selfdrive/modeld/SConscript'])
|
||||
SConscript(['selfdrive/ui/SConscript'])
|
||||
|
||||
if (arch in ['x86_64', 'aarch64', 'Darwin'] and Dir('#tools/cabana/').exists()) or GetOption('extras'):
|
||||
if arch in ['x86_64', 'aarch64', 'Darwin'] and Dir('#tools/cabana/').exists() and GetOption('extras'):
|
||||
SConscript(['tools/replay/SConscript'])
|
||||
SConscript(['tools/cabana/SConscript'])
|
||||
|
||||
|
||||
2
cereal
2
cereal
Submodule cereal updated: eb1b2ce255...82bca3a971
@@ -27,7 +27,7 @@ files = [
|
||||
_gpucommon = fxn('gpucommon', files)
|
||||
Export('_common', '_gpucommon')
|
||||
|
||||
if GetOption('test'):
|
||||
if GetOption('extras'):
|
||||
env.Program('tests/test_util', ['tests/test_util.cc'], LIBS=[_common])
|
||||
env.Program('tests/test_swaglog', ['tests/test_swaglog.cc'], LIBS=[_common, 'json11', 'zmq', 'pthread'])
|
||||
env.Program('tests/test_ratekeeper', ['tests/test_ratekeeper.cc'], LIBS=[_common, 'json11', 'zmq', 'pthread'])
|
||||
|
||||
2
opendbc
2
opendbc
Submodule opendbc updated: a1582f5e28...a30a6775a5
2
panda
2
panda
Submodule panda updated: 57ec466a91...0587f22bf3
@@ -7,5 +7,5 @@ env.Program('boardd', ['main.cc', 'boardd.cc'], LIBS=[panda] + libs)
|
||||
env.Library('libcan_list_to_can_capnp', ['can_list_to_can_capnp.cc'])
|
||||
|
||||
envCython.Program('boardd_api_impl.so', 'boardd_api_impl.pyx', LIBS=["can_list_to_can_capnp", 'capnp', 'kj'] + envCython["LIBS"])
|
||||
if GetOption('test'):
|
||||
if GetOption('extras'):
|
||||
env.Program('tests/test_boardd_usbprotocol', ['tests/test_boardd_usbprotocol.cc'], LIBS=[panda] + libs)
|
||||
|
||||
@@ -25,7 +25,7 @@ def create_es_distance(packer, es_distance_msg, bus, pcm_cancel_cmd, long_enable
|
||||
"Cruise_Throttle",
|
||||
"Signal2",
|
||||
"Car_Follow",
|
||||
"Signal3",
|
||||
"Low_Speed_Follow",
|
||||
"Cruise_Soft_Disable",
|
||||
"Signal7",
|
||||
"Cruise_Brake_Active",
|
||||
|
||||
@@ -31,7 +31,7 @@ def build(spinner: Spinner, dirty: bool = False) -> None:
|
||||
compile_output: List[bytes] = []
|
||||
for n in (nproc, nproc/2, 1):
|
||||
compile_output.clear()
|
||||
scons: subprocess.Popen = subprocess.Popen(["scons", f"-j{int(n)}", "--cache-populate"], cwd=BASEDIR, env=env, stderr=subprocess.PIPE)
|
||||
scons: subprocess.Popen = subprocess.Popen(["scons", f"-j{int(n)}", "--cache-populate", "--minimal"], cwd=BASEDIR, env=env, stderr=subprocess.PIPE)
|
||||
assert scons.stderr is not None
|
||||
|
||||
# Read progress from stderr and update spinner
|
||||
|
||||
@@ -46,7 +46,7 @@ asset_obj = qt_env.Object("assets", assets)
|
||||
|
||||
# build soundd
|
||||
qt_env.Program("soundd/_soundd", ["soundd/main.cc", "soundd/sound.cc"], LIBS=qt_libs)
|
||||
if GetOption('test'):
|
||||
if GetOption('extras'):
|
||||
qt_env.Program("tests/playsound", "tests/playsound.cc", LIBS=base_libs)
|
||||
qt_env.Program('tests/test_sound', ['tests/test_runner.cc', 'soundd/sound.cc', 'tests/test_sound.cc'], LIBS=qt_libs)
|
||||
|
||||
@@ -62,7 +62,7 @@ qt_src = ["main.cc", "qt/sidebar.cc", "qt/onroad.cc", "qt/body.cc",
|
||||
"qt/offroad/software_settings.cc", "qt/offroad/onboarding.cc",
|
||||
"qt/offroad/driverview.cc", "qt/offroad/experimental_mode.cc"]
|
||||
qt_env.Program("_ui", qt_src + [asset_obj], LIBS=qt_libs)
|
||||
if GetOption('test'):
|
||||
if GetOption('extras'):
|
||||
qt_src.remove("main.cc") # replaced by test_runner
|
||||
qt_env.Program('tests/test_translations', [asset_obj, 'tests/test_runner.cc', 'tests/test_translations.cc'] + qt_src, LIBS=qt_libs)
|
||||
qt_env.Program('tests/ui_snapshot', [asset_obj, "tests/ui_snapshot.cc"] + qt_src, LIBS=qt_libs)
|
||||
@@ -82,14 +82,13 @@ qt_env.NoClean(translation_sources)
|
||||
qt_env.Precious(translation_sources)
|
||||
qt_env.NoCache(lupdate)
|
||||
|
||||
# setup and factory resetter
|
||||
if GetOption('extras'):
|
||||
|
||||
if GetOption('extras') and arch != "Darwin":
|
||||
# setup and factory resetter
|
||||
qt_env.Program("qt/setup/reset", ["qt/setup/reset.cc"], LIBS=qt_libs)
|
||||
qt_env.Program("qt/setup/setup", ["qt/setup/setup.cc", asset_obj],
|
||||
LIBS=qt_libs + ['curl', 'common', 'json11'])
|
||||
|
||||
|
||||
if GetOption('extras'):
|
||||
# build updater UI
|
||||
qt_env.Program("qt/setup/updater", ["qt/setup/updater.cc", asset_obj], LIBS=qt_libs)
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ env.Program('camerad', [
|
||||
camera_obj,
|
||||
], LIBS=libs)
|
||||
|
||||
if GetOption("test") and arch == "x86_64":
|
||||
if GetOption("extras") and arch == "x86_64":
|
||||
env.Program('test/ae_gray_test',
|
||||
['test/ae_gray_test.cc', camera_obj],
|
||||
LIBS=libs)
|
||||
|
||||
@@ -23,5 +23,5 @@ env.Program('loggerd', ['loggerd.cc'], LIBS=libs)
|
||||
env.Program('encoderd', ['encoderd.cc'], LIBS=libs)
|
||||
env.Program('bootlog.cc', LIBS=libs)
|
||||
|
||||
if GetOption('test'):
|
||||
if GetOption('extras'):
|
||||
env.Program('tests/test_logger', ['tests/test_runner.cc', 'tests/test_logger.cc'], LIBS=libs + ['curl', 'crypto'])
|
||||
|
||||
@@ -2,5 +2,5 @@ Import('env', 'cereal', 'messaging', 'common')
|
||||
libs = [cereal, messaging, 'pthread', 'zmq', 'capnp', 'kj', 'common', 'zmq', 'json11']
|
||||
env.Program('proclogd', ['main.cc', 'proclog.cc'], LIBS=libs)
|
||||
|
||||
if GetOption('test'):
|
||||
if GetOption('extras'):
|
||||
env.Program('tests/test_proclog', ['tests/test_proclog.cc', 'proclog.cc'], LIBS=libs)
|
||||
|
||||
@@ -16,5 +16,5 @@ if GetOption('kaitai'):
|
||||
glonass_obj = env.Object('generated/glonass.cpp')
|
||||
env.Program("ubloxd", ["ubloxd.cc", "ublox_msg.cc", "generated/ubx.cpp", "generated/gps.cpp", glonass_obj], LIBS=loc_libs)
|
||||
|
||||
if GetOption('test'):
|
||||
if GetOption('extras'):
|
||||
env.Program("tests/test_glonass_runner", ['tests/test_glonass_runner.cc', 'tests/test_glonass_kaitai.cc', glonass_obj], LIBS=[loc_libs])
|
||||
@@ -35,7 +35,7 @@ cabana_lib = cabana_env.Library("cabana_lib", ['mainwin.cc', 'streams/socketcans
|
||||
'commands.cc', 'messageswidget.cc', 'streamselector.cc', 'settings.cc', 'util.cc', 'detailwidget.cc', 'tools/findsimilarbits.cc', 'tools/findsignal.cc'], LIBS=cabana_libs, FRAMEWORKS=base_frameworks)
|
||||
cabana_env.Program('cabana', ['cabana.cc', cabana_lib, assets], LIBS=cabana_libs, FRAMEWORKS=base_frameworks)
|
||||
|
||||
if GetOption('test'):
|
||||
if GetOption('extras'):
|
||||
cabana_env.Program('tests/test_cabana', ['tests/test_runner.cc', 'tests/test_cabana.cc', cabana_lib], LIBS=[cabana_libs])
|
||||
|
||||
generate_dbc = cabana_env.Command('generate_dbc_json',
|
||||
|
||||
@@ -21,5 +21,5 @@ Export('replay_lib')
|
||||
replay_libs = [replay_lib, 'avutil', 'avcodec', 'avformat', 'bz2', 'curl', 'yuv', 'ncurses'] + qt_libs
|
||||
qt_env.Program("replay", ["main.cc"], LIBS=replay_libs, FRAMEWORKS=base_frameworks)
|
||||
|
||||
if GetOption('test'):
|
||||
if GetOption('extras'):
|
||||
qt_env.Program('tests/test_replay', ['tests/test_runner.cc', 'tests/test_replay.cc'], LIBS=[replay_libs, qt_libs])
|
||||
|
||||
Reference in New Issue
Block a user