[CI] Optimize docker build to fix disk space issues#85
Conversation
|
Caution Review failedThe pull request is closed. 📝 WalkthroughWalkthroughAdded a pre-checkout disk cleanup step to the GitHub Actions workflow and consolidated multi-step GCC and LLVM/Clang build sequences in the Dockerfile into single chained RUN commands with integrated cleanup. Changes
Sequence Diagram(s)(omitted) Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
/gemini review |
There was a problem hiding this comment.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
scripts/Dockerfile (1)
67-85: Fix broken WORKDIR after deleting /llvm-build.You delete
/llvm-buildinside the RUN, butWORKDIR /llvm-buildremains in effect for subsequent RUNs; the nextRUN echo ...will fail because the working directory no longer exists. Add aWORKDIR /immediately after this RUN (or stop deleting the directory).🔧 Proposed fix
RUN git clone --depth 1 --branch "llvmorg-${LLVM_VERSION}" --single-branch \ https://mirrors.tuna.tsinghua.edu.cn/git/llvm-project.git llvm-project && \ mkdir -p build && \ cd build && \ cmake -G Ninja \ @@ ninja && \ ninja install && \ cd / && \ rm -rf /llvm-build + +WORKDIR /
There was a problem hiding this comment.
Code Review
This pull request significantly optimizes the Docker build process by consolidating build steps and implementing immediate cleanup of build artifacts for both GCC and LLVM. These changes effectively reduce the number of Docker layers and the final image size, directly addressing the stated goal of fixing disk space issues and streamlining the CI/CD pipeline. The modifications are well-executed and represent a clear improvement in efficiency and resource management for the Docker image builds.
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.