Files
ardupilot/.github/workflows/ccache.env
T

18 lines
1002 B
Bash

# common ccache env vars for CI
# NOTE: ccache settings go into ccache.conf (a file) rather than env vars so they
# apply in every build step. An env var exported here would NOT survive into a
# later "run:" step (each step is a separate shell), which previously left the
# build job compiling with no sloppiness while the autotest job used a different
# value via build_ci.sh - breaking ccache reuse between the two jobs.
mkdir -p ~/.ccache
echo "base_dir = ${GITHUB_WORKSPACE}" > ~/.ccache/ccache.conf
echo "compression = true" >> ~/.ccache/ccache.conf
echo "compression_level = 6" >> ~/.ccache/ccache.conf
echo "max_size = 400M" >> ~/.ccache/ccache.conf
# fresh CI checkouts rewrite include-file timestamps every run, so ignore them;
# time_macros avoids misses from __DATE__/__TIME__. This must be identical across
# the build and autotest jobs that share a cache.
echo "sloppiness = file_stat_matches,include_file_ctime,include_file_mtime,time_macros" >> ~/.ccache/ccache.conf
ccache -s
ccache -z