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

Merge branch 'feature/gitlab-ci' into 'master'

Feature/gitlab ci

See merge request tools/frackit!173
parents 7859ece4 ee0e7a7d
# base for jobs, all run the same script
.common:
script: ./.ci_run_tests
# base for merge requests that affect the core/tests
.testbeforemerge:
only:
refs:
- merge_requests
.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
include: .ci_base.yml
# using OpenCascade 7.3
ubuntu18.04 gcc-7 occ7.3:
extends:
- .ubuntu18.04 gcc-7
- .testbeforemerge
image: git.iws.uni-stuttgart.de:4567/tools/frackit/ubuntu18.04_occ7.3:latest
ubuntu18.04 gcc-8 occ7.3:
extends:
- .ubuntu18.04 gcc-8
- .testbeforemerge
image: git.iws.uni-stuttgart.de:4567/tools/frackit/ubuntu18.04_occ7.3:latest
......@@ -20,9 +20,17 @@ set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g -ggdb -Wall -Wextra -Wno-unused-parameter -Wno-sign-compare")
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "$GXX_RELEASE_OPTS $GXX_RELEASE_WARNING_OPTS -g -ggdb -Wall")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_C_FLAGS} -std=c++17 -O3 -g0 -Wall \
-funroll-loops -march=native \
-funroll-loops \
-DNDEBUG=1 -fno-strict-aliasing \
-fstrict-overflow -fno-finite-math-only")
# if building for a docker container, do not use native flag
option(CONFIG_FOR_DOCKER "Use compiler flags suitable for docker container" OFF)
if (CONFIG_FOR_DOCKER)
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -march=x86-64 -mtune=generic")
else ()
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -march=native")
endif ()
set(CMAKE_BUILD_TYPE Release)
# Find OpenCascade
......@@ -66,6 +74,7 @@ if (OCC_INC)
PATH_SUFFIXES lib ${OCC_SYS_NAME}/lib ${OCC_SYS_NAME}/vc8/lib)
if (OCC_LIB)
list(APPEND OCC_LIBS ${OCC_LIB})
message(STATUS "Found OCC toolkit " ${OCC})
else ()
message(STATUS "OCC lib " ${OCC} " not Found")
endif ()
......@@ -77,12 +86,14 @@ if (OCC_INC)
if (NUM_OCC_LIBS EQUAL NUM_OCC_LIBS_REQUIRED)
set(HAVE_OCC TRUE)
list(APPEND CONFIG_OPTIONS "OpenCASCADE")
message(STATUS "Found " "OpenCASCADE")
message(STATUS "Found required OpenCASCADE toolkits")
list(APPEND EXTERNAL_LIBRARIES ${OCC_LIBS})
list(APPEND EXTERNAL_INCLUDES ${OCC_INC})
if (HAVE_64BIT_SIZE_T)
add_definitions(-D_OCC64)
endif ()
else ()
message(WARNING "Did not find all required OpenCASCADE toolkits!")
endif ()
else ()
message(FATAL_ERROR "OpenCascade sources not found")
......
Supports Markdown
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