Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #15880: Cache relayd builds #2507

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions relay/sources/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,16 @@ target/man/rudder-relayd.1.gz:
gzip -f target/man/rudder-relayd.1


CACHER=../../../../../build-caching
CARGO_SHA:=$(shell sha256sum relayd/Cargo.lock | awk '{print $$1}')
SRC_SHA:=$(shell (find relayd/src/ -type f && echo relayd/Cargo.toml) | xargs sha256sum | sha256sum | awk '{print $$1}')
build: man rudder-pkg/rudder_plugins_key.pub autocomplete/rudder-pkg.sh
# Build relayd
[ -x $(CACHER) ] && $(CACHER) get ../../../../../.cargo/ name=cargo cargo=$(CARGO_SHA)
[ -x $(CACHER) ] && $(CACHER) get relayd/target --with-env name=relayd cargo=$(CARGO_SHA) src=$(SRC_SHA)
cd relayd && cargo build --release --bin rudder-relayd
[ -x $(CACHER) ] && $(CACHER) put ../../../../../.cargo/ name=cargo cargo=$(CARGO_SHA)
[ -x $(CACHER) ] && $(CACHER) put relayd/target --with-env name=relayd cargo=$(CARGO_SHA) src=$(SRC_SHA)

ifeq ($(SELINUX),true)
# Build SELinux policy package
Expand Down