Skip to content

Commit 0c42192

Browse files
authored
Make build deterministic and do not rebuild on release2 (#729)
* sort dbc files to make linking deterministic * touch all files on release2 checkout to prevent rebuild old-commit-hash: 60a2053
1 parent 55233a9 commit 0c42192

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

launch_chffrplus.sh

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,16 @@ fi
1313
function launch {
1414
# apply update
1515
if [ "$(git rev-parse HEAD)" != "$(git rev-parse @{u})" ]; then
16-
git reset --hard @{u} &&
17-
git clean -xdf &&
18-
exec "${BASH_SOURCE[0]}"
16+
git reset --hard @{u} &&
17+
git clean -xdf &&
18+
19+
# Touch all files on release2 after checkout to prevent rebuild
20+
BRANCH=$(git rev-parse --abbrev-ref HEAD)
21+
if [[ "$BRANCH" == "release2" ]]; then
22+
touch **
23+
fi
24+
25+
exec "${BASH_SOURCE[0]}"
1926
fi
2027

2128
# no cpu rationing for now

selfdrive/can/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ OBJDIR = obj
3838

3939
OPENDBC_PATH := $(shell python2 -c 'import opendbc; print opendbc.DBC_PATH')
4040

41-
DBC_SOURCES := $(wildcard $(OPENDBC_PATH)/*.dbc)
41+
DBC_SOURCES := $(sort $(wildcard $(OPENDBC_PATH)/*.dbc))
4242
DBC_OBJS := $(patsubst $(OPENDBC_PATH)/%.dbc,$(OBJDIR)/%.o,$(DBC_SOURCES))
4343
DBC_CCS := $(patsubst $(OPENDBC_PATH)/%.dbc,dbc_out/%.cc,$(DBC_SOURCES))
4444
.SECONDARY: $(DBC_CCS)

0 commit comments

Comments
 (0)