[chore] Disable ccache for sgl-kernel release (#13541)

This commit is contained in:
Baizhou Zhang
2025-11-18 14:28:58 -08:00
committed by GitHub
parent 92ad2ff9ce
commit 10969ae4be
2 changed files with 56 additions and 41 deletions
+4
View File
@@ -45,6 +45,8 @@ jobs:
cd sgl-kernel cd sgl-kernel
chmod +x ./build.sh chmod +x ./build.sh
./build.sh "${{ matrix.python-version }}" "${{ matrix.cuda-version }}" ${{ matrix.arch == 'aarch64' && 'aarch64' || '' }} ./build.sh "${{ matrix.python-version }}" "${{ matrix.cuda-version }}" ${{ matrix.arch == 'aarch64' && 'aarch64' || '' }}
env:
USE_CCACHE: 0
- name: Upload to PyPI - name: Upload to PyPI
working-directory: sgl-kernel working-directory: sgl-kernel
@@ -136,6 +138,8 @@ jobs:
cd sgl-kernel cd sgl-kernel
chmod +x ./build.sh chmod +x ./build.sh
./build.sh "${{ matrix.python-version }}" "${{ matrix.cuda-version }}" ${{ matrix.arch == 'aarch64' && 'aarch64' || '' }} ./build.sh "${{ matrix.python-version }}" "${{ matrix.cuda-version }}" ${{ matrix.arch == 'aarch64' && 'aarch64' || '' }}
env:
USE_CCACHE: 0
- name: Upload artifacts - name: Upload artifacts
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
+52 -41
View File
@@ -48,6 +48,7 @@ echo "Cache Configuration"
echo "===================================" echo "==================================="
echo "CMake download cache: ${CMAKE_DOWNLOAD_CACHE}" echo "CMake download cache: ${CMAKE_DOWNLOAD_CACHE}"
echo "ccache directory: ${CCACHE_DIR}" echo "ccache directory: ${CCACHE_DIR}"
echo "ccache enabled: ${USE_CCACHE:-1}"
echo "" echo ""
docker run --rm \ docker run --rm \
@@ -56,6 +57,7 @@ docker run --rm \
-v ${CCACHE_DIR}:/ccache \ -v ${CCACHE_DIR}:/ccache \
-e ENABLE_CMAKE_PROFILE="${ENABLE_CMAKE_PROFILE:-}" \ -e ENABLE_CMAKE_PROFILE="${ENABLE_CMAKE_PROFILE:-}" \
-e ENABLE_BUILD_PROFILE="${ENABLE_BUILD_PROFILE:-}" \ -e ENABLE_BUILD_PROFILE="${ENABLE_BUILD_PROFILE:-}" \
-e USE_CCACHE="${USE_CCACHE:-1}" \
${DOCKER_IMAGE} \ ${DOCKER_IMAGE} \
bash -c " bash -c "
set -e set -e
@@ -98,49 +100,56 @@ docker run --rm \
which cmake which cmake
cmake --version cmake --version
echo \"==================================\" if [ \"${USE_CCACHE}\" = \"1\" ]; then
echo \"Installing and configuring ccache\" echo \"==================================\"
echo \"==================================\" echo \"Installing and configuring ccache\"
echo \"==================================\"
# Install ccache 4.12.1 from source for CUDA support (yum provides old 3.7.7) # Install ccache 4.12.1 from source for CUDA support (yum provides old 3.7.7)
echo \"Installing ccache 4.12.1 from source...\" echo \"Installing ccache 4.12.1 from source...\"
# Install build dependencies # Install build dependencies
yum install -y gcc gcc-c++ make wget tar yum install -y gcc gcc-c++ make wget tar
# Download and build ccache 4.12.1 # Download and build ccache 4.12.1
cd /tmp cd /tmp
wget -q https://github.com/ccache/ccache/releases/download/v4.12.1/ccache-4.12.1.tar.xz wget -q https://github.com/ccache/ccache/releases/download/v4.12.1/ccache-4.12.1.tar.xz
tar -xf ccache-4.12.1.tar.xz tar -xf ccache-4.12.1.tar.xz
cd ccache-4.12.1 cd ccache-4.12.1
# Build and install (uses already-installed CMake 3.31) # Build and install (uses already-installed CMake 3.31)
mkdir build && cd build mkdir build && cd build
/opt/cmake/bin/cmake -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=/usr .. >/dev/null /opt/cmake/bin/cmake -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=/usr .. >/dev/null
make -j\$(nproc) >/dev/null make -j\$(nproc) >/dev/null
make install >/dev/null make install >/dev/null
# Verify installation # Verify installation
ccache --version ccache --version
echo \"ccache 4.12.1 installed successfully\" echo \"ccache 4.12.1 installed successfully\"
cd /sgl-kernel cd /sgl-kernel
# Configure ccache # Configure ccache
export CCACHE_DIR=/ccache export CCACHE_DIR=/ccache
export CCACHE_BASEDIR=/sgl-kernel export CCACHE_BASEDIR=/sgl-kernel
export CCACHE_MAXSIZE=10G export CCACHE_MAXSIZE=10G
export CCACHE_COMPILERCHECK=content export CCACHE_COMPILERCHECK=content
export CCACHE_COMPRESS=true export CCACHE_COMPRESS=true
export CCACHE_SLOPPINESS=file_macro,time_macros,include_file_mtime,include_file_ctime export CCACHE_SLOPPINESS=file_macro,time_macros,include_file_mtime,include_file_ctime
# Set up ccache as compiler launcher (don't use PATH to avoid -ccbin conflicts) # Set up ccache as compiler launcher (don't use PATH to avoid -ccbin conflicts)
export CMAKE_C_COMPILER_LAUNCHER=ccache export CMAKE_C_COMPILER_LAUNCHER=ccache
export CMAKE_CXX_COMPILER_LAUNCHER=ccache export CMAKE_CXX_COMPILER_LAUNCHER=ccache
export CMAKE_CUDA_COMPILER_LAUNCHER=ccache export CMAKE_CUDA_COMPILER_LAUNCHER=ccache
# Show ccache stats before build # Show ccache stats before build
ccache -sV || true ccache -sV || true
echo \"\" echo \"\"
else
echo \"==================================\"
echo \"ccache disabled (USE_CCACHE=0)\"
echo \"==================================\"
echo \"\"
fi
yum install numactl-devel -y --nogpgcheck && \ yum install numactl-devel -y --nogpgcheck && \
yum install libibverbs -y --nogpgcheck && \ yum install libibverbs -y --nogpgcheck && \
@@ -223,10 +232,12 @@ docker run --rm \
fi fi
# Show ccache statistics after build # Show ccache statistics after build
echo \"\" if [ \"${USE_CCACHE}\" = \"1\" ]; then
echo \"==================================\" echo \"\"
echo \"ccache Statistics\" echo \"==================================\"
echo \"==================================\" echo \"ccache Statistics\"
ccache -s echo \"==================================\"
echo \"\" ccache -s
echo \"\"
fi
" "