elixir icon indicating copy to clipboard operation
elixir copied to clipboard

CI Build Times

Open neenjaw opened this issue 6 years ago • 7 comments

I was reviewing a PR for the track's, maintainer.json. And it occured to me that we are consume a lot of build CI time with the dialixir step since that often takes a huge amount of time.

Just trying to be a good steward of resources and whatnot (prompted by @chriseyre2000 's excellent book), I was wondering if we could cache some of the dialixir information to improve build times and improve the feedback loop to increase productivity.

@NobbZ pointed out a good observation:

Is there a way to cache some part of the dialyzer to help speed up this build?

> Yes

Or would that require a move to GitHub Actions?

> I have not looked into it, but given the structure exercism exercises usually have, dialyzer doesn't give anything. So I'd probably just remove it…

So what do you guys think? Should we refactor the CI to drop this step? Should we drop this step and migrate to GitHub actions (which seems to be quite snappy in comparison from what I've observed on the tester repo and anecdotally from @ErikSchierboom on the c# repo).

Thoughts?

neenjaw avatar Jan 16 '20 18:01 neenjaw

Oops, just commented in the other PR that:

I'm pretty sure that dialyzer run just errors out but since it isn't set to ci mode it still exits with status code 0. It can probably be removed entirely.

Cohen-Carlisle avatar Jan 17 '20 00:01 Cohen-Carlisle

If we’re going to keep typespecs in the stub files for exercises (not all of them, but they’re there in a good amount), I think we need to run Dialyzer to make sure they’re correct. The only thing worse than no documentation is incorrect documentation!

It’s totally possible to make this all run correctly, and also to cache the PLTs so that it doesn’t take nearly so long to run. I’ll take a look at it today.

devonestes avatar Jan 17 '20 07:01 devonestes

I've converted the C# and F# track from travis to GitHub Actions, and the speed difference was astonishing. Instead of 50+ minutes, the run completed in 5 minutes! So speed-wise, I was very happy with the transition to GitHub actions. It (of course) also has nice integration into the GitHub UI, which is nice as it is one less dependency to use.

ErikSchierboom avatar Jan 17 '20 07:01 ErikSchierboom

Dialyzer rarely finds errors in the typespecs of a function.

Because thats not its job. It tries to find errors on the caller of a function. But we never call anything we spec, except from within the tests, which again aren't checkable with dialyzer at all.

NobbZ avatar Jan 17 '20 11:01 NobbZ

So a question I have is now that they have been fixed for a few days and there has been a couple builds -- how long should a dialyzer build of this size take?

CI Run Times

Description Run time Total computing Time Link
Pre-fix 12 min 23 sec 1 hr 22 min 30 sec link
Fix 11 min 57 sec 1 hr 19 min 2 sec link
Post-fix 1 12 min 16 sec 1 hr 20 min 15 sec link
Post-fix 2 11 min 49 sec 1 hr 20 min 22 sec link
Post-fix 3 11 min 50 sec 1 hr 19 min 10 sec link

neenjaw avatar Jan 19 '20 15:01 neenjaw

When #545 is merged and the PLT caches are constructed, dialyzer is down to a minute of runtime. The next bottleneck appears to be the test time.

jwarwick avatar Oct 30 '20 20:10 jwarwick

Which I think probably means we could just close this issue as resolved

neenjaw avatar Oct 30 '20 20:10 neenjaw