kiesraad / abacus

Abacus, software voor verkiezingsuitslagen en zetelverdeling
https://kiesraad-abacus.pages.dev
European Union Public License 1.2
19 stars 6 forks source link

Also build and test on Windows and macOS in CI #631

Open praseodym opened 4 days ago

praseodym commented 4 days ago

Closes #362

Open question: do we want to run the CI pipeline on all platforms for each PR commit, or only when merging the PR (in the merge queue)?

praseodym commented 4 days ago

The main thing we should really be doing is caching compiled dependencies, building the application itself should really be done in less than 10 seconds (which it does on my laptop), recompiling the same dependencies over and over again and taking 10 minutes to do it really shouldn't happen. On some other projects I've used https://github.com/Swatinem/rust-cache with just a global cache for all branches, and that brings down compilation times massively already.

We're already doing this:

https://github.com/kiesraad/abacus/blob/a6f5a01c122607c359716833b513d46cf127f0bb/.github/workflows/build-lint-test.yml#L40-L52

I don't think the Swatinem/rust-cache is significantly different from this, but if we're missing something I'd rather change our existing cache step than introducing a new dependency on a third party repository.

GitHub Actions always limits the use of caches across branches, and that action also mentions this: "Caches from base branches are available to PRs, but not across unrelated branches.". There is also a 10GB cache limit per repository.