mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-02-18 20:03:53 +08:00
ci: prevent build OOM by throttling locationd concurrency (#1527)
* ci: add conditional swap creation to prebuilt workflow - Dynamically creates an 8GB swap file on systems with less than 8GB RAM. - Ensures builds complete reliably on low-memory environments. - Introduced cleanup step to remove swap after workflow execution. * Nice save * clean * reduce swap size in prebuilt workflow - Adjusted swap file size from 8GB to 4GB to optimize resource usage. * remove swap creation from prebuilt workflow - Simplified workflow by removing dynamic swap file creation and cleanup. - Adjusted resource management to rely on existing system resources. * update sunnypilot build workflow to use explicit script calls - Replaced `op` commands with explicit `/data/openpilot/tools/op.sh` script calls for better reliability and clarity. * update sunnypilot build workflow to use systemd for process management - Replaced `/data/openpilot/tools/op.sh` script calls with `systemctl` commands for improved compatibility and reliability. - Ensures consistent resource management during start and stop operations. * Splitting a bit the build then? * split build steps in sunnypilot prebuilt workflow - Added separate build steps for `modeld`, `modeld_v2`, and `locationd` with descriptive messages. - Improves logging and clarity during the build process. * limit locationd parallel processes aiming to help with resource consumption * typo * adding op's location d AND bumping to 4 cores for them * Apply suggestion from @sunnyhaibin --------- Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
This commit is contained in:
@@ -180,6 +180,15 @@ jobs:
|
||||
./release/release_files.py | sort | uniq | rsync -rRl${RUNNER_DEBUG:+v} --files-from=- . $BUILD_DIR/
|
||||
cd $BUILD_DIR
|
||||
sed -i '/from .board.jungle import PandaJungle, PandaJungleDFU/s/^/#/' panda/__init__.py
|
||||
echo "Building sunnypilot's modeld..."
|
||||
scons -j$(nproc) cache_dir=${{env.SCONS_CACHE_DIR}} --minimal sunnypilot/modeld
|
||||
echo "Building sunnypilot's modeld_v2..."
|
||||
scons -j$(nproc) cache_dir=${{env.SCONS_CACHE_DIR}} --minimal sunnypilot/modeld_v2
|
||||
echo "Building sunnypilot's locationd..."
|
||||
scons -j4 cache_dir=${{env.SCONS_CACHE_DIR}} --minimal sunnypilot/selfdrive/locationd
|
||||
echo "Building openpilot's locationd..."
|
||||
scons -j4 cache_dir=${{env.SCONS_CACHE_DIR}} --minimal selfdrive/locationd
|
||||
echo "Building rest of sunnypilot"
|
||||
scons -j$(nproc) cache_dir=${{env.SCONS_CACHE_DIR}} --minimal
|
||||
touch ${BUILD_DIR}/prebuilt
|
||||
if [[ "${{ runner.debug }}" == "1" ]]; then
|
||||
|
||||
Reference in New Issue
Block a user