diff --git a/build_tools/install_ccache.sh b/build_tools/install_ccache.sh new file mode 100755 index 0000000..46c878e --- /dev/null +++ b/build_tools/install_ccache.sh @@ -0,0 +1,19 @@ +#!/bin/bash +# Copyright 2022 The IREE Authors +# +# Licensed under the Apache License v2.0 with LLVM Exceptions. +# See https://llvm.org/LICENSE.txt for license information. +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + +set -euo pipefail + +CCACHE_VERSION="$1" + +ARCH="$(uname -m)" + +curl --silent --fail --show-error --location \ + "https://github.com/ccache/ccache/releases/download/v${CCACHE_VERSION}/ccache-${CCACHE_VERSION}-linux-${ARCH}.tar.xz" \ + --output ccache.tar.xz + +tar xf ccache.tar.xz +cp ccache-${CCACHE_VERSION}-linux-${ARCH}/ccache /usr/local/bin diff --git a/dockerfiles/manylinux_ghr_x86_64.Dockerfile b/dockerfiles/manylinux_ghr_x86_64.Dockerfile index 1165407..b85c778 100644 --- a/dockerfiles/manylinux_ghr_x86_64.Dockerfile +++ b/dockerfiles/manylinux_ghr_x86_64.Dockerfile @@ -44,13 +44,19 @@ RUN chmod +x /token.sh /entrypoint.sh /app_token.sh # Note that the actions-runner install script does yum transactions. RUN yum install -y epel-release && \ yum install -y dumb-init jq && \ - yum install -y ccache ninja-build clang lld && \ + yum install -y ninja-build clang lld && \ yum install -y capstone-devel tbb-devel libzstd-devel && \ yum install -y boost-devel && \ /actions-runner/install_actions.sh ${GH_RUNNER_VERSION} ${TARGETPLATFORM} && \ yum clean all && \ rm -rf /var/cache/yum +######## CCache ######## +WORKDIR /install-ccache + +COPY build_tools/install_ccache.sh ./ +RUN ./install_ccache.sh "4.9" && rm -rf /install-ccache + ######## CMake ######## WORKDIR /install-cmake