Skip to content

fix(CI): Cache compilation results#9328

Closed
upbqdn wants to merge 40 commits intomainfrom
fix-deploy-gcp
Closed

fix(CI): Cache compilation results#9328
upbqdn wants to merge 40 commits intomainfrom
fix-deploy-gcp

Conversation

@upbqdn
Copy link
Copy Markdown
Member

@upbqdn upbqdn commented Mar 14, 2025

Motivation

Depends-On: #9344

Solution

Clean-ups

  • Mount lwd's and Zebra's cached states to implicit locations instead of explicitly specifying the location in each test.

Tests

  • CI is noticeably faster.

PR Checklist

  • The PR name is suitable for the release notes.
  • The solution is tested.
  • The documentation is up to date.
  • The PR has a priority label.
  • If the PR shouldn't be in the release notes, it has the
    C-exclude-from-changelog label.

@upbqdn upbqdn added A-devops Area: Pipelines, CI/CD and Dockerfiles C-cleanup Category: This is a cleanup P-Low ❄️ labels Mar 14, 2025
@upbqdn
Copy link
Copy Markdown
Member Author

upbqdn commented Mar 15, 2025

This PR seems to make CI noticeably faster.

@upbqdn
Copy link
Copy Markdown
Member Author

upbqdn commented Mar 15, 2025

We could bring the CI time down to ~25 minutes if we moved these three tests to run only on main:

image

Comment on lines +87 to +92
cp -a ${CARGO_TARGET_DIR} ${HOME}/tmp_target && \
cp -a ${CARGO_HOME} ${HOME}/tmp_cargo_home

RUN rm -rf ${CARGO_TARGET_DIR} && rm -rf ${CARGO_HOME} && \
mv ${HOME}/tmp_target ${CARGO_TARGET_DIR} && \
mv ${HOME}/tmp_cargo_home ${CARGO_HOME}
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This is a rather awful hack. I think there could a cleaner solution, but I coulnd't come up with anything better.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Why is this needed?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This might be the best context to answer that #6169 (comment)

@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Apr 1, 2025

Merge Protections

Your pull request matches the following merge protections and will not be merged until they are valid.

🟢 ⛓️ Depends-On Requirements

Wonderful, this rule succeeded.

Requirement based on the presence of Depends-On in the body of the pull request

@gustavovalverde
Copy link
Copy Markdown
Member

gustavovalverde commented Apr 17, 2025

@upbqdn can you rebase this PR so we can re-test it?

Or we can use:

@upbqdn
Copy link
Copy Markdown
Member Author

upbqdn commented Apr 17, 2025

This PR is based on the one we reverted. I don't think it's worth rebasing. It'll be easier to start from scratch again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-devops Area: Pipelines, CI/CD and Dockerfiles C-cleanup Category: This is a cleanup C-exclude-from-changelog Category: The PR should be excluded from the changelog and release notes P-Low ❄️

Projects

No open projects
Status: Won't Fix

Development

Successfully merging this pull request may close these issues.

CI recompiles Zebra from scratch for each CI test

4 participants