Closed
Description
It would be nice to speed up julia CI startup time
Take GitHub julia CI, which typically
- downloads any registries
- downloads packages
- downloads any artifacts
- builds all packages
- precompiles all packages with test args (--coverage and --check-bounds etc.)
- runs tests
https://github.com/julia-actions/cache provides a way to cache useful parts of the depot between runs.
However two of the above are disabled by default:
/registries
which seems the path is clear to that being enabled now enable registries by default julia-actions/cache#62/compiled
which means all packages are precompiled each run.
I tried enabling caching of /compiled
over at JuliaIO/PNGFiles.jl#66
However on the second run it hits re-precompilation for most of the packages because:
- pkgimages are disabled in the test environment due to coverage being on by default on
julia-runtest
- We only ship julia with stdlib caches with pkgimages on (default and
--check-bounds=yes
)
i.e.
Debug: Rejecting cache file /opt/hostedtoolcache/julia/1.9.2/x64/share/julia/compiled/v1.9/MbedTLS_jll/u5NEn_RmBmg.ji for [top-level] since the flags are mismatched
│ current session: use_pkgimages = false, debug_level = 1, check_bounds = 1, inline = true, opt_level = 2
│ cache file: use_pkgimages = true, debug_level = 1, check_bounds = 1, inline = true, opt_level = 2
└ @ Base loading.jl:2730
Two ways to improve this caching would be to
- Enable pkgimages in more CI because coverage being on by default means no pkgimages - Don't use pkgimage for package if any includes fall in tracked path for coverage or alloc tracking #48183 which I stalled on. Help appreciated
- Include
pkgimage=no
caches for stdlibs include--pkgimage=no
caches for stdlibs #50666
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment