Skip to content

Commit

Permalink
[ci] fix: disable ccache for now
Browse files Browse the repository at this point in the history
  • Loading branch information
jd28 committed Jul 7, 2024
1 parent 6be4640 commit cd470e7
Showing 1 changed file with 24 additions and 24 deletions.
48 changes: 24 additions & 24 deletions scripts/docker_prepare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,24 @@ set -xe
if [[ -f "/etc/centos-release" ]]; then
# sometimes the epel server is down. retry 5 times
for i in $(seq 1 5); do
yum install -y zlib-devel curl-devel expat-devel libpng-devel ccache curl zip unzip tar && s=0 && break || s=$? && sleep 15;
yum install -y zlib-devel curl-devel expat-devel libpng-devel curl zip unzip tar && s=0 && break || s=$? && sleep 15;
done

[ $s -eq 0 ] || exit $s

if [[ -d "/usr/lib64/ccache" ]]; then
ln -s /usr/bin/ccache /usr/lib64/ccache/c++
ln -s /usr/bin/ccache /usr/lib64/ccache/cc
ln -s /usr/bin/ccache /usr/lib64/ccache/gcc
ln -s /usr/bin/ccache /usr/lib64/ccache/g++
export PATH="/usr/lib64/ccache:$PATH"
elif [[ -d "/usr/lib/ccache" ]]; then
ln -s /usr/bin/ccache /usr/lib/ccache/c++
ln -s /usr/bin/ccache /usr/lib/ccache/cc
ln -s /usr/bin/ccache /usr/lib/ccache/gcc
ln -s /usr/bin/ccache /usr/lib/ccache/g++
export PATH="/usr/lib/ccache:$PATH"
fi
# if [[ -d "/usr/lib64/ccache" ]]; then
# ln -s /usr/bin/ccache /usr/lib64/ccache/c++
# ln -s /usr/bin/ccache /usr/lib64/ccache/cc
# ln -s /usr/bin/ccache /usr/lib64/ccache/gcc
# ln -s /usr/bin/ccache /usr/lib64/ccache/g++
# export PATH="/usr/lib64/ccache:$PATH"
# elif [[ -d "/usr/lib/ccache" ]]; then
# ln -s /usr/bin/ccache /usr/lib/ccache/c++
# ln -s /usr/bin/ccache /usr/lib/ccache/cc
# ln -s /usr/bin/ccache /usr/lib/ccache/gcc
# ln -s /usr/bin/ccache /usr/lib/ccache/g++
# export PATH="/usr/lib/ccache:$PATH"
# fi

elif [[ -f "/etc/alpine-release" ]]; then
# musllinux prep
Expand All @@ -36,17 +36,17 @@ fi

# hack until https://github.com/pypa/cibuildwheel/issues/1030 is fixed
# Place ccache folder in /outputs
HOST_CCACHE_DIR="/host${HOST_CCACHE_DIR:-/home/runner/work/rollnw/rollnw/.ccache}"
if [ -d $HOST_CCACHE_DIR ]; then
mkdir -p /output
cp -R $HOST_CCACHE_DIR /output/.ccache
fi
# HOST_CCACHE_DIR="/host${HOST_CCACHE_DIR:-/home/runner/work/rollnw/rollnw/.ccache}"
# if [ -d $HOST_CCACHE_DIR ]; then
# mkdir -p /output
# cp -R $HOST_CCACHE_DIR /output/.ccache
# fi

ls -la /output/
# ls -la /output/

ccache -o cache_dir="/output/.ccache"
ccache -M 5 G # set cache size to 5 G
# ccache -o cache_dir="/output/.ccache"
# ccache -M 5 G # set cache size to 5 G

# Show ccache stats
echo "Cache stats:"
ccache -s
# echo "Cache stats:"
# ccache -s

0 comments on commit cd470e7

Please sign in to comment.