Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI enhancement: docker workflow speedup #2232

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

aradwann
Copy link
Contributor

@aradwann aradwann commented Nov 7, 2024

I realized that sccache report always says that it is not used,
image
and docker layers aren't cached too

In this PR, I made the following changes:

  • Cached Docker layers: I fixed the gha docker layer cache, the bug was that env vars ACTIONS_CACHE_URL
    ACTIONS_RUNTIME_TOKEN shouldn't be set manually, it populated automatically by gha
  • Removed unnecessary sccache action: The sccache action was removed since it doesn't work with building a Docker image.
  • injected sccache cache between Docker builds: by using reproducible-containers/buildkit-cache-dance@v3

Performance Improvement

  • The Docker build and push workflow time has decreased from 13 minutes to approximately 7 minutes.
    image

this could help resolve restatedev/dev-tools#7

@aradwann aradwann changed the title bump actions Ci enhancement Nov 7, 2024
@aradwann aradwann marked this pull request as ready for review November 9, 2024 13:26
@aradwann aradwann changed the title Ci enhancement CI enhancement: docker workflow speedup Nov 11, 2024
show sccache stats

update cache from/to config

try to optimize dockerfile

fix dockerfile

fix chef command

try to use sccache directory of the gh runner

enable debug logs for sccache

use build context to mount runner sccache to container sccache

fix typo

update sccache dir

update target destination

test

test

test

test

test

test

debug

revert dockerfile changes

try to cache manually

change cache dir

Trigger pipeline: test caching

remove sccache dir

Trigger pipeline: test caching

remove uneeded args

remove mozilla-actions/sccache-action, it doesn't work anyway

Trigger pipeline: test caching docker layers manually

set a better cache invalidation policy

use cargo.lock for cache key better than toml files

Trigger pipeline: local cache should work

fix growing cache size issue

Trigger pipeline: test after fixing growing cache size

try to inject sccache into docker builds

change key for docker caching

debug sccache

add sccache just command

debug sccache env vars

update rust wrapper env var

remove sccache debug logs

Trigger pipeline: test latest state

include dev-tools dockerfile in creating cache key

use cache map

Trigger pipeline: test latest state

try gha cache after letting gha set env vars automatically

Trigger pipeline: test gha cache

clean up after gha worked and try warp build cache

Trigger pipeline: test gha warpbuild cache
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.

Building Restate in debug mode using the dev-tools docker image is super slow
1 participant