From 2563cb10e1fb8d34aa65bdcf51bb2854cd6f621f Mon Sep 17 00:00:00 2001 From: Willem Melching Date: Mon, 10 Feb 2020 14:38:47 -0800 Subject: [PATCH] Update release scripts old-commit-hash: b645b1f27837af3657143a0c6d13ec7ba89dc91a --- release/{go.sh => build_devel.sh} | 0 release/build_release2.sh | 67 +++++++++++++++++++++++++++++++ release/remote_build.py | 2 +- 3 files changed, 68 insertions(+), 1 deletion(-) rename release/{go.sh => build_devel.sh} (100%) create mode 100755 release/build_release2.sh diff --git a/release/go.sh b/release/build_devel.sh similarity index 100% rename from release/go.sh rename to release/build_devel.sh diff --git a/release/build_release2.sh b/release/build_release2.sh new file mode 100755 index 0000000000..81a3e7635a --- /dev/null +++ b/release/build_release2.sh @@ -0,0 +1,67 @@ +#!/usr/bin/env bash +set e + +export GIT_COMMITTER_NAME="Vehicle Researcher" +export GIT_COMMITTER_EMAIL="user@comma.ai" +export GIT_AUTHOR_NAME="Vehicle Researcher" +export GIT_AUTHOR_EMAIL="user@comma.ai" + +export GIT_SSH_COMMAND="ssh -i /data/gitkey" + +TARGET_DIR=/data/openpilot/ + +# Create folders +rm -rf $TARGET_DIR +mkdir -p $TARGET_DIR +cd $TARGET_DIR + +# Create git repo +git init +git remote add public git@github.com:commaai/$BRAND.git +git fetch public + +# Checkout devel +git checkout public/devel +git clean -xdf + +# Create release2 with no history +git branch -D release2 || true +git checkout --orphan release2 + +VERSION=$(cat selfdrive/common/version.h | awk -F\" '{print $2}') +git commit -m "openpilot v$VERSION" + +# Build signed panda firmware +pushd panda/board/ +cp -r /tmp/pandaextra $TARGET_DIR +RELEASE=1 make obj/panda.bin +mv obj/panda.bin /tmp/panda.bin +make clean +mv /tmp/panda.bin obj/panda.bin.signed +rm -rf /data/openpilot/pandaextra +popd + +# Build stuff +export PYTHONPATH="/data/openpilot:/data/openpilot/pyextra" +SCONS_CACHE=1 scons -j3 +nosetests -s selfdrive/test/test_openpilot.py + +# Cleanup +find . -name '*.pyc' -delete +rm .sconsign.dblite + +# Mark as prebuilt release +touch prebuilt + +# Add built files to git +git add -f . +git commit --amend -m "openpilot v$VERSION" + +# Push to release2-staging +git push -f public release2-staging + +# Create dashcam release +git rm selfdrive/car/*/carcontroller.py + +git commit -m "create dashcam release from release2" +git push -f public release2-staging:dashcam-staging diff --git a/release/remote_build.py b/release/remote_build.py index 60b70d1df0..f80843cef9 100755 --- a/release/remote_build.py +++ b/release/remote_build.py @@ -47,7 +47,7 @@ def start_build(name): push = "PUSH=master-ci" if branch == "master" else "" - conn.send("%s /data/openpilot_source/release/go.sh\n" % push) + conn.send("%s /data/openpilot_source/release/build_devel.sh\n" % push) conn.send('echo "RESULT:" $?\n') conn.send("exit\n") return conn