Tutorials icon indicating copy to clipboard operation
Tutorials copied to clipboard

travis: use ccache

Open miri64 opened this issue 6 years ago • 10 comments

I'm not sure this works with Docker, but let's give it a try ;-)

miri64 avatar Apr 11 '19 13:04 miri64

(not sure why I can't select @cladmi for this...)

miri64 avatar Apr 11 '19 13:04 miri64

now 5 min, before it was 4...

kaspar030 avatar Apr 11 '19 13:04 kaspar030

now 5 min, before it was 4...

With that amount of cache misses this isn't surprising. Should I hit rebuild?

miri64 avatar Apr 11 '19 13:04 miri64

Mhhhh. I think the results cache entries go to the docker's $HOME/.ccache, as the cache grabbed by Travis seems to be empty :-/

image

miri64 avatar Apr 11 '19 14:04 miri64

Maybe let's wait for @cladmi to return from his vacation before we merge this ;-)

miri64 avatar Apr 11 '19 14:04 miri64

(or dismiss it)

miri64 avatar Apr 11 '19 14:04 miri64

There is indeed a limitation that https://github.com/RIOT-OS/RIOT/blob/59b4dcffed6b8f32e6fba01e262e941d7413f7ca/makefiles/docker.inc.mk currently does not map 'CCACHE_DIR' directory or exports the 'CCACHE' variable to the docker container.

You can see it in the build output that no mapping is done for it:

https://travis-ci.com/RIOT-OS/Tutorials/jobs/192912816#L476-L494 (CC=gcc is passed to docker, fortunately we have CC = $(PREFIX)gcc without at ?=)

Also, for travis it looks like it is using the ${HOME}/.casher as a ccache (or cache base ?) directory:

https://travis-ci.com/RIOT-OS/Tutorials/jobs/192912816#L451-L456

So would need additional configuration.

cladmi avatar Apr 24 '19 12:04 cladmi

Also, for travis it looks like it is using the ${HOME}/.casher as a ccache (or cache base ?) directory:

https://travis-ci.com/RIOT-OS/Tutorials/jobs/192912816#L451-L456

It does not look to me like that. The variable you are referring to is called CASHER_DIR. From that I'm not sure it is the output of ccache necessarily. Maybe it is just were the produced cache tar is stored for pick-up?

miri64 avatar Apr 24 '19 13:04 miri64

Yupp, according to the doc the ccache output shoulds till go to $HOME/.ccache.

miri64 avatar Apr 24 '19 13:04 miri64

Yupp, according to the doc the ccache output shoulds till go to $HOME/.ccache.

Ok thanks for checking.

cladmi avatar Apr 24 '19 13:04 cladmi

Since the new Github actions are using the Docker image (which uses ccache), we can close this one.

miri64 avatar Nov 30 '23 13:11 miri64