Commit 22089454 authored by Dennis Gläser's avatar Dennis Gläser
Browse files

[ci] add basic configuration for ci

parent 8f6d4824
# base for jobs, all run the same script
.common:
script: ./.ci_run_tests
# base jobs using different compilers
.ubuntu18.04 gcc-6:
extends: .common
variables:
CI_COMPILER: gcc
CI_COMPILER_VERSION: 6
.ubuntu18.04 gcc-7:
extends: .common
variables:
CI_COMPILER: gcc
CI_COMPILER_VERSION: 7
.ubuntu18.04 gcc-8:
extends: .common
variables:
CI_COMPILER: gcc
CI_COMPILER_VERSION: 8
.ubuntu18.04 clang-5:
extends: .common
variables:
CI_COMPILER: clang
CI_COMPILER_VERSION: 5
.ubuntu18.04 clang-6:
extends: .common
variables:
CI_COMPILER: clang
CI_COMPILER_VERSION: 6
.ubuntu18.04 clang-7:
extends: .common
variables:
CI_COMPILER: clang
CI_COMPILER_VERSION: 7
#!/bin/bash
# check if gcc or clang is to be used
CI_CXX_COMPILER=""
if [ "${CI_COMPILER}"=="gcc" ]; then
CI_CXX_COMPILER="g++"
elif [ "${CI_COMPILER}"=="clang" ]; then
CI_CXX_COMPILER="clang++"
else
echo "Unsupported compiler. Aborting."
exit 1
fi
echo "Compiling all tests with ${CI_COMPILER}-${CI_COMPILER_VERSION} " \
"/ ${CI_CXX_COMPILER}-${CI_COMPILER_VERSION}"
# create build directory, configure, build tests
mkdir build && cd build && cmake -DCMAKE_C_COMPILER="${CI_COMPILER}-${CI_COMPILER_VERSION}" \
-DCMAKE_CXX_COMPILER="${CI_CXX_COMPILER}-${CI_COMPILER_VERSION}" ../
# build tests
make build_tests
# run them
ctest -V
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