Skip to content

Conversation

@harp-intel
Copy link
Contributor

@harp-intel harp-intel commented Jan 4, 2026

This pull request introduces a tool caching mechanism to speed up builds by reusing pre-built tool binaries, with integration for both local development and GitHub Actions. It also updates the Docker and Makefile workflows to support caching, ensures proper cache cleanup, and improves the build environment setup.

Tool caching and build workflow improvements:

  • Added logic in builder/build.sh to check for and use cached tool binaries from tools-cache, falling back to building from source if the cache is missing or incomplete. Also supports GitHub Actions cache integration and local cache extraction.
  • Updated .github/workflows/build-test.yml to set up Docker Buildx and cache tool binaries in CI, setting an environment flag when the cache is hit.
  • Modified builder/build.Dockerfile to accept a TOOLS_IMAGE build argument, pre-install Go tools, and pre-download Go module dependencies for faster builds.

Makefile and cache management:

  • Updated Makefile to exclude tools-cache from license checks and to add a clean-tools-cache target, ensuring cached binaries can be cleaned up with make clean. [1] [2]

Signed-off-by: Harper, Jason M <jason.m.harper@intel.com>
Signed-off-by: Harper, Jason M <jason.m.harper@intel.com>
Signed-off-by: Harper, Jason M <jason.m.harper@intel.com>
Signed-off-by: Harper, Jason M <jason.m.harper@intel.com>
Signed-off-by: Harper, Jason M <jason.m.harper@intel.com>
Signed-off-by: Harper, Jason M <jason.m.harper@intel.com>
Signed-off-by: Harper, Jason M <jason.m.harper@intel.com>
@harp-intel harp-intel requested a review from Copilot January 5, 2026 21:26
Copy link
Contributor

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

This PR implements a tool caching mechanism to significantly improve build performance by reusing pre-built tool binaries instead of rebuilding them from source on every build. The caching works for both local development (filesystem-based) and GitHub Actions (using GitHub's cache API).

Key Changes

  • Added intelligent cache detection and validation logic in builder/build.sh that checks for required files before using cached tools
  • Integrated GitHub Actions cache support with Docker Buildx for CI builds, with automatic cache extraction after successful builds
  • Pre-installed Go development tools and dependencies in the builder Docker image to reduce build times

Reviewed changes

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

File Description
builder/build.sh Implements core caching logic with validation, GitHub Actions integration, and automatic cache population after builds
builder/build.Dockerfile Pre-installs Go tools and downloads module dependencies; reorganizes dockerfile structure for better layer caching
Makefile Excludes tools-cache directory from license checks and adds cleanup target for cached binaries
.github/workflows/build-test.yml Sets up Docker Buildx and GitHub Actions cache for tool binaries with environment flag when cache is available

@harp-intel harp-intel merged commit ed14920 into main Jan 5, 2026
5 checks passed
@harp-intel harp-intel deleted the tools-build-cache branch January 5, 2026 21:29
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.

2 participants