Skip to content

Enable GitHub Actions for continuous integration#1389

Merged
alecjacobson merged 2 commits intolibigl:devfrom
jdumas:jdumas/github-actions
Apr 8, 2020
Merged

Enable GitHub Actions for continuous integration#1389
alecjacobson merged 2 commits intolibigl:devfrom
jdumas:jdumas/github-actions

Conversation

@jdumas
Copy link
Copy Markdown
Collaborator

@jdumas jdumas commented Dec 19, 2019

This PR enables GitHub Actions on the libigl repository for continuous integration.

Highlights

  • Same config file for Linux/macOS/Windows, easier to mainain.
  • Incremental builds with 100% cache hits only take 10min in total (huge improvement!).
  • Continuous build and PR checks are only testing Release configurations, since build artifacts are much smaller.
  • I added a daily build, which runs at 4am UTC every day, and test gcc 7, 8, 9, clang 7, 8, 9, macOS and Windows in both Debug+Release, and with and without LIBIGL_USE_STATIC_LIBRARY. The total runtime of a daily build is about 1h.

GitHub Actions vs Azure Pipelines (#1350)

  • Disk space limit of 16 GB on GitHub Actions (vs 10 GB for Azure Pipelines).
  • Timout is 6h (AppVeyor is 1h).
  • Directly integrated into GitHub, no setup required (compared to Azure Pipelines).
  • Is likely to gain more traction and be expanded in the future.

Other Notes

  • Tutorials are disabled on Windows in Debug mode, since .pdb information generated by MSVC is gigantic and goes over the space limit.
  • Caching is enabled on all 3 platforms, thanks to sccache on Windows. CMake configuration was also surpringly easy.
  • Caching still has some strict space limits (400 MB per job, 2 GB total accross all jobs). So it's not ideal but if we limit builds to Release configurations we should stay under this space limit.
  • I adapted the yaml script to build with Ninja on Windows, in order to fully exploit build parallelism (even though there's only 2 cores).
  • Slow unit tests were disabled by default in Debug (but not in Release). To run them in Debug on needs to provide an extra CLI flag --> I've updated that and added a [slow] tag instead. All tests will be run by default, but it's still easy to skip the slow ones on the command-line.
  • I also fixed some compilation issues with static MSVC runtime (Why force static linkage of MSVC runtime? #1229)
  • Daily build is only triggered on the default branch. This means we need to merge the .yaml into master and tell it to checkout the dev in the .yml file, or we can wait until the next "release" of libigl, where we move our dev branch to `master. If we merge it as is, no daily build will be triggered.

@teseoch
Copy link
Copy Markdown
Collaborator

teseoch commented Dec 19, 2019

cool!

i am only worried about not running some tests in debug, but is is an overall small price to pay.

Can the limitations be lifted by paying/begging for more?

@jdumas
Copy link
Copy Markdown
Collaborator Author

jdumas commented Dec 19, 2019

Yeah maybe it's not necessary to hide those tests, since Debug configurations are only tested in the daily builds, and they don't take that long. My initial intention was to make running ctest with default options fast on the command-line. It's still pretty easy to run hidden tests by calling ./libigl_tests [!hide]... But maybe it's not needed for now.

@jdumas jdumas force-pushed the jdumas/github-actions branch 2 times, most recently from 8ed6f45 to 4671da7 Compare December 19, 2019 20:18
- Fixes libigl#1229 by defaulting to static MSVC runtime on Windows.
- CMake will now fail if LIBIGL_WITH_CGAL is ON but CGAL is not found
  (e.g. missing Boost or gmp/mpfr).
- Removed some duplicated template instantiations on Windows.
- Added IGL_DEBUG_OFF to disable slow unit test in Debug configuration
  by default.
- Do not FORCE options given to third-party libraries.
@jdumas jdumas force-pushed the jdumas/github-actions branch from 4671da7 to 252017a Compare December 19, 2019 20:19
@alecjacobson
Copy link
Copy Markdown
Contributor

This looks good to go. So I understand correctly does this replace travis and appveyor?

@jdumas
Copy link
Copy Markdown
Collaborator Author

jdumas commented Mar 10, 2020

Yes, this replaces both travis and appveyor. The only thing is that in order to enable nightly builds, we need to merge the .yml into the master branch, or (easier) make dev the default branch for the time being (at least until the hackaton when we tag a proper release).

@alecjacobson
Copy link
Copy Markdown
Contributor

@danielepanozzo should we combine this merge with the switch to:

move master -> stable (from which releases will be tagged)
move dev -> master

?

@jdumas
Copy link
Copy Markdown
Collaborator Author

jdumas commented Mar 10, 2020

If you want to do that, we can tag a new release as well. The changelog that I maintain on the website is also up to date!

@alecjacobson alecjacobson merged commit 62b3350 into libigl:dev Apr 8, 2020
@jdumas jdumas mentioned this pull request Apr 11, 2020
5 tasks
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.

3 participants