Commit b284e2f1 authored by Praetorius, Simon's avatar Praetorius, Simon

gitlab-ci updated

parent 02e46fc0
---
image: mathiwr/amdis-base:debian9
cache:
- install/
stages:
- build
- demo
- test
# compile amdis
build:9-debug-gcc:
stage: build
script:
- tools/build_amdis.sh Debug
- tools/build_amdis.sh --stage build --config Debug
only:
- master
build:9-release-gcc:
stage: build
script:
- tools/build_amdis.sh Release
- tools/build_amdis.sh --stage build --config Release
only:
- master
build:9-parallel-debug-gcc:
stage: build
script:
- tools/build_parallel_amdis.sh Debug
- tools/build_amdis.sh --stage build --config Debug --parallel
only:
- master
build:9-parallel-release-gcc:
stage: build
script:
- tools/build_parallel_amdis.sh Release
- tools/build_amdis.sh --stage build --config Release --parallel
only:
- master
# compile the demos
demo:9-debug-gcc:
stage: demo
script:
- tools/build_amdis.sh --stage demo --config Debug
only:
- master
demo:9-release-gcc:
stage: demo
script:
- tools/build_amdis.sh --stage demo --config Release
only:
- master
demo:9-parallel-debug-gcc:
stage: demo
script:
- tools/build_amdis.sh --stage demo --config Debug --parallel
only:
- master
demo:9-parallel-release-gcc:
stage: demo
script:
- tools/build_amdis.sh --stage demo --config Release --parallel
only:
- master
# compiel and run the tests
test:9-debug-gcc:
stage: test
script:
- tools/build_amdis.sh --stage test --config Debug
only:
- master
test:9-release-gcc:
stage: test
script:
- tools/build_amdis.sh --stage test --config Release
only:
- master
test:9-parallel-debug-gcc:
stage: test
script:
- tools/build_amdis.sh --stage test --config Debug --parallel
only:
- master
test:9-parallel-release-gcc:
stage: test
script:
- tools/build_amdis.sh --stage test --config Release --parallel
only:
- master
#! /bin/bash
ROOT=${PWD}
POSTFIX="rel"
CONFIURATION="Release"
if [ "$1" == "Debug" ]; then
POSTFIX="dbg"
CONFIURATION="Debug"
STAGE="build"
CONFIG="Release"
COMPONENT="SEQUENTIAL"
# parse command line
if [ $# -gt 0 ]; then
while [[ $1 = -* ]]; do
case "$1" in
--stage)
STAGE="$2" # [build|demo|test]
shift 2 ;;
--config)
CONFIG="$2" # [Debug|Release]
shift 2 ;;
--parallel)
COMPONENT="PARALLEL" # [SEQUENTIAL|PARALLEL]
shift ;;
--)
shift
break ;;
-?*)
printf 'WARNING: Unknown option (ignored): %s\n' "$1" >&2
shift ;;
*)
break
esac
done
fi
if [ "${CONFIG}" == "Debug" ]; then
POSTFIX="deb"
else
POSTFIX="rel"
fi
if [ "${COMPONENT}" == "SEQUENTIAL" ]; then
POSTFIX="${POSTFIX}_seq"
FLAGS="-DENABLE_UMFPACK:BOOL=ON"
else
POSTFIX="${POSTFIX}_par"
FLAGS="-DENABLE_UMFPACK:BOOL=OFF -DENABLE_PARALLEL_DOMAIN:BOOL=ON"
fi
# at first build AMDiS
cmake -E make_directory ${ROOT}/build_${POSTFIX}
cmake -E chdir ${ROOT}/build_${POSTFIX} cmake \
-DCMAKE_INSTALL_PREFIX=${ROOT}/install_${POSTFIX} \
-DCMAKE_BUILD_TYPE=${CONFIURATION} \
-DENABLE_CXX11:BOOL=ON \
-DENABLE_COMPRESSION:BOOL=OFF \
-DENABLE_UMFPACK:BOOL=ON \
${ROOT}/AMDiS
cmake --build ${ROOT}/build_${POSTFIX} --target install
# now build the demos
BASEDIR=${ROOT}/demo
cmake -E make_directory ${BASEDIR}/build_${POSTFIX}
cmake -E chdir ${BASEDIR}/build_${POSTFIX} cmake \
-DAMDIS_DIR=${ROOT}/install_${POSTFIX}/share/amdis \
-DCMAKE_BUILD_TYPE=${CONFIURATION} \
-DCOMPONENT=SEQUENTIAL \
${BASEDIR}
cmake --build ${BASEDIR}/build_${POSTFIX}
# now build and run the test_suite
BASEDIR=${ROOT}/test
cmake -E make_directory ${BASEDIR}/build_${POSTFIX}
cmake -E chdir ${BASEDIR}/build_${POSTFIX} cmake \
-DAMDIS_DIR=${ROOT}/install_${POSTFIX}/share/amdis \
-DCMAKE_BUILD_TYPE=${CONFIURATION} \
-DCOMPONENT=SEQUENTIAL \
${BASEDIR}
cmake --build ${BASEDIR}/build_${POSTFIX}
cmake --build ${BASEDIR}/build_${POSTFIX} --target test
if [ "${STAGE}" == "build" ]; then
# at first build AMDiS
cmake -E make_directory ${ROOT}/build_${POSTFIX}
cmake -E chdir ${ROOT}/build_${POSTFIX} cmake \
-DCMAKE_INSTALL_PREFIX=${ROOT}/install \
-DCMAKE_BUILD_TYPE=${CONFIG} \
-DENABLE_COMPRESSION:BOOL=OFF \
-DENABLE_EXTENSIONS:BOOL=ON \
${FLAGS} \
${ROOT}/AMDiS
cmake --build ${ROOT}/build_${POSTFIX} --target install
fi
if [ "${STAGE}" == "demo" ]; then
# now build the demos
BASEDIR=${ROOT}/demo
cmake -E make_directory ${BASEDIR}/build_${POSTFIX}
cmake -E chdir ${BASEDIR}/build_${POSTFIX} cmake \
-DAMDIS_DIR=${ROOT}/install/share/amdis \
-DCMAKE_BUILD_TYPE=${CONFIG} \
-DCOMPONENT=${COMPONENT} \
${BASEDIR}
cmake --build ${BASEDIR}/build_${POSTFIX}
fi
if [ "${STAGE}" == "test" ]; then
# now build and run the test_suite
BASEDIR=${ROOT}/test
cmake -E make_directory ${BASEDIR}/build_${POSTFIX}
cmake -E chdir ${BASEDIR}/build_${POSTFIX} cmake \
-DAMDIS_DIR=${ROOT}/install/share/amdis \
-DCMAKE_BUILD_TYPE=${CONFIG} \
-DCOMPONENT=${COMPONENT} \
${BASEDIR}
cmake --build ${BASEDIR}/build_${POSTFIX}
cmake --build ${BASEDIR}/build_${POSTFIX} --target test
fi
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