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

GitHub Action: Improve caching build CLI tool #2165

Open
AmmarAbouZor opened this issue Jan 3, 2025 · 0 comments
Open

GitHub Action: Improve caching build CLI tool #2165

AmmarAbouZor opened this issue Jan 3, 2025 · 0 comments
Assignees
Labels
new newly created issue

Comments

@AmmarAbouZor
Copy link
Member

We still have problems with the current solution caching the build CLI tool binary in GitHub Actions. These problems occur especially with branches that have changes on the build CLI tool and have multiple CI runs.
The following problems has been detected:

  1. The cached binaries are saved among master and all branches which lead mismatched versions in case an action runs on master between two actions runs in the PR branch (Which happened in Protocol based on serde #2161)
  2. Any changes in a branch after changing Cargo.toml file won't trigger building new binaries because we are keeping track on the changes on Cargo.toml file in the build CLI tool directory only.

Suggetions:

Having a cache for each branch:

This would solve the first issue but won't solve the second one. Besides, the binary will be built for each branch at least once disregarding if it introduced changes to the build CLI or not

Keep track on all code files in Build CLI tool directory:

With keeping track on all code files instead of cargo.toml only we solve the second problem, but the first one will still unresolved.

Installing the CLI on each run and use other caching tools:

We can explore other cache tools in the rust community like sscache and install the tool with --locked flag. With this approach we don't need to recompile the already cache binary artifacts reducing the build time significantly

@github-actions github-actions bot added the new newly created issue label Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new newly created issue
Projects
None yet
Development

No branches or pull requests

2 participants