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

Optimize CI setup to <20s #34123

Closed
wants to merge 2 commits into from

Conversation

vishwamartur
Copy link

Related to #30706

Optimize the setup-with-retry stage in CI jobs to finish in less than 20 seconds.

  • Dockerfile.openpilot_base

    • Split the installation of Python dependencies into smaller layers to improve download concurrency.
    • Add comments to explain the changes made.
  • .github/workflows/setup-with-retry/action.yaml

    • Reduce the sleep time between retries to 5 seconds.
    • Add a step to cache Python dependencies using GitHub Actions cache.
  • .github/workflows/setup/action.yaml

    • Add a step to restore the Python dependencies cache.
    • Add a step to save the Python dependencies cache.

Related to commaai#30706

Optimize the `setup-with-retry` stage in CI jobs to finish in less than 20 seconds.

* **Dockerfile.openpilot_base**
  - Split the installation of Python dependencies into smaller layers to improve download concurrency.
  - Add comments to explain the changes made.

* **.github/workflows/setup-with-retry/action.yaml**
  - Reduce the sleep time between retries to 5 seconds.
  - Add a step to cache Python dependencies using GitHub Actions cache.

* **.github/workflows/setup/action.yaml**
  - Add a step to restore the Python dependencies cache.
  - Add a step to save the Python dependencies cache.
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Thanks for contributing to openpilot! In order for us to review your PR as quickly as possible, check the following:

  • Convert your PR to a draft unless it's ready to review
  • Read the contributing docs
  • Before marking as "ready for review", ensure:
    • the goal is clearly stated in the description
    • all the tests are passing
    • the change is something we merge
    • include a route or your device' dongle ID if relevant

@adeebshihadeh
Copy link
Contributor

Looks like this is still a WIP? First one I checked is >1m
image

@adeebshihadeh adeebshihadeh marked this pull request as draft November 28, 2024 17:57
Comment on lines 41 to 42
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
Copy link
Contributor

Choose a reason for hiding this comment

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

This caching approach won't work with our python setup.

* **Setup containerd and lazy loading:**
  - Add steps to set up containerd using `ghaction-setup-containerd` in `setup-with-retry/action.yaml` and `setup/action.yaml`
  - Add steps to use lazy loading with eStargz in `setup-with-retry/action.yaml` and `setup/action.yaml`

* **Parallelize CI jobs:**
  - Add steps to run `setup-with-retry` and build openpilot in parallel in `compile-openpilot/action.yaml` and `selfdrive_tests.yaml`
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants