Reduce CI build times

I’m using Circle CI to test and deploy my meteor app, and build times have really gotten out of hand. I just crossed 6 minutes per meteor test/deploy, which means it takes roughly 9 minutes for a simple CI build, and over 16 minutes for a test and deploy build.

Is there something I can do to reduce this by 2-5x in any way?

1 Like

My gzipped build file weighs in at 61MB, which sounds reasonable from what I could find online.

Are you doing a cold build every time? At the very least you’ll want to cache the meteor install, and if you have a lot of NPM packages then caching that would help a lot as well.

I just implemented CircleCI 2.0 and it seems quite a bit faster when using the docker mode vs. the machine mode. YMMV but worth trying.

it’s hard for anyone to help if you don’t provide your circle CI config file. idk what you’re caching or doing in your build, but the only ways to make tests faster are to either improve your caching logic, or run tests in parallel. for example you could have a workflow of one job to build the app and cache it, then two parallel jobs, one that does unit tests with the built app and one that runs e2e tests against a local server of the cached built app. I’ve got a circle config that caches the meteor install and all dependencies if you’d like to take a look (it’s not doing parallel jobs atm) https://github.com/ejfrancis/Meteor-Vue-Modular-App-Starter/blob/master/.circleci/config.yml

2 Likes