Skip to content

Speed up macOS dependency installation in CI - #847

Merged
artemgavrilov merged 2 commits into
mainfrom
macos-ci-speedup
Nov 3, 2026
Merged

artemgavrilov merged 2 commits into
mainfrom
macos-ci-speedup

Conversation

@artemgavrilov

@artemgavrilov artemgavrilov commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

brew update re-syncs the whole formula index on every job even though the dependencies are already current in the runner image. Skip it and suppress the implicit auto-update in brew install.

Install the Perl test modules with cpanm instead of cpan, which reconfigures and re-indexes CPAN on first use.

PG-0

Description

Links

@codecov

codecov Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.49%. Comparing base (4426464) to head (d8a2ea5).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #847   +/-   ##
=======================================
  Coverage   88.49%   88.49%           
=======================================
  Files           3        3           
  Lines        1330     1330           
  Branches      196      196           
=======================================
  Hits         1177     1177           
  Misses         75       75           
  Partials       78       78           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@artemgavrilov
artemgavrilov marked this pull request as ready for review October 7, 2026 09:47

@jeltz jeltz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

While I agree with the direction of the change this looks like AI nonsense, especially the CPAN changes.

@artemgavrilov

artemgavrilov commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor Author

While I agree with the direction of the change this looks like AI nonsense, especially the CPAN changes.

But what exactly you don't like? cpan downloads index file and parse it locally, while cpanm queries remote API and saves time on that. Also it's what recommended on https://www.cpan.org/modules/INSTALL.html

Probably checking deps is redundant. Will drop it.

@jeltz

jeltz commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

Still looks like mostly AI nonsense. Like why the random env stuff? And since when did we start using markdown in our commit messages? And how much time do we save with cpanminus especially since we now need to install it.

@artemgavrilov

artemgavrilov commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor Author

Like why the random env stuff?

Why random?

  • HOMEBREW_NO_AUTO_UPDATE - disables automatic index refresh, so brew install wolud not trigger brew update.
  • HOMEBREW_NO_INSTALL_CLEANUP - disables cleanup after install as runner will be thrown away.
  • HOMEBREW_NO_ENV_HINTS - don't print hints, no one needs them in CI

how much time do we save with cpanminus especially since we now need to install it.

cpan -T takes ~45sec
brew install cpanminus+ cpanm --notest takes 3 sec

when did we start using markdown

That's just my habbit, to wrap all commands with ``, this is not an LLM part. Message itself probably are (I usually write commit messages myself).

@jeltz

jeltz commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

Why not HOMEBREW_NO_EMOJI then too? I would say if you have HOMEBREW_NO_ENV_HINTS you want that one too. Also HOMEBREW_NO_ANALYTICS. I think thinks like HOMEBREW_NO_ENV_HINTS deserve to be explained in a commit message. We right now generelly do not try to silence stuff in our CI, maybe we should be we do not.

@jeltz

jeltz commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

Also should we add HOMEBREW_NO_BOOTSNAP? Damn, so many options.

@jeltz

jeltz commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

I think we either should do a minimalstic set with all the major speeduos or actually check in the manual and enable everything we find that should be enabled/disabled for automatic CI use.

@artemgavrilov

Copy link
Copy Markdown
Contributor Author

I think we either should do a minimalstic set with all the major speeduos or actually check in the manual and enable everything we find that should be enabled/disabled for automatic CI use.

Ok, that's philosophical difference between our approaches. What are the changes from this PR good to go? This 3 minutes vs 30 seconds change.

@jeltz

jeltz commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

Just remove export HOMEBREW_NO_ENV_HINTS=1 and it is good to go. We can add such things but they should be in their own commits which justify them.

CI image already have update brew index, so avoid updating it. Also skip
post install cleanup.
Unlike cpan, cpanm don't download whole index but queries remote API.
Also it doesn't install any recommneded dependencies by default, only
specified ones.

@jeltz jeltz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We do not use

@artemgavrilov
artemgavrilov merged commit 73055f3 into main Nov 3, 2026
32 of 36 checks passed
@artemgavrilov
artemgavrilov deleted the macos-ci-speedup branch November 3, 2026 13:16
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.

2 participants