linux icon indicating copy to clipboard operation
linux copied to clipboard

Reduce build time in GitHub workflows from 15 minutes to less than 2 mins

Open marc-hb opened this issue 8 months ago • 0 comments

I cam see in a recent run that the kernel build time takes more than 15 minutes in GitHub: https://github.com/thesofproject/linux/actions/runs/14659087983/job/41139376971

In a totally different project, I finally managed to combine ccache and https://github.com/actions/cache and got the kernel build time from 10 minutes (in my DRM-less Kconfig) down to less than 40 seconds!

Granted, 40 seconds is the new time to (re-)build the same kernel commit repeatedly. For the same commit, 10 min felt really silly. But I bet sof/linux can still get it under 2 minutes in many cases, even with a (not so) different commit. In the worst case (big merges) the build time should be about the same.

This was a typical GitHub challenge: easy only after you know how! So, I thought you might be interested in how:

  • In https://github.com/pmem/run_qemu/blob/b80bd6904ca9b394/.github/workflows/main.yml , search for "cache"
  • https://github.com/pmem/run_qemu/commit/b80bd6904ca9b3

cc: @bardliao , @dbaluta , @kv2019i , @ujfalusi , @ranj063

marc-hb avatar Apr 26 '25 17:04 marc-hb