Fix master-ci dirty working tree + CI test (#25087)

* check

* test for dirty working tree

* swap order

* fix diff
This commit is contained in:
Adeeb Shihadeh 2022-07-08 13:00:43 -07:00 committed by GitHub
parent e0f8f50baa
commit df251ef50e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 22 additions and 5 deletions

View File

@ -59,11 +59,14 @@ jobs:
TARGET_DIR=$STRIPPED_DIR release/build_devel.sh
cp Dockerfile.openpilot_base $STRIPPED_DIR
- name: Build Docker image
run: eval "$BUILD"
run: |
eval "$BUILD"
rm $STRIPPED_DIR/Dockerfile.openpilot_base
- name: Build openpilot and run checks
run: |
cd $STRIPPED_DIR
${{ env.RUN }} "CI=1 python selfdrive/manager/build.py && \
release/check-dirty.sh && \
python -m unittest discover selfdrive/car"
build_all:
@ -89,7 +92,7 @@ jobs:
- name: Build Docker image
run: eval "$BUILD"
- name: Build openpilot with all flags
run: ${{ env.RUN }} "scons -j$(nproc) --extras --test"
run: ${{ env.RUN }} "scons -j$(nproc) --extras --test && release/check-dirty.sh"
- name: Cleanup scons cache
run: |
${{ env.RUN }} "scons -j$(nproc) --extras --test && \

2
.gitignore vendored
View File

@ -45,8 +45,6 @@ system/proclogd/proclogd
selfdrive/ui/_ui
selfdrive/test/longitudinal_maneuvers/out
selfdrive/visiond/visiond
selfdrive/loggerd/loggerd
selfdrive/loggerd/bootlog
selfdrive/sensord/_gpsd
selfdrive/sensord/_sensord
system/camerad/camerad

1
Jenkinsfile vendored
View File

@ -115,6 +115,7 @@ pipeline {
phone_steps("tici", [
["build master-ci", "cd $SOURCE_DIR/release && TARGET_DIR=$TEST_DIR EXTRA_FILES='tools/' ./build_devel.sh"],
["build openpilot", "cd selfdrive/manager && ./build.py"],
["check dirty", "release/check-dirty.sh"],
["test manager", "python selfdrive/manager/test/test_manager.py"],
["onroad tests", "cd selfdrive/test/ && ./test_onroad.py"],
["test car interfaces", "cd selfdrive/car/tests/ && ./test_car_interfaces.py"],

@ -1 +1 @@
Subproject commit 225dbacbaac312f85eaaee0b97a3acc31f9c6b47
Subproject commit 3b6bd703b7a7667e4f82d0b81ef9a454819b94bd

11
release/check-dirty.sh Executable file
View File

@ -0,0 +1,11 @@
#!/usr/bin/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

View File

@ -231,6 +231,7 @@ selfdrive/locationd/models/gnss_helpers.py
selfdrive/locationd/calibrationd.py
system/logcatd/.gitignore
system/logcatd/SConscript
system/logcatd/logcatd_systemd.cc
@ -239,6 +240,7 @@ system/proclogd/main.cc
system/proclogd/proclog.cc
system/proclogd/proclog.h
selfdrive/loggerd/.gitignore
selfdrive/loggerd/SConscript
selfdrive/loggerd/encoder/encoder.cc
selfdrive/loggerd/encoder/encoder.h
@ -414,6 +416,7 @@ scripts/stop_updater.sh
pyextra/.gitignore
pyextra/acados_template/**
rednose/.gitignore
rednose/**
laika/**

View File

@ -1,3 +1,4 @@
loggerd
encoderd
bootlog
tests/test_logger