[PR #17] [MERGED] Optimize Docker cache for GitHub-hosted runners #120

Closed
opened 2026-10-29 14:19:55 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/kvcache-ai/AgentENV/pull/17
Author: @LSX-s-Software
Created: 7/27/2026
Status: ✅ Merged
Merged: 7/28/2026
Merged by: @yingdi-shan

Base: main ← Head: ci/optimize-cache


📝 Commits (1)

  • 64ebed6 ci: optimize Docker cache for GitHub-hosted runners

📊 Changes

3 files changed (+39 additions, -3 deletions)

View changed files

📝 .github/workflows/integration-tests.yml (+34 -1)
📝 .github/workflows/release.yml (+1 -0)
📝 deploy/docker/Dockerfile.agentenv (+4 -2)

📄 Description

This pull request introduces improvements to the Docker image build and caching strategy for CI workflows, especially for the docker-compose integration tests and image builds. The main changes ensure that Docker images are built and cached efficiently during CI runs, and that unnecessary rebuilds are avoided. Additionally, the Dockerfiles are updated to better leverage persistent layers for Rust build artifacts, improving cache reuse in CI environments.

CI workflow enhancements:

  • .github/workflows/integration-tests.yml: Added steps to set up Docker Buildx and build the agentenv-runtime, gateway, and scheduler images with caching when running the docker-compose integration tests. This ensures that images are always up-to-date and leverages GitHub Actions cache for faster builds.
  • .github/workflows/integration-tests.yml: Updated the make command for non-single-node tests to set SKIP_BUILD=1, preventing redundant local builds since images are already built in previous steps.

Docker build and cache improvements:

  • deploy/docker/Dockerfile.agentenv: Removed the BuildKit cache mount for the Cargo target directory and instead persist the build artifacts in the image layer. This allows external caches (like those used in CI runners) to reuse the dependency layer, speeding up builds on fresh runners.
  • .github/workflows/release.yml: Added cache-from for the agentenv-runtime image, so release builds can reuse previously built layers from the GitHub Actions cache, reducing build times.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/kvcache-ai/AgentENV/pull/17 **Author:** [@LSX-s-Software](https://github.com/LSX-s-Software) **Created:** 7/27/2026 **Status:** ✅ Merged **Merged:** 7/28/2026 **Merged by:** [@yingdi-shan](https://github.com/yingdi-shan) **Base:** `main` ← **Head:** `ci/optimize-cache` --- ### 📝 Commits (1) - [`64ebed6`](https://github.com/kvcache-ai/AgentENV/commit/64ebed6f8e3eb06d5952a1ac7084184d87db3f20) ci: optimize Docker cache for GitHub-hosted runners ### 📊 Changes **3 files changed** (+39 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/integration-tests.yml` (+34 -1) 📝 `.github/workflows/release.yml` (+1 -0) 📝 `deploy/docker/Dockerfile.agentenv` (+4 -2) </details> ### 📄 Description This pull request introduces improvements to the Docker image build and caching strategy for CI workflows, especially for the `docker-compose` integration tests and image builds. The main changes ensure that Docker images are built and cached efficiently during CI runs, and that unnecessary rebuilds are avoided. Additionally, the Dockerfiles are updated to better leverage persistent layers for Rust build artifacts, improving cache reuse in CI environments. **CI workflow enhancements:** * [`.github/workflows/integration-tests.yml`](diffhunk://#diff-4761c5069b46ce96f49d74476da61f43ced3abc73d22254cd95a2be0e250a593R77-R109): Added steps to set up Docker Buildx and build the `agentenv-runtime`, `gateway`, and `scheduler` images with caching when running the `docker-compose` integration tests. This ensures that images are always up-to-date and leverages GitHub Actions cache for faster builds. * [`.github/workflows/integration-tests.yml`](diffhunk://#diff-4761c5069b46ce96f49d74476da61f43ced3abc73d22254cd95a2be0e250a593L94-R127): Updated the make command for non-`single-node` tests to set `SKIP_BUILD=1`, preventing redundant local builds since images are already built in previous steps. **Docker build and cache improvements:** * [`deploy/docker/Dockerfile.agentenv`](diffhunk://#diff-875797b82816dfcac450829b3b6c1c8024f834ac69440a56f0ec5d550ed3a9e1R34-L44): Removed the BuildKit cache mount for the Cargo `target` directory and instead persist the build artifacts in the image layer. This allows external caches (like those used in CI runners) to reuse the dependency layer, speeding up builds on fresh runners. * [`.github/workflows/release.yml`](diffhunk://#diff-87db21a973eed4fef5f32b267aa60fcee5cbdf03c67fafdc2a9b553bb0b15f34R193): Added `cache-from` for the `agentenv-runtime` image, so release builds can reuse previously built layers from the GitHub Actions cache, reducing build times. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-29 14:19:55 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
kvcache-ai/AgentENV#120
No description provided.