'nproc' is not available on FreeBSD: $ JOBS=$(expr $(nproc) + 1) bash: line 119: nproc: command not found expr: syntax error
Instead, use 'sysctl -n hw.ncpu'. Signed-off-by: Philippe Mathieu-Daudé <f4...@amsat.org> --- .gitlab-ci.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 598a8fb096f..aceaac5a398 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -15,7 +15,17 @@ include: .environment_variables_template: before_script: - - JOBS=$(expr $(nproc) + 1) + - if + test $(uname) = "FreeBSD" + ; + then + JOBS=$(sysctl -n hw.ncpu) + ; + else + JOBS=$(expr $(nproc) + 1) + ; + fi + - echo "=== Using $JOBS simultaneous jobs ===" .native_build_job_template: stage: build -- 2.26.3