Repository navigation
Expand file tree
/
Copy pathgitlab-ci.yml
More file actions
124 lines (102 loc) · 2.82 KB
/
Copy pathgitlab-ci.yml
File metadata and controls
124 lines (102 loc) · 2.82 KB
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
#####################
# Global Parameters #
#####################
variables:
GIT_SUBMODULE_STRATEGY: recursive
LLNL_SLURM_SCHEDULER_PARAMETERS: "--nodes=1 -A asccasc"
stages:
- build
- test
####################
# Global Templates #
####################
# Build Stage Templates
.build:
stage: build
artifacts:
when: always
paths:
- build
.build_cpu:
before_script:
- module reset
- 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
- cmake -DBUILD_TESTING=ON -DBUILD_UTILITIES=OFF -DZFP_WITH_CUDA=OFF ${ci_cmake_flags} ..
- make -j
extends: [.build]
.build_gpu:
before_script:
- module reset
- module load opt
- module load $ci_cmp_mod
script:
- mkdir build
- cd build
- cmake -DBUILD_TESTING=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/surface-templates.yml
- local: tests/gitlab/surface-jobs.yml
- local: tests/gitlab/pascal-templates.yml
- local: tests/gitlab/pascal-jobs.yml
# - local: tests/gitlab/corona-templates.yml
# - local: tests/gitlab/corona-jobs.yml