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

Cache apt packages #7978

Merged
merged 2 commits into from
Jan 5, 2025
Merged

Cache apt packages #7978

merged 2 commits into from
Jan 5, 2025

Conversation

ADmad
Copy link
Member

@ADmad ADmad commented Jan 4, 2025

No description provided.

@ADmad ADmad added this to the 5.x milestone Jan 4, 2025
@ADmad ADmad marked this pull request as ready for review January 4, 2025 12:07
@LordSimal
Copy link
Contributor

currently that step takes 3 minutes per variant in CI.
Will this improve in future runs?

- uses: awalsh128/cache-apt-pkgs-action@v1
with:
packages: texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended texlive-lang-all
version: 1.0
Copy link
Member

Choose a reason for hiding this comment

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

Do we need execute_install_scripts: true ?

Copy link
Member Author

Choose a reason for hiding this comment

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

The install seemed to worked fine without it hence I didn't add it. These packages probably don't have any post install scripts.

- uses: awalsh128/cache-apt-pkgs-action@v1
with:
packages: texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended texlive-lang-all
version: 1.0
Copy link
Member

Choose a reason for hiding this comment

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

Should the version be ubuntu-24.04 instead of 1.0?

Copy link
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 user defined value. Can be anything you want, so I just used what's shown in their docs.

Copy link
Member

@othercorey othercorey Jan 5, 2025

Choose a reason for hiding this comment

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

I'm saying it's tied to this CI, right, so we want it to change on version change? I doubt we're updating ubuntu any time soon - not sure what happens when it needs to install newer versions.

Copy link
Member Author

Choose a reason for hiding this comment

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

I have updated the cache version to match the OS

Copy link
Member Author

@ADmad ADmad left a comment

Choose a reason for hiding this comment

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

currently that step takes 3 minutes per variant in CI.
Will this improve in future runs?

This was the first run where the cache would be populated, so hopefully we will see the improvement in future runs.

- uses: awalsh128/cache-apt-pkgs-action@v1
with:
packages: texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended texlive-lang-all
version: 1.0
Copy link
Member Author

Choose a reason for hiding this comment

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

The install seemed to worked fine without it hence I didn't add it. These packages probably don't have any post install scripts.

- uses: awalsh128/cache-apt-pkgs-action@v1
with:
packages: texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended texlive-lang-all
version: 1.0
Copy link
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 user defined value. Can be anything you want, so I just used what's shown in their docs.

That way it's easier to remember updating the key when the OS version is changed.
@LordSimal
Copy link
Contributor

This was the first run where the cache would be populated, so hopefully we will see the improvement in future runs.

looking at that last commit it doesn't seem like it...

@ADmad
Copy link
Member Author

ADmad commented Jan 5, 2025

looking at that last commit it doesn't seem like it...

In the last commit the cache version was changed so it would recreate the cache.

@othercorey
Copy link
Member

I triggered a re-run to test.

@ADmad
Copy link
Member Author

ADmad commented Jan 5, 2025

I triggered a re-run to test.

The cache step only took 12s, @LordSimal can rest easy now 😄.

@LordSimal
Copy link
Contributor

Just making sure that this change actually works. Otherwise it would just be an external dependency in the built step which could break in the future 😉

@LordSimal LordSimal merged commit 9219965 into 5.x Jan 5, 2025
3 checks passed
@LordSimal LordSimal deleted the apt-cache branch January 5, 2025 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants