Skip to content

Conversation

@stefanbinoj
Copy link
Contributor

@stefanbinoj stefanbinoj commented Oct 18, 2025

ref #1064
depends on #1068

NOTE:

  • The CI actions need to be run 2 times for the result to be present (1st time for building and caching the packages, 2nd time for viewing the result)

Attachments

Before After
Screenshot 2025-11-06 at 8 08 17 AM

Total = 2:05 mins

Screenshot 2025-11-06 at 8 01 02 AM

Total = 32 sec

Links to CI

Before After
View Before View After

Problem

  • While installing dependencies using pnpm install in CI, it runs post-install script, which in turn executes the run-on-packages script.
"postinstall": "pnpm run-on-packages build",
"run-on-packages": "pnpm run --filter=!helperai --if-present --workspace-concurrency=1"
  • This builds all the monorepo packages :
Screenshot 2025-10-18 at 3 32 42 PM
  • Building all packages during pnpm install makes it not cacheable
  • Also, it builds the unnecessary marketing package that is only used for the marketing front page and isn't necessary for testing (which adds 20-30 seconds)

Solution

  • Running pnpm install without the post-install script
  • Individually building and caching the dependent packages sequentially in order
  • This helps in reducing a 1.40 - 2.10 min step to a 20-30 second step (saves ~1.30 mins)
Without cache - new code With cache - new code
Screenshot 2025-11-06 at 8 04 42 AM Screenshot 2025-11-06 at 8 01 02 AM

AI Usage

  • Warp AI (auto-mode): was used for reasoning and helping to understand the workflow and package dependencies
  • GPT-5 via Warp : was used for asking questions and reasoning about side-effects of each CI code changed.

Self Review

  • All code was written by myself and I have reviewed all the code

Live Stream Disclosure

Viewed both live streams of antiwork and guidelines to follow

@stefanbinoj stefanbinoj changed the title Improve cache v2 perf(ci): Speed up CI by 1.3-1.4 minutes using improved caching strategy Oct 18, 2025
@stefanbinoj
Copy link
Contributor Author

@binary-koan can i get a review?

@stefanbinoj
Copy link
Contributor Author

@binary-koan seems like a flaky test is failing (unrelated to changes in this PR)

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.

1 participant