-
Jan Trávníček authoredJan Trávníček authored
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
.gitlab-ci.yml 2.45 KiB
# 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).
image: alpine:3.7
before_script:
- case "$CI_BUILD_NAME" in
*-clang) export CXX=clang++ EXTRA_PKGS="$EXTRA_PKGS clang llvm5-dev";;
*) export CXX=g++;;
esac
- export JOBS=$(grep -c processor /proc/cpuinfo)
- apk add --no-cache build-base bash libexecinfo-dev
cppunit-dev libxml2-dev tclap-dev readline-dev $EXTRA_PKGS
- case "$CI_BUILD_NAME" in
*-clang) ln -s /usr/lib/llvm5/lib/LLVMgold.so /usr/lib/LLVMgold.so;;
*) ;;
esac
#========== Stage build ==========
.build-cmake: &build-cmake
variables:
EXTRA_PKGS: cmake python3 py3-click
script:
- cd CMake
- ./alib_cmake.py -w -m
- cd ..
- mkdir release
- cd release
- cmake -DCMAKE_BUILD_TYPE=Release ..
- make
- 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
- cp ../../translateAddresses .
- cp ../../xmlFormat .
artifacts:
paths:
- release/bin
- "release/*/a*2" #select binaries
- release/tniceprint/tniceprint #explicit binary
- "release/*/lib*.so" #select libraries
- "release/*/test-alib2*" #select libraries test
expire_in: 1 day
stage: build
build-cmake-clang:
<<: *build-cmake
build-cmake-gcc:
<<: *build-cmake
build-doc:
variables:
EXTRA_PKGS: doxygen graphviz
script:
- doxygen
allow_failure: true
artifacts:
name: docs
paths:
- doc/
expire_in: 1 week
stage: build