1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143
|
#####################
# Global Parameters #
#####################
variables:
GIT_SUBMODULE_STRATEGY: recursive
LLNL_SLURM_SCHEDULER_PARAMETERS: "--nodes=1 -A asccasc -t 00:20:00"
LLNL_SERVICE_USER: zfp
stages:
- build
- test
####################
# Global Templates #
####################
# Build Stage Templates
.build:
stage: build
artifacts:
when: always
paths:
- build
.build_cpu:
before_script:
- |-
if [ "$ci_c_cmp" != "gcc" ]; then
module --latest load gcc
if (( $(gcc -dumpversion | sed 's/\..*//') < 5 )); then
echo "unable to find new enough gcc to support ${ci_c_cmp} build"
exit 1
fi
export GXX_PATH=$(dirname $(which gcc))/../
fi
- module reset
- module load $ci_cmake
- module load $ci_cmp_mod
- |-
if [ "$ci_lang" == "cpp" ]; then
export CXX=$(which $ci_cxx_cmp)
export CC=$(which $ci_c_cmp)
if [ -z ${CXX} ]; then
echo "cxx compiler not set"
exit 1
elif [ -z ${CC} ]; then
echo "c compiler not set"
exit 1
fi
elif [ "$ci_lang" == "c" ]; then
export CC=$(which $ci_c_cmp)
if [ -z ${CC} ]; then
echo "c compiler not set"
exit 1
fi
fi
script:
- mkdir build
- cd build
- |-
export ci_cmake_cmp_flags=""
if [ "$ci_c_cmp" == "icc" ]; then
export ci_cmake_cmp_flags="-DCMAKE_CXX_FLAGS=-gcc-name=${GXX_PATH}/bin/gcc -DCMAKE_C_FLAGS=-gcc-name=${GXX_PATH}/bin/gcc"
elif [ "$ci_c_cmp" == "clang" ]; then
export ci_cmake_cmp_flags="-DCMAKE_CXX_FLAGS=--gcc-toolchain=${GXX_PATH} -DCMAKE_C_FLAGS=--gcc-toolchain=${GXX_PATH}"
fi
- cmake -DBUILD_TESTING_FULL=ON -DBUILD_UTILITIES=OFF -DZFP_WITH_CUDA=OFF ${ci_cmake_flags} ${ci_cmake_cmp_flags} ..
- cmake --build .
extends: [.build]
.build_gpu:
before_script:
- module reset
- module load $ci_cmake
- module load $ci_cmp_mod
- module load $ci_gcc_mod
script:
- mkdir build
- cd build
- cmake -DBUILD_TESTING_FULL=ON -DZFP_WITH_OPENMP=OFF -DBUILD_UTILITIES=OFF ${ci_cmake_flags} ..
- make -j
extends: [.build]
# Test Stage Templates
.test:
stage: test
artifacts:
when: on_failure
paths:
- build/Testing
.test_cpu:
script:
- cd build
- ctest -E "(Cuda|Hip)" -R "${ci_test_regex}"
extends: [.test]
.test_gpu:
script:
- cd build
- ctest -R "${ci_test_regex}"
extends: [.test]
# Language Templates
.cpp:
variables:
ci_lang: "cpp"
ci_cmake_flags: "-DBUILD_CFP=OFF -DBUILD_ZFPY=OFF -DBUILD_ZFORP=OFF"
.c:
variables:
ci_lang: "c"
ci_cmake_flags: "-DBUILD_CFP=ON -DBUILD_ZFPY=OFF -DBUILD_ZFORP=OFF -DZFP_WITH_OPENMP=OFF"
.cuda:
variables:
ci_lang: "cuda"
ci_cmake_flags: "-DZFP_WITH_CUDA=ON"
#.hip:
# variables:
# ci_lang: "hip"
# ci_cmake_flags: "-DZFP_WITH_HIP=ON -DHIP_PATH=${ci_cmp_path} -DCMAKE_CXX_STANDARD=11 -DCMAKE_C_STANDARD=11 -DCMAKE_C_COMPILER=hipcc -DCMAKE_CXX_COMPILER=hipcc"
############
# Includes #
############
include:
- local: tests/gitlab/pascal-templates.yml
- local: tests/gitlab/pascal-jobs.yml
- local: tests/gitlab/quartz-templates.yml
- local: tests/gitlab/quartz-jobs.yml
# - local: tests/gitlab/corona-templates.yml
# - local: tests/gitlab/corona-jobs.yml
|