# Caching of recompilation in CI

**URL:** <https://discourse.julialang.org/t/caching-of-recompilation-in-ci/89652>\
**Category:** General Usage\
**Tags:** precompilation, ci\
**Created:** [November 2, 2022, 9:49am UTC](https://discourse.julialang.org/t/caching-of-recompilation-in-ci/89652 "2022-11-02T09:49:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mmiller](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mmiller/32/20805_2.png) [@mmiller](https://discourse.julialang.org/u/mmiller)\
**Post date:** [November 2, 2022, 9:49am UTC](https://discourse.julialang.org/t/caching-of-recompilation-in-ci/89652/1 "2022-11-02T09:49:05Z")

</div>

Hey everyone, has anyone got caching of package precompilation working in CircleCI, or a similar CI tool? Ideally I’d `instantiate` and `precompile` according to a `Project.toml`, and then save the `~/.julia` folder so that future jobs can use this cache if the toml hasn’t changed by copying. Doing a local test of this approach with a docker container works well, but for some reason in CircleCI it only picks up that some packages are precompiled, with a message like

```julia
167 dependencies successfully precompiled in 356 seconds. 76 already precompiled

```

Which indicates the cache is sort of working but not completely. Any ideas as to what is going wrong?

---

<div class="post-metadata">

**Author:** ![nrontsis](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nrontsis/32/38535_2.png) [@nrontsis](https://discourse.julialang.org/u/nrontsis)\
**Post date:** [November 2, 2022, 6:06pm UTC](https://discourse.julialang.org/t/caching-of-recompilation-in-ci/89652/2 "2022-11-02T18:06:11Z")

</div>

A follow up on this: we traced this to be due to CircleCI truncating timestamps in its caching. Related PR in Julia: [CircleCI caching: allow ftime to be ceil(ftime\_req) in Base.stale\_cachefile by nrontsis · Pull Request #47433 · JuliaLang/julia · GitHub](https://github.com/JuliaLang/julia/pull/47433)
