Newer
Older
# NOTE #1: Our GitLab CI runs jobs inside Alpine Linux container by default.
#
# NOTE #2: Keep in mind that each job (e.g. test-gcc) is executed in a separate
# isolated environment (it may be even on different machine). There are no
# files implicitly passed between jobs or stages, only artifacts and maybe
# cache (depends on configuration).
.build: &build_template
stage: build
before_script:
- apk add --no-cache bash build-base cmake python3 libexecinfo-dev cppunit-dev libxml2-dev tclap-dev readline-dev qt5-qtbase-dev graphviz-dev jsoncpp-dev ${EXTRA_PKGS}
- export CXX=${CXX}
- CMake/generate.py -wm
- mkdir release
- cd release
- cmake -DCMAKE_BUILD_TYPE=Release ..
- make -j $(grep -c processor /proc/cpuinfo)
build:gcc:
<<: *build_template
variables:
CXX: g++
CXX: clang++
EXTRA_PKGS: clang
build:doc:
stage: build
before_script:
- apk add --no-cache doxygen graphviz
allow_failure: true
artifacts:
name: docs
paths:
.test: &test_template
stage: test
before_script:
- apk add --no-cache bash bc coreutils python3 cmake make libexecinfo cppunit libxml2 tclap readline qt5-qtbase qt5-qtbase-x11 graphviz jsoncpp
- make test
# temporary until make tests manages all tests
- mkdir bin
- cd bin
- find .. -type f \( -perm -u=x -o -perm -g=x -o -perm -o=x \) -exec test -x {} \; -print | grep -v 'CMakeFiles' | while read line; do ln -s $line $(basename $line); done
- cd ../..
- for test in $(ls tests.*.sh); do ./${test} release/bin $(grep -c processor /proc/cpuinfo) || exit 1; touch release/bin/log_tests.txt; cat release/bin/log_tests.txt; done