Commit fc40878c authored by Kirill Smelkov's avatar Kirill Smelkov

slaprunner: Build Ruby gems in parallel

Most Ruby projects are built via Bundler[1], e.g. the upcoming GitLab,
and Bundler supports building/fetching dependency gems in parallel:

    http://bundler.io/v1.10/bundle_install.html#jobs

via using `--jobs <n>` command line option.

All bundler options can be also passed in via environment variable, and
this way we can use BUNDLE_JOBS=<n> for default `--jobs <n>`.

Let's use it, and this way speedup Ruby-related builds (like we already
do for Make- and NumPy- based software).

[1] http://bundler.io/

/cc @jerome, @cedric.leninivin, @kazuhiko
parent 265d97be
......@@ -156,7 +156,7 @@ mode = 0644
[template-supervisord]
recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/template/${:filename}
md5sum = 9000773130409a566e36ad88f436c4de
md5sum = d294d0dafd265048399de6da8c96345f
location = ${buildout:parts-directory}/${:_buildout_section_name_}
filename = supervisord.conf.in
download-only = true
......
......@@ -28,7 +28,7 @@ stderr_logfile = {{ supervisord['no_logfile'] }}
directory = {{ supervisord['directory'] }}
{# how many parallel build jobs to spawn when compiling software -#}
{% set njobs = builtin.max(1, (multiprocessing.cpu_count() // builtin.int(slapparameter_dict.get('cpu-usage-ratio', 4)))) -%}
environment = PATH="{{- supervisord['path'] -}}",MAKEFLAGS="-j{{ njobs }}",NPY_NUM_BUILD_JOBS="{{ njobs }}"
environment = PATH="{{- supervisord['path'] -}}",MAKEFLAGS="-j{{ njobs }}",NPY_NUM_BUILD_JOBS="{{ njobs }}",BUNDLE_JOBS="{{ njobs }}"
[program:{{- supervisord['slapgrid-cp'] -}}]
command = {{ supervisord['slapgrid-cp-command'] }}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment