mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-08-21 00:03:45 +08:00
CI: build master-ci in Actions (#24533)
* jenkins: build master-ci on pc * make target configurable * build on actions * no wait * more fetch * v3 has push? * example * remove that * wait * v1.1.1 * this one works * schedule * clear out target first * no lfs old-commit-hash: 531f4483b2c24c054b0d0fa264438a8a864e09fa
This commit is contained in:
+24
-20
@@ -1,25 +1,30 @@
|
||||
#!/usr/bin/bash -e
|
||||
#!/usr/bin/bash
|
||||
|
||||
set -ex
|
||||
|
||||
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)"
|
||||
|
||||
TARGET_DIR=/data/openpilot
|
||||
SOURCE_DIR="$(git rev-parse --show-toplevel)"
|
||||
SOURCE_DIR="$(git -C $DIR rev-parse --show-toplevel)"
|
||||
if [ -z "$TARGET_DIR" ]; then
|
||||
TARGET_DIR="$(mktemp -d)"
|
||||
fi
|
||||
|
||||
# set git identity
|
||||
source $DIR/identity.sh
|
||||
|
||||
echo "[-] Setting up repo T=$SECONDS"
|
||||
if [ ! -d "$TARGET_DIR" ]; then
|
||||
mkdir -p $TARGET_DIR
|
||||
cd $TARGET_DIR
|
||||
git init
|
||||
git remote add origin git@github.com:commaai/openpilot.git
|
||||
fi
|
||||
|
||||
cd $SOURCE_DIR
|
||||
git fetch origin
|
||||
|
||||
rm -rf $TARGET_DIR
|
||||
mkdir -p $TARGET_DIR
|
||||
cd $TARGET_DIR
|
||||
cp -r $SOURCE_DIR/.git $TARGET_DIR
|
||||
pre-commit uninstall || true
|
||||
|
||||
echo "[-] bringing master-ci and devel in sync T=$SECONDS"
|
||||
cd $TARGET_DIR
|
||||
git prune || true
|
||||
git remote prune origin || true
|
||||
git fetch origin master-ci
|
||||
git fetch origin devel
|
||||
|
||||
@@ -28,6 +33,7 @@ git reset --hard master-ci
|
||||
git checkout master-ci
|
||||
git reset --hard origin/devel
|
||||
git clean -xdf
|
||||
git lfs uninstall
|
||||
|
||||
# remove everything except .git
|
||||
echo "[-] erasing old openpilot T=$SECONDS"
|
||||
@@ -40,8 +46,7 @@ git clean -xdf
|
||||
# do the files copy
|
||||
echo "[-] copying files T=$SECONDS"
|
||||
cd $SOURCE_DIR
|
||||
cp -pR --parents $(cat release/files_common) $TARGET_DIR/
|
||||
cp -pR --parents $(cat release/files_tici) $TARGET_DIR/
|
||||
cp -pR --parents $(cat release/files_*) $TARGET_DIR/
|
||||
if [ ! -z "$EXTRA_FILES" ]; then
|
||||
cp -pR --parents $EXTRA_FILES $TARGET_DIR/
|
||||
fi
|
||||
@@ -49,8 +54,8 @@ fi
|
||||
# append source commit hash and build date to version
|
||||
GIT_HASH=$(git --git-dir=$SOURCE_DIR/.git rev-parse --short HEAD)
|
||||
DATETIME=$(date '+%Y-%m-%dT%H:%M:%S')
|
||||
VERSION=$(cat selfdrive/common/version.h | awk -F\" '{print $2}')
|
||||
echo "#define COMMA_VERSION \"$VERSION-$GIT_HASH-$DATETIME\"" > selfdrive/common/version.h
|
||||
VERSION=$(cat $SOURCE_DIR/selfdrive/common/version.h | awk -F\" '{print $2}')
|
||||
#echo "#define COMMA_VERSION \"$VERSION-$GIT_HASH-$DATETIME\"" > $TARGET_DIR/selfdrive/common/version.h
|
||||
|
||||
# in the directory
|
||||
cd $TARGET_DIR
|
||||
@@ -61,10 +66,9 @@ git add -f .
|
||||
git status
|
||||
git commit -a -m "openpilot v$VERSION release"
|
||||
|
||||
if [ ! -z "$PUSH" ]; then
|
||||
echo "[-] Pushing to $PUSH T=$SECONDS"
|
||||
git remote set-url origin git@github.com:commaai/openpilot.git
|
||||
git push -f origin master-ci:$PUSH
|
||||
if [ ! -z "$BRANCH" ]; then
|
||||
echo "[-] Pushing to $BRANCH T=$SECONDS"
|
||||
git push -f origin master-ci:$BRANCH
|
||||
fi
|
||||
|
||||
echo "[-] done T=$SECONDS"
|
||||
echo "[-] done T=$SECONDS, ready at $TARGET_DIR"
|
||||
|
||||
@@ -19,6 +19,7 @@ fi
|
||||
|
||||
# set git identity
|
||||
source $DIR/identity.sh
|
||||
export GIT_SSH_COMMAND="ssh -i /data/gitkey"
|
||||
|
||||
echo "[-] Setting up repo T=$SECONDS"
|
||||
rm -rf $BUILD_DIR
|
||||
|
||||
@@ -195,8 +195,13 @@ selfdrive/hardware/base.h
|
||||
selfdrive/hardware/base.py
|
||||
selfdrive/hardware/hw.h
|
||||
selfdrive/hardware/tici/__init__.py
|
||||
selfdrive/hardware/tici/hardware.h
|
||||
selfdrive/hardware/tici/hardware.py
|
||||
selfdrive/hardware/tici/pins.py
|
||||
selfdrive/hardware/tici/agnos.py
|
||||
selfdrive/hardware/tici/agnos.json
|
||||
selfdrive/hardware/tici/amplifier.py
|
||||
selfdrive/hardware/tici/updater
|
||||
selfdrive/hardware/tici/iwlist.py
|
||||
selfdrive/hardware/pc/__init__.py
|
||||
selfdrive/hardware/pc/hardware.py
|
||||
|
||||
+2
-4
@@ -1,5 +1,3 @@
|
||||
selfdrive/ui/replay/*
|
||||
third_party/mapbox-gl-native-qt/x86_64/*.so
|
||||
|
||||
third_party/mapbox-gl-native-qt/x86_64/**
|
||||
|
||||
third_party/qt-plugins/x86_64/**
|
||||
third_party/qt-plugins/x86_64/geoservices/*.so
|
||||
|
||||
@@ -11,15 +11,6 @@ selfdrive/camerad/cameras/camera_qcom2.cc
|
||||
selfdrive/camerad/cameras/camera_qcom2.h
|
||||
selfdrive/camerad/cameras/real_debayer.cl
|
||||
|
||||
selfdrive/hardware/tici/__init__.py
|
||||
selfdrive/hardware/tici/hardware.h
|
||||
selfdrive/hardware/tici/hardware.py
|
||||
selfdrive/hardware/tici/pins.py
|
||||
selfdrive/hardware/tici/agnos.py
|
||||
selfdrive/hardware/tici/agnos.json
|
||||
selfdrive/hardware/tici/amplifier.py
|
||||
selfdrive/hardware/tici/updater
|
||||
|
||||
selfdrive/ui/qt/spinner_larch64
|
||||
selfdrive/ui/qt/text_larch64
|
||||
selfdrive/ui/qt/maps/*.cc
|
||||
|
||||
@@ -2,4 +2,3 @@ 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"
|
||||
|
||||
Reference in New Issue
Block a user