Skip to content

Commit

Permalink
Make build deterministic and do not rebuild on release2 (#729)
Browse files Browse the repository at this point in the history
* sort dbc files to make linking deterministic

* touch all files on release2 checkout to prevent rebuild

old-commit-hash: 60a2053
  • Loading branch information
pd0wm authored Jul 3, 2019
1 parent 55233a9 commit 0c42192
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
13 changes: 10 additions & 3 deletions launch_chffrplus.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,16 @@ fi
function launch {
# apply update
if [ "$(git rev-parse HEAD)" != "$(git rev-parse @{u})" ]; then
git reset --hard @{u} &&
git clean -xdf &&
exec "${BASH_SOURCE[0]}"
git reset --hard @{u} &&
git clean -xdf &&

# Touch all files on release2 after checkout to prevent rebuild
BRANCH=$(git rev-parse --abbrev-ref HEAD)
if [[ "$BRANCH" == "release2" ]]; then
touch **
fi

exec "${BASH_SOURCE[0]}"
fi

# no cpu rationing for now
Expand Down
2 changes: 1 addition & 1 deletion selfdrive/can/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ OBJDIR = obj

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

DBC_SOURCES := $(wildcard $(OPENDBC_PATH)/*.dbc)
DBC_SOURCES := $(sort $(wildcard $(OPENDBC_PATH)/*.dbc))
DBC_OBJS := $(patsubst $(OPENDBC_PATH)/%.dbc,$(OBJDIR)/%.o,$(DBC_SOURCES))
DBC_CCS := $(patsubst $(OPENDBC_PATH)/%.dbc,dbc_out/%.cc,$(DBC_SOURCES))
.SECONDARY: $(DBC_CCS)
Expand Down

0 comments on commit 0c42192

Please sign in to comment.