eclipse-kuksa / kuksa-databroker

A modern in-vehicle VSS (Vehicle Signal Specification) server written in RUST
https://eclipse-kuksa.github.io/kuksa-website/
Apache License 2.0
18 stars 17 forks source link

Fix caching on databroker build #29

Closed SebastianSchildt closed 4 months ago

SebastianSchildt commented 5 months ago

There was a typo that prevents full caching of build artifacts for databroker build (CLI was ok already). Fixed now.

Example build with no cache (so probably also the build here, as changing cache contents invalidates cache)

Screenshot 2024-05-09 at 13 43 53

Subsequent build satisfying cache requirements

Screenshot 2024-05-09 at 13 47 12

(see here https://github.com/boschglobal/kuksa-databroker/actions?query=event%3Apull_request+branch%3Atest%2Fcaching for various test builds)

I also checked where time is mainly used now

argerus commented 4 months ago

This seems to fix caching for the build step.

The overall build is still slower than it was since caching of the unit test step was also broken in the original PR.

Screenshot from 2024-05-10 14-41-25

I suppose always having the target dir under target/ would make it easier to get this right, i.e. using --target-dir "target/cross-$target" in order to work around the issue with building for different systems under cross.

SebastianSchildt commented 4 months ago

Fixed. I choose to fix the cache definition in workflow instead of changing dirs in script. (I was thinking if somebody during dev is using plain "cargo build/run" and also in between places with the build scripts, the structure inside the default target folder might seem confusing. Also... easier/faster to test for me just now)