mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-08-18 11:43:42 +08:00
ci: keep the scons cache in the runner workspace instead of the device's
This commit is contained in:
@@ -152,12 +152,16 @@ jobs:
|
||||
run: |
|
||||
export PYTHONPATH="$BUILD_DIR:$BUILD_DIR/msgq_repo:$BUILD_DIR/opendbc_repo:$BUILD_DIR/rednose_repo:$BUILD_DIR/teleoprtc_repo:$BUILD_DIR/tinygrad_repo"
|
||||
./tools/release/release_files.py | xargs -0 cp -pR --parents -t "$BUILD_DIR" --
|
||||
# outside the checkout, which is wiped each run. /data/scons_cache is the device's, not ours.
|
||||
SCONS_CACHE="$RUNNER_WORKSPACE/scons_cache"
|
||||
mkdir -p "$SCONS_CACHE"
|
||||
cd $BUILD_DIR
|
||||
echo "Building locationd, serialized to keep the rednose generator from OOMing..."
|
||||
scons -j1 --minimal \
|
||||
echo "Building locationd..."
|
||||
# -j1: parallel rednose generators OOM the device
|
||||
scons -j1 cache_dir="$SCONS_CACHE" --minimal \
|
||||
openpilot/selfdrive/locationd openpilot/sunnypilot/selfdrive/locationd
|
||||
echo "Building rest of sunnypilot"
|
||||
/usr/bin/time -v scons -j$(nproc) --minimal
|
||||
/usr/bin/time -v scons -j$(nproc) cache_dir="$SCONS_CACHE" --minimal
|
||||
touch ${BUILD_DIR}/prebuilt
|
||||
if [[ "${{ runner.debug }}" == "1" ]]; then
|
||||
ls -la ${BUILD_DIR}
|
||||
|
||||
@@ -52,7 +52,7 @@ git fetch origin $DEV_BRANCH || (git checkout -b $DEV_BRANCH && git commit --all
|
||||
echo "[-] committing version $VERSION T=$SECONDS"
|
||||
git add -f .
|
||||
|
||||
# a gitlink here publishes a tree devices cannot resolve
|
||||
# gitlinks break the release tree on device
|
||||
if git ls-files -s | awk '$1 == "160000" { found = 1; print } END { exit !found }'; then
|
||||
echo "Error: submodules found in release tree."
|
||||
exit 1
|
||||
|
||||
Reference in New Issue
Block a user