openpilot v0.11.1 release
date: 2026-06-04T09:49:56 master commit: c0ab3550eca2e9daf197c46b7e4b24aa9637cf2e
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
# openpilot releases
|
||||
|
||||
```
|
||||
## release checklist
|
||||
|
||||
### Go to staging
|
||||
- [ ] make a GitHub issue to track release with this checklist
|
||||
- [ ] create release master branch
|
||||
- [ ] create a branch from upstream master named `zerotentwo` for release `v0.10.2`
|
||||
- [ ] revert risky commits (double check with autonomy team)
|
||||
- [ ] push the new branch
|
||||
- [ ] push to staging:
|
||||
- [ ] make sure you are on the newly created release master branch (`zerotentwo`)
|
||||
- [ ] run `BRANCH=devel-staging release/build_stripped.sh`. Jenkins will then automatically build staging on device, run `test_onroad` and update the staging branch
|
||||
- [ ] bump version on master: `common/version.h` and `RELEASES.md`
|
||||
- [ ] post on Discord, tag `@release crew`
|
||||
|
||||
### Go to release
|
||||
- [ ] before going to release, test the following:
|
||||
- [ ] update from previous release -> new release
|
||||
- [ ] update from new release -> previous release
|
||||
- [ ] fresh install with `openpilot-test.comma.ai`
|
||||
- [ ] drive on fresh install
|
||||
- [ ] no submodules or LFS
|
||||
- [ ] check sentry, MTBF, etc.
|
||||
- [ ] stress test passes in production
|
||||
- [ ] publish the blog post
|
||||
- [ ] `git reset --hard origin/release-mici-staging`
|
||||
- [ ] tag the release: `git tag v0.X.X <commit-hash> && git push origin v0.X.X`
|
||||
- [ ] create GitHub release
|
||||
- [ ] final test install on `openpilot.comma.ai`
|
||||
- [ ] update factory provisioning
|
||||
- [ ] close out milestone and issue
|
||||
- [ ] post on Discord, X, etc.
|
||||
```
|
||||
Executable
+98
@@ -0,0 +1,98 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
set -x
|
||||
|
||||
# git diff --name-status origin/release3-staging | grep "^A" | less
|
||||
|
||||
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)"
|
||||
|
||||
cd $DIR
|
||||
|
||||
BUILD_DIR=/data/openpilot
|
||||
SOURCE_DIR="$(git rev-parse --show-toplevel)"
|
||||
|
||||
if [ -z "$RELEASE_BRANCH" ]; then
|
||||
echo "RELEASE_BRANCH is not set"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
BUILD_BRANCH=release-mici-staging
|
||||
|
||||
|
||||
# set git identity
|
||||
source $DIR/identity.sh
|
||||
|
||||
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
|
||||
git checkout --orphan $BUILD_BRANCH
|
||||
|
||||
# do the files copy
|
||||
echo "[-] copying files T=$SECONDS"
|
||||
cd $SOURCE_DIR
|
||||
cp -pR --parents $(./release/release_files.py) $BUILD_DIR/
|
||||
|
||||
# in the directory
|
||||
cd $BUILD_DIR
|
||||
|
||||
rm -f panda/board/obj/panda.bin.signed
|
||||
rm -f panda/board/obj/panda_h7.bin.signed
|
||||
|
||||
VERSION=$(cat common/version.h | awk -F[\"-] '{print $2}')
|
||||
echo "[-] committing version $VERSION T=$SECONDS"
|
||||
git add -f .
|
||||
git commit -a -m "openpilot v$VERSION release"
|
||||
|
||||
# Build
|
||||
export PYTHONPATH="$BUILD_DIR"
|
||||
scons
|
||||
|
||||
if [ -z "$PANDA_DEBUG_BUILD" ]; then
|
||||
# release panda fw
|
||||
CERT=/data/pandaextra/certs/release RELEASE=1 scons panda/
|
||||
else
|
||||
# build with ALLOW_DEBUG=1 to enable features like experimental longitudinal
|
||||
scons panda/
|
||||
fi
|
||||
|
||||
# Ensure no submodules in release
|
||||
if test "$(git submodule--helper list | wc -l)" -gt "0"; then
|
||||
echo "submodules found:"
|
||||
git submodule--helper list
|
||||
exit 1
|
||||
fi
|
||||
git submodule status
|
||||
|
||||
# Cleanup
|
||||
find . -name '*.a' -delete
|
||||
find . -name '*.o' -delete
|
||||
find . -name '*.os' -delete
|
||||
find . -name '*.pyc' -delete
|
||||
find . -name 'moc_*' -delete
|
||||
find . -name '__pycache__' -delete
|
||||
rm -rf .sconsign.dblite Jenkinsfile release/
|
||||
rm -f selfdrive/modeld/models/*.onnx*
|
||||
|
||||
# Mark as prebuilt release
|
||||
touch prebuilt
|
||||
|
||||
# Add built files to git
|
||||
git add -f .
|
||||
git commit --amend -m "openpilot v$VERSION"
|
||||
|
||||
# Run tests
|
||||
cd $BUILD_DIR
|
||||
RELEASE=1 pytest -n0 -s selfdrive/test/test_onroad.py
|
||||
#pytest selfdrive/car/tests/test_car_interfaces.py
|
||||
|
||||
echo "[-] pushing release T=$SECONDS"
|
||||
REFS=()
|
||||
for branch in ${RELEASE_BRANCH//,/ }; do
|
||||
REFS+=("$BUILD_BRANCH:$branch")
|
||||
done
|
||||
git push -f origin "${REFS[@]}"
|
||||
|
||||
echo "[-] done T=$SECONDS"
|
||||
Executable
+89
@@ -0,0 +1,89 @@
|
||||
#!/usr/bin/env bash
|
||||
set -ex
|
||||
|
||||
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)"
|
||||
|
||||
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 target repo T=$SECONDS"
|
||||
|
||||
rm -rf $TARGET_DIR
|
||||
mkdir -p $TARGET_DIR
|
||||
cd $TARGET_DIR
|
||||
cp -r $SOURCE_DIR/.git $TARGET_DIR
|
||||
|
||||
echo "[-] setting up stripped branch sync T=$SECONDS"
|
||||
cd $TARGET_DIR
|
||||
|
||||
# tmp branch
|
||||
git checkout --orphan tmp
|
||||
|
||||
# remove everything except .git
|
||||
echo "[-] erasing old openpilot T=$SECONDS"
|
||||
git submodule deinit -f --all
|
||||
git rm -rf --cached .
|
||||
find . -maxdepth 1 -not -path './.git' -not -name '.' -not -name '..' -exec rm -rf '{}' \;
|
||||
|
||||
# cleanup before the copy
|
||||
cd $SOURCE_DIR
|
||||
git clean -xdff
|
||||
git submodule foreach --recursive git clean -xdff
|
||||
|
||||
# do the files copy
|
||||
echo "[-] copying files T=$SECONDS"
|
||||
cd $SOURCE_DIR
|
||||
cp -pR --parents $(./release/release_files.py) $TARGET_DIR/
|
||||
|
||||
# in the directory
|
||||
cd $TARGET_DIR
|
||||
rm -rf .git/modules/
|
||||
rm -f panda/board/obj/panda.bin.signed
|
||||
|
||||
find selfdrive/modeld/models -name '*.onnx' -size +95M -exec ./common/file_chunker.py {} \;
|
||||
|
||||
# include source commit hash and build date in commit
|
||||
GIT_HASH=$(git --git-dir=$SOURCE_DIR/.git rev-parse HEAD)
|
||||
GIT_COMMIT_DATE=$(git --git-dir=$SOURCE_DIR/.git show --no-patch --format='%ct %ci' HEAD)
|
||||
DATETIME=$(date '+%Y-%m-%dT%H:%M:%S')
|
||||
VERSION=$(cat $SOURCE_DIR/common/version.h | awk -F\" '{print $2}')
|
||||
|
||||
echo -n "$GIT_HASH" > git_src_commit
|
||||
echo -n "$GIT_COMMIT_DATE" > git_src_commit_date
|
||||
|
||||
echo "[-] committing version $VERSION T=$SECONDS"
|
||||
git add -f .
|
||||
git status
|
||||
git commit -a -m "openpilot v$VERSION release
|
||||
|
||||
date: $DATETIME
|
||||
master commit: $GIT_HASH
|
||||
"
|
||||
|
||||
# should be no submodules or LFS files
|
||||
git submodule status
|
||||
if [ ! -z "$(git lfs ls-files)" ]; then
|
||||
echo "LFS files detected!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# ensure files are within GitHub's limit
|
||||
BIG_FILES="$(find . -type f -not -path './.git/*' -size +95M)"
|
||||
if [ ! -z "$BIG_FILES" ]; then
|
||||
printf '\n\n\n'
|
||||
echo "Found files exceeding GitHub's 100MB limit:"
|
||||
echo "$BIG_FILES"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -z "$BRANCH" ]; then
|
||||
echo "[-] Pushing to $BRANCH T=$SECONDS"
|
||||
git push -f origin tmp:$BRANCH
|
||||
fi
|
||||
|
||||
echo "[-] done T=$SECONDS, ready at $TARGET_DIR"
|
||||
Executable
+11
@@ -0,0 +1,11 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)"
|
||||
cd $DIR
|
||||
|
||||
if [ ! -z "$(git status --porcelain)" ]; then
|
||||
echo "Dirty working tree after build:"
|
||||
git status --porcelain
|
||||
exit 1
|
||||
fi
|
||||
Executable
+17
@@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
while read hash submodule ref; do
|
||||
if [ "$submodule" = "tinygrad_repo" ]; then
|
||||
echo "Skipping $submodule"
|
||||
continue
|
||||
fi
|
||||
|
||||
git -C $submodule fetch --depth 100 origin master
|
||||
git -C $submodule branch -r --contains $hash | grep "origin/master"
|
||||
if [ "$?" -eq 0 ]; then
|
||||
echo "$submodule ok"
|
||||
else
|
||||
echo "$submodule: $hash is not on master"
|
||||
exit 1
|
||||
fi
|
||||
done <<< $(git submodule status --recursive)
|
||||
@@ -0,0 +1,4 @@
|
||||
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"
|
||||
Executable
+53
@@ -0,0 +1,53 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import importlib
|
||||
import shutil
|
||||
import sys
|
||||
import tempfile
|
||||
import zipapp
|
||||
from argparse import ArgumentParser
|
||||
from pathlib import Path
|
||||
|
||||
from openpilot.common.basedir import BASEDIR
|
||||
|
||||
|
||||
DIRS = ['cereal', 'openpilot']
|
||||
EXTS = ['.png', '.py', '.ttf', '.capnp', '.json', '.fnt', '.mo', '.po']
|
||||
EXCLUDE = ['selfdrive/assets/training']
|
||||
INTERPRETER = '/usr/bin/env python3'
|
||||
|
||||
|
||||
def copy(src, dest):
|
||||
if any(src.endswith(ext) for ext in EXTS) and not any(exc in src for exc in EXCLUDE):
|
||||
shutil.copy2(src, dest, follow_symlinks=True)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
parser = ArgumentParser(prog='pack.py', description="package script into a portable executable", epilog='comma.ai')
|
||||
parser.add_argument('-e', '--entrypoint', help="function to call in module, default is 'main'", default='main')
|
||||
parser.add_argument('-o', '--output', help='output file')
|
||||
parser.add_argument('module', help="the module to target, e.g. 'openpilot.system.ui.spinner'")
|
||||
args = parser.parse_args()
|
||||
|
||||
print('WARNING: copying all files! make sure to run scons and git tree is clean')
|
||||
|
||||
if not args.output:
|
||||
args.output = args.module
|
||||
|
||||
try:
|
||||
mod = importlib.import_module(args.module)
|
||||
except ModuleNotFoundError:
|
||||
print(f'{args.module} not found, typo?')
|
||||
sys.exit(1)
|
||||
|
||||
if not hasattr(mod, args.entrypoint):
|
||||
print(f'{args.module} does not have a {args.entrypoint}() function, typo?')
|
||||
sys.exit(1)
|
||||
|
||||
with tempfile.TemporaryDirectory() as tmp:
|
||||
for directory in DIRS:
|
||||
shutil.copytree(BASEDIR + '/' + directory, tmp + '/' + directory, symlinks=False, dirs_exist_ok=True, copy_function=copy)
|
||||
entry = f'{args.module}:{args.entrypoint}'
|
||||
zipapp.create_archive(tmp, target=args.output, interpreter=INTERPRETER, main=entry)
|
||||
|
||||
print(f'created executable {Path(args.output).resolve()}')
|
||||
Executable
+37
@@ -0,0 +1,37 @@
|
||||
#!/usr/bin/env python3
|
||||
import os
|
||||
import re
|
||||
from pathlib import Path
|
||||
|
||||
HERE = os.path.abspath(os.path.dirname(__file__))
|
||||
ROOT = HERE + "/.."
|
||||
|
||||
blacklist = [
|
||||
".git/",
|
||||
".github/workflows/",
|
||||
|
||||
"matlab.*.md",
|
||||
|
||||
# no LFS or submodules in release
|
||||
".lfsconfig",
|
||||
".gitattributes",
|
||||
".git$",
|
||||
".gitmodules",
|
||||
]
|
||||
|
||||
# gets you through the blacklist
|
||||
whitelist: list[str] = [
|
||||
]
|
||||
|
||||
if __name__ == "__main__":
|
||||
for f in Path(ROOT).rglob("**/*"):
|
||||
if not (f.is_file() or f.is_symlink()):
|
||||
continue
|
||||
|
||||
rf = str(f.relative_to(ROOT))
|
||||
blacklisted = any(re.search(p, rf) for p in blacklist)
|
||||
whitelisted = any(re.search(p, rf) for p in whitelist)
|
||||
if blacklisted and not whitelisted:
|
||||
continue
|
||||
|
||||
print(rf)
|
||||
Reference in New Issue
Block a user