Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions dockerfiles/build_manylinux_x86_64.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ WORKDIR /install-ccache
COPY install_ccache.sh ./
RUN ./install_ccache.sh "4.11.2" && rm -rf /install-ccache

######## SCCache ########
WORKDIR /install-sccache
COPY install_sccache.sh ./
RUN ./install_sccache.sh "0.14.0" && rm -rf /install-sccache

######## CMake ########
WORKDIR /install-cmake
ENV CMAKE_VERSION="3.27.9"
Expand Down
31 changes: 31 additions & 0 deletions dockerfiles/install_sccache.sh
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not just yum install sccache?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I checked: sccache isn’t in EPEL 8/9 (manylinux_2_28 is RHEL 8–based). Only ccache is there. Fedora has rust-sccache but that’s not in EPEL, so we’re installing the official GitHub release to get a current sccache (e.g. 0.14.0). See https://repology.org/project/sccache/versions — there’s no EPEL 8/9 entry for sccache.

Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/bin/bash
# Install sccache from official GitHub releases.
#
# Usage: ./install_sccache.sh <VERSION>
# Example: ./install_sccache.sh "0.13.0"

set -euo pipefail

SCCACHE_VERSION="$1"

ARCH="$(uname -m)"
if [ "${ARCH}" != "x86_64" ]; then
echo "Unsupported architecture: ${ARCH}. Only x86_64 is supported."
exit 1
fi
SCCACHE_ARCH="x86_64-unknown-linux-musl"

SCCACHE_TARBALL="sccache-v${SCCACHE_VERSION}-${SCCACHE_ARCH}.tar.gz"
SCCACHE_URL="https://github.com/mozilla/sccache/releases/download/v${SCCACHE_VERSION}/${SCCACHE_TARBALL}"

echo "Downloading sccache ${SCCACHE_VERSION} for ${ARCH}..."
curl --silent --fail --show-error --location \
"${SCCACHE_URL}" \
--output sccache.tar.gz

tar xf sccache.tar.gz
cp "sccache-v${SCCACHE_VERSION}-${SCCACHE_ARCH}/sccache" /usr/local/bin/
chmod +x /usr/local/bin/sccache

echo "sccache installed successfully:"
sccache --version
Loading