Skip to content

Modernise Dockerfile and cache Docker build layers in CI#8855

Open
tautschnig wants to merge 1 commit intodiffblue:developfrom
tautschnig:docker-cache
Open

Modernise Dockerfile and cache Docker build layers in CI#8855
tautschnig wants to merge 1 commit intodiffblue:developfrom
tautschnig:docker-cache

Conversation

@tautschnig
Copy link
Collaborator

@tautschnig tautschnig commented Mar 10, 2026

Modernise the Dockerfile syntax:

  • Use '=' form for ENV directives (required by newer Docker versions)
  • Use uppercase AS for multi-stage build aliases

Speed up the check-docker-image CI job by caching Docker build layers
via BuildKit's GitHub Actions cache backend (type=gha). On cache hit
the expensive cmake/ninja layer is skipped entirely. Uses mode=max to
cache intermediate layers from the multi-stage build.

Co-authored-by: Kiro kiro-agent@users.noreply.github.com

  • Each commit message has a non-empty body, explaining why the change was made.
  • n/a Methods or procedures I have added are documented, following the guidelines provided in CODING_STANDARD.md.
  • n/a The feature or user visible behaviour I have added or modified has been documented in the User Guide in doc/cprover-manual/
  • Regression or unit tests are included, or existing tests cover the modified code (in this case I have detailed which ones those are in the commit message).
  • My commit message includes data points confirming performance improvements (if claimed).
  • My PR is restricted to a single feature or bugfix.
  • n/a White-space or formatting changes outside the feature-related changed lines are in commits of their own.

@tautschnig tautschnig requested review from a team, kroening and peterschrammel as code owners March 10, 2026 10:34
Copilot AI review requested due to automatic review settings March 10, 2026 10:34
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Enable compiler caching in Docker builds (via BuildKit cache mounts + ccache) to speed up repeated rebuilds, and modernize Dockerfile syntax.

Changes:

  • Add BuildKit syntax directive and a cache mount for /root/.cache/ccache, plus install ccache in the builder stage
  • Configure CMake to use ccache via CMAKE_*_COMPILER_LAUNCHER
  • Update CI Docker build command to pass BUILDKIT_INLINE_CACHE=1

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
Dockerfile Adds ccache + BuildKit cache mount and updates Dockerfile syntax for multi-stage build/env vars.
.github/workflows/pull-request-checks.yaml Adjusts Docker build invocation to pass a BuildKit inline-cache build arg.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@tautschnig tautschnig changed the title Speed up Docker builds with BuildKit ccache mount Modernise Dockerfile and cache Docker build layers in CI Mar 10, 2026
@tautschnig tautschnig requested a review from Copilot March 10, 2026 10:44
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov
Copy link

codecov bot commented Mar 10, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.00%. Comparing base (7a4df92) to head (ebf3b85).

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #8855      +/-   ##
===========================================
- Coverage    80.01%   80.00%   -0.01%     
===========================================
  Files         1703     1703              
  Lines       188396   188396              
  Branches        73       73              
===========================================
- Hits        150738   150735       -3     
- Misses       37658    37661       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Modernise the Dockerfile syntax:
- Use '=' form for ENV directives (required by newer Docker versions)
- Use uppercase AS for multi-stage build aliases

Speed up the check-docker-image CI job by caching Docker build layers
via BuildKit's GitHub Actions cache backend (type=gha). On cache hit
the expensive cmake/ninja layer is skipped entirely. Uses mode=max to
cache intermediate layers from the multi-stage build.

Co-authored-by: Kiro <kiro-agent@users.noreply.github.com>
@@ -1014,8 +1014,14 @@ jobs:
run: |
sudo apt update
sudo apt install openjdk-11-jdk-headless
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is that even used?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants