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

Speed up CI setup to ~25-~40s with actions/cache use #34321

Closed
wants to merge 3 commits into from

Conversation

pantew869
Copy link
Contributor

@pantew869 pantew869 commented Dec 30, 2024

For #30706
Github actions cache speed is quite inconsistent (varies from 50MB/s to 300+MB/s), so worst case scenario is ~40s.
Example run: https://github.com/commaai/openpilot/actions/runs/12552012526

@maxime-desroches
Copy link
Contributor

The process replay job took 46s so this does not fully address the bounty or the sub-bounty requirements

Comment on lines +54 to +59
- id: docker-cache-restore
uses: ./.github/workflows/auto-cache
with:
path: .ci_cache/docker
restore-keys: docker-${{ hashFiles('Dockerfile.openpilot_base', 'tools/install_ubuntu_dependencies.sh', 'tools/install_python_dependencies.sh', 'uv.lock', '.github/workflows/setup/action.yaml') }}
key: docker-${{ hashFiles('Dockerfile.openpilot_base', 'tools/install_ubuntu_dependencies.sh', 'tools/install_python_dependencies.sh', 'uv.lock', '.github/workflows/setup/action.yaml') }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't want to do all that extra caching when using a namespace runner, aka when this condition is true: ((github.repository == 'commaai/openpilot') && ((github.event_name != 'pull_request') || (github.event.pull_request.head.repo.full_name == 'commaai/openpilot')))

if: steps.docker-cache-restore.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
env:
ZSTD_NBTHREADS: 0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's interesting. How much does it affect the total setup time?

Copy link
Contributor

This PR has had no activity for 9 days. It will be automatically closed in 2 days if there is no activity.

@github-actions github-actions bot added the stale label Jan 17, 2025
Copy link
Contributor

This PR has been automatically closed due to inactivity. Feel free to re-open once activity resumes.

@github-actions github-actions bot closed this Jan 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants