sisl / tufte_algorithms_book

A template for textbooks in the same style as Algorithms for Optimization
350 stars 66 forks source link

add gitlab ci template #3

Closed johnnychen94 closed 5 years ago

johnnychen94 commented 5 years ago
  1. test the pulled codes against to different Julia version. (I use a very simple docker image made by myself)
  2. when all tests pass, compile the book
  3. after compilation, a downloadable pdf file as an artifact is provided.

CI demo: image

Please enlighten me if there's a better tool than install_pkg.jl.

tawheeler commented 5 years ago

Thanks @johnnychen94! I will check this over the next few days. I am less familiar with gitlab - great to learn new tools.

tawheeler commented 5 years ago

I am not convinced that we need to test against old versions of Julia, but it is not a bad thing to do.

johnnychen94 commented 5 years ago

My idea here is to make sure the code samples are runnable in all Julia versions and compile the results using the latest stable version. The three tests are running parallelly, so basically there's no overhead introduced. As a template of gitlab-ci.yml, it would be not a big issue though 😄

I wrote the install_pkgs.jl several months ago when I don't know Julia much, as you might see it isn't good enough - it just works. We might need to find a better tool or rewrite this. The purpose is to install dependency packages to Julia base version.

tawheeler commented 5 years ago

This is great, thanks!