build release3 (#19984)
* build release3 * copy agnos manifest * build in jenkins * nproc doesn't work * no pandaextra * revert that * don't modify version from source * build after tests * restore the symlink * only master * remove apk * revert that Co-authored-by: Comma Device <device@comma.ai>pull/19738/head
parent
7f5a1ce02d
commit
a712a4bd9c
|
@ -12,6 +12,8 @@ export GIT_COMMIT=${env.GIT_COMMIT}
|
|||
|
||||
source ~/.bash_profile
|
||||
|
||||
ln -snf ${env.TEST_DIR} /data/pythonpath
|
||||
|
||||
if [ -f /EON ]; then
|
||||
echo \$\$ > /dev/cpuset/app/tasks || true
|
||||
echo \$PPID > /dev/cpuset/app/tasks || true
|
||||
|
@ -157,12 +159,16 @@ pipeline {
|
|||
}
|
||||
|
||||
stage('Tici Build') {
|
||||
environment {
|
||||
R3_PUSH = "${env.BRANCH_NAME == 'master' ? '1' : ' '}"
|
||||
}
|
||||
steps {
|
||||
phone_steps("tici", [
|
||||
["build", "SCONS_CACHE=1 scons -j16"],
|
||||
["test loggerd", "python selfdrive/loggerd/tests/test_loggerd.py"],
|
||||
["test encoder", "python selfdrive/loggerd/tests/test_encoder.py"],
|
||||
["test camerad", "python selfdrive/camerad/test/test_camerad.py"],
|
||||
["build release3-staging", "cd release && PUSH=${env.R3_PUSH} ./build_release3.sh"],
|
||||
])
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,106 @@
|
|||
#!/usr/bin/bash -e
|
||||
|
||||
BUILD_DIR=/tmp/releasepilot
|
||||
SOURCE_DIR=/data/openpilot
|
||||
|
||||
ln -snf $BUILD_DIR /data/pythonpath
|
||||
|
||||
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"
|
||||
|
||||
echo "[-] Setting up repo T=$SECONDS"
|
||||
#rm -rf $BUILD_DIR
|
||||
mkdir -p $BUILD_DIR
|
||||
cd $BUILD_DIR
|
||||
git init
|
||||
git remote add origin git@github.com:commaai/openpilot.git || true
|
||||
|
||||
echo "[-] fetching public T=$SECONDS"
|
||||
git prune || true
|
||||
git remote prune origin || true
|
||||
|
||||
echo "[-] bringing master-ci and devel in sync T=$SECONDS"
|
||||
git fetch origin master-ci
|
||||
git fetch origin devel
|
||||
|
||||
git checkout -f -B release3-staging
|
||||
git reset --hard origin/devel
|
||||
git clean -xdf
|
||||
|
||||
# remove everything except .git
|
||||
echo "[-] erasing old files T=$SECONDS"
|
||||
find . -maxdepth 1 -not -path './.git' -not -name '.' -not -name '..' -exec rm -rf '{}' \;
|
||||
|
||||
# reset tree and get version
|
||||
cd $SOURCE_DIR
|
||||
git clean -xdf
|
||||
git checkout -- selfdrive/common/version.h
|
||||
|
||||
# do the files copy
|
||||
echo "[-] copying files T=$SECONDS"
|
||||
cd $SOURCE_DIR
|
||||
cp -pR --parents $(cat release/files_common) $BUILD_DIR/
|
||||
|
||||
# in the directory
|
||||
cd $BUILD_DIR
|
||||
|
||||
rm -f panda/board/obj/panda.bin.signed
|
||||
|
||||
VERSION=$(cat selfdrive/common/version.h | awk -F\" '{print $2}')
|
||||
echo "#define COMMA_VERSION \"$VERSION-$(git --git-dir=$SOURCE_DIR/.git rev-parse --short HEAD)-$(date '+%Y-%m-%dT%H:%M:%S')\"" > selfdrive/common/version.h
|
||||
|
||||
echo "[-] committing version $VERSION T=$SECONDS"
|
||||
git add -f .
|
||||
git status
|
||||
git commit -a -m "openpilot v$VERSION release"
|
||||
|
||||
# Build panda firmware
|
||||
pushd panda/board/
|
||||
make obj/panda.bin
|
||||
mv obj/panda.bin /tmp/panda.bin
|
||||
make clean
|
||||
mv /tmp/panda.bin obj/panda.bin
|
||||
popd
|
||||
|
||||
# Build
|
||||
export PYTHONPATH="$BUILD_DIR"
|
||||
SCONS_CACHE=1 scons -j$(nproc)
|
||||
|
||||
# Run tests
|
||||
#python selfdrive/test/test_manager.py
|
||||
selfdrive/car/tests/test_car_interfaces.py
|
||||
|
||||
# Cleanup
|
||||
find . -name '*.a' -delete
|
||||
find . -name '*.o' -delete
|
||||
find . -name '*.os' -delete
|
||||
find . -name '*.pyc' -delete
|
||||
find . -name '__pycache__' -delete
|
||||
rm -rf .sconsign.dblite Jenkinsfile release/ apk/
|
||||
|
||||
# Restore phonelibs
|
||||
git checkout phonelibs/
|
||||
|
||||
# Mark as prebuilt release
|
||||
touch prebuilt
|
||||
|
||||
# Add built files to git
|
||||
git add -f .
|
||||
git commit --amend -m "openpilot v$VERSION"
|
||||
|
||||
if [ ! -z "$PUSH" ]; then
|
||||
git remote set-url origin git@github.com:commaai/openpilot.git
|
||||
|
||||
git push -f origin release3-staging
|
||||
|
||||
# Create dashcam
|
||||
git rm selfdrive/car/*/carcontroller.py
|
||||
|
||||
git commit -m "create dashcam release from release"
|
||||
git push -f origin release3-staging:dashcam3-staging
|
||||
fi
|
||||
|
||||
echo "[-] done T=$SECONDS"
|
|
@ -271,6 +271,7 @@ selfdrive/hardware/tici/__init__.py
|
|||
selfdrive/hardware/tici/hardware.py
|
||||
selfdrive/hardware/tici/pins.py
|
||||
selfdrive/hardware/tici/agnos.py
|
||||
selfdrive/hardware/tici/agnos.json
|
||||
selfdrive/hardware/pc/__init__.py
|
||||
selfdrive/hardware/pc/hardware.py
|
||||
|
||||
|
@ -371,8 +372,11 @@ selfdrive/camerad/cameras/camera_frame_stream.cc
|
|||
selfdrive/camerad/cameras/camera_frame_stream.h
|
||||
selfdrive/camerad/cameras/camera_qcom.cc
|
||||
selfdrive/camerad/cameras/camera_qcom.h
|
||||
selfdrive/camerad/cameras/camera_qcom2.cc
|
||||
selfdrive/camerad/cameras/camera_qcom2.h
|
||||
selfdrive/camerad/cameras/debayer.cl
|
||||
selfdrive/camerad/cameras/sensor_i2c.h
|
||||
selfdrive/camerad/cameras/sensor2_i2c.h
|
||||
|
||||
selfdrive/camerad/transforms/rgb_to_yuv.cc
|
||||
selfdrive/camerad/transforms/rgb_to_yuv.h
|
||||
|
@ -445,9 +449,11 @@ phonelibs/qrcode/*.hpp
|
|||
|
||||
phonelibs/libyuv/include/**
|
||||
phonelibs/libyuv/lib/**
|
||||
phonelibs/libyuv/larch64/**
|
||||
|
||||
phonelibs/snpe/include/**
|
||||
phonelibs/snpe/aarch64**
|
||||
phonelibs/snpe/larch64**
|
||||
phonelibs/snpe/dsp**
|
||||
|
||||
phonelibs/android_frameworks_native/**
|
||||
|
|
Loading…
Reference in New Issue