Uh oh!
There was an error while loading. Please reload this page.
Added ccache for alpine build - #786
Conversation
LaurentGoderre
commented
Jun 14, 2018
Alternative #703 that doesn't use Multistage build |
8160079 to
9a7433fComparechorrell
commented
Jun 14, 2018
Interesting. This might be something we can try: https://github.com/mozilla/sccache It's ccache with cloud storage. If we can get that to work we could point it at an S3 bucket setup maybe by the docker build team? Or Google Cloud storage or a Redis server |
LaurentGoderre
commented
Jun 14, 2018
Yeah, I don't know what would be more efficient between GitHub or cloud storage but Git certainly is the most friction-less option (horrible grammar I know) |
chorrell
commented
Jun 14, 2018
I guess the GitHub repo would need to be periodically updated to ensure it's caching the relevant things overtime. I'm a little unfordable using a git repo in this way to be honest. I think S3 would probably hold up better to repeated requests for files (serving and storing files is was made for). For sscache on Alpine we'd need to create our own pre-build binary and save it in the docker-node repo then copy it into the image as a build dep. If it was in the APK registry it would be a lot easier... I might play around with that in a separate branch just to see if it's viable. I've done some testing of sscache at work on rust projects for Jenkins builds -- the improvements to build times, at least in that case, was pretty significant. |
LaurentGoderre
commented
Jun 14, 2018
I think sccache is in the APK registry but we don't have cloud space yet. |
chorrell
commented
Jun 14, 2018
Hmm, It didn't show up when I did an app search. Also they have pre-build musl binaries: https://github.com/mozilla/sccache/releases I can use my own AWS account to experiment. Fortunately, S3 is pretty cheap |
LaurentGoderre
commented
Jun 14, 2018
I think long term cloud storage is the way to go but it should be cloud that is owned by the NodeJS foundation. We may be able to get this one merge while the cloud storage is finalized. |
LaurentGoderre
commented
Jun 14, 2018
It works!!! |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
59b71f0 to
749bed1CompareLaurentGoderre
commented
Jun 15, 2018
@chorrell it works!!! Though the pushing part probably doesn't quite work yet. |
d835ddd to
4e55203CompareLaurentGoderre
commented
Jun 15, 2018
@tianon, I think this will help you as well because this will be compatible with your infrastructure! What is especially cool is that Travis is likely to build first and upload the cache before your build is triggered so you will always have a fresh cache! |
4c1aa06 to
46cca62CompareLaurentGoderre
commented
Jun 15, 2018
@chorrell this is ready, pending a transfer of the cache repo to the node organization. |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
nschonni
commented
Jun 15, 2018
Would it be better to pass in a CCACHE mount/variable and do the pushing of it separate to the image? |
LaurentGoderre
commented
Jun 15, 2018
@nschonni there is no build time mount. This is the only way to do it while keeping the image small |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Allows the build to push build cache artifacts back
7c350fc to
a5dd7ffCompare
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
LaurentGoderre
commented
Jun 20, 2018
@tianon Travis doesn't do multi arch build so the only cache we can ever push is for amd64 unless you would have a process to push your cache to it to for other archs |
chorrell
commented
Nov 15, 2018
I discovered another possible approach to this that might be promising: facebookarchive/bistro@479cc08 The https://github.com/facebook/bistro/ project has their travis-ci builds import a compressed archive of the ccache cache directory into the docker container as part of the build context then copies it back out to the global Travis cache dir (see https://docs.travis-ci.com/user/caching/#Arbitrary-directories) They generate their Dockerfiles dynamically, so it's a bit hard to see what's going on unless you look at a build: https://travis-ci.org/facebook/bistro/jobs/454203510 Unfortunately it seems like only Enterprise accounts allow you to mount volumes, which would be the easier solution: |
Our CI runs on enterprise though, doesn't it? |
nschonni
commented
Nov 15, 2018
Enterprise is the on-prem/private version of Travis-CI |
PeterDaveHello
commented
Nov 19, 2018
I don't think we're using Enterprise version on this project, however, I tried another version here: #918, suggestions and reviews are very welcome. |
No description provided.