Commit 2c5f7e08 authored by Jakub Klinkovský's avatar Jakub Klinkovský
Browse files

Changed .gitlab-ci.yml to respect $NINJAFLAGS set from the outer environment

parent 7390a03b
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -3,6 +3,7 @@
before_script:
    - which g++
    - which cmake
    - which ninja

# Stages are useful only to enforce some ordering of the jobs. Every job is run
# in its own directory and only very few data can be shared between the jobs in
@@ -36,11 +37,12 @@ stages:
    script:
        # all cores including hyperthreading
#        - export NUM_CORES=$(grep "core id" /proc/cpuinfo | wc -l)
#       # all pyhsical cores
        # all pyhsical cores
        - export NUM_CORES=$(grep "core id" /proc/cpuinfo | sort -u | wc -l)
        # ninja does not have -l
#        - export MAKEFLAGS="-l$(echo 1.5*$NUM_CORES | bc) -j$NUM_CORES"
        - export NINJAFLAGS="-j$NUM_CORES"
        # respect $NINJAFLAGS from the outer environment if it is set
        - if [[ ${NINJAFLAGS} == "" ]]; then
                export NINJAFLAGS="-j$NUM_CORES";
          fi
        - export CTEST_OUTPUT_ON_FAILURE=1
        - export CTEST_PARALLEL_LEVEL=4
        - mkdir -p "./builddir/$CI_JOB_NAME"
@@ -62,8 +64,6 @@ stages:
                -DWITH_TOOLS=${WITH_TOOLS}
                -DWITH_PYTHON=${WITH_PYTHON}
        # "install" implies the "all" target
#        - make install
#        - make test
        - ninja ${NINJAFLAGS} install
        - if [[ ${WITH_TESTS} == "yes" ]]; then
                ninja test;