From 1f22e797134b2d36d05430d03ba14d7246eab232 Mon Sep 17 00:00:00 2001 From: Stella Laurenzo Date: Tue, 23 Jan 2024 18:02:11 -0800 Subject: [PATCH] Update ccache. --- build_tools/install_ccache.sh | 19 +++++++++++++++++++ dockerfiles/manylinux_ghr_x86_64.Dockerfile | 8 +++++++- 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100755 build_tools/install_ccache.sh 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