Skip to content
This repository has been archived by the owner on Oct 31, 2024. It is now read-only.

chore: add cache mount for sccache #226

Merged
merged 1 commit into from
May 11, 2023
Merged

Conversation

foo0x29a
Copy link
Contributor

@foo0x29a foo0x29a commented May 3, 2023

Description

At the moment, caching capabilities using sccache with S3 are only available for the CI workflow.

With this pull request, caching for local builds will be available, similar to what is done for CI workflows. However, instead of using S3, Docker cache mounts are utilized to store and retrieve cached objects.

Fixes # (TOO-290)

Additions and Changes

To enable the usage of sccache, the argument RUSTC_WRAPPER needs to be set to /usr/local/cargo/bin/sccache:

$ docker build . \
    --tag topos \
    --progress=plain \
    --build-arg TOOLCHAIN_VERSION=stable \
    --build-arg FEATURES=tce,sequencer,network \
    --build-arg RUSTC_WRAPPER=/usr/local/cargo/bin/sccache

First local build:
Screenshot 2023-05-04 at 11 46 39 AM

Build using cache:
Screenshot 2023-05-04 at 11 49 53 AM

PR Checklist:

  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added or updated tests that comprehensively prove my change is effective or that my feature works

@foo0x29a foo0x29a self-assigned this May 4, 2023
@foo0x29a foo0x29a marked this pull request as ready for review May 4, 2023 16:16
@foo0x29a foo0x29a requested a review from a team as a code owner May 4, 2023 16:16
@foo0x29a foo0x29a requested review from Freyskeyd and gruberb May 4, 2023 16:16
@foo0x29a
Copy link
Contributor Author

foo0x29a commented May 5, 2023

Hey @atanmarko , seems the Sequencer Topos jobs are failing to pull Docker images. Do you have any thoughts on this?

@Freyskeyd Freyskeyd force-pushed the feat/add-local-sccache branch from 91e75f8 to 3a4ccdc Compare May 11, 2023 14:49
@Freyskeyd Freyskeyd merged commit cc10168 into main May 11, 2023
@Freyskeyd Freyskeyd deleted the feat/add-local-sccache branch May 11, 2023 15:02
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants