-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
105 lines (98 loc) · 2.48 KB
/
.gitlab-ci.yml
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
stages:
- Build
.common:
stage: Build
only:
- pushes
artifacts:
when: always
paths:
- log.${CI_COMMIT_SHORT_SHA}.${CI_JOB_NAME}.tar
variables:
LOG: log.${CI_COMMIT_SHORT_SHA}.${CI_JOB_NAME}
CLICOLOR_FORCE: 1
# Adapt when creating a release branch
SCOREP_BUILD_TAG: latest
before_script:
- LOGDIR="${PWD}/${LOG}/"
- mkdir "${LOG}"
- |
log() {
local log="${LOGDIR}" sep="";
for f; do case $f in (-*) break ;; (*) log+="$sep${f##*/}"; sep=_;; esac; done;
log+=".txt";
"$@" &> "$log" || {
ec=$?;
tail -n 42 "$log";
grep -i error -B 7 "$log";
printf "\e[31;1merror: command '$*' failed with $ec\e[0\n";
exit $ec;
}
}
after_script:
- mkdir "${LOG}/build/"
- if test -d _build; then
( cd _build && tar cf - $(find -name 'config.log') ) |
( cd "${LOG}/build/" && tar xf - );
fi
- tar cf "${LOG}.tar" "${LOG}/"
.common-script: &common-script
- log ./bootstrap
- mkdir _build
- cd _build
- log ../configure
--prefix="$(readlink -f $PWD/../_prefix)"
--enable-shared
--enable-backend-test-runs
$configure_flags
- cat scorep.summary
- log make
- log make check
- log make install
- log make installcheck
build-gcc:
image: scorep/devel-gcc:$SCOREP_BUILD_TAG
extends: .common
script:
- configure_flags="
--with-nocross-compiler-suite=gcc
--without-shmem
"
- *common-script
build-clang:
image: scorep/devel-clang:$SCOREP_BUILD_TAG
extends: .common
script:
- configure_flags="
--with-nocross-compiler-suite=clang
--without-shmem
"
- *common-script
build-nvhpc:
image: scorep/devel-nvhpc:$SCOREP_BUILD_TAG
extends: .common
script:
- configure_flags="
--with-nocross-compiler-suite=nvhpc
"
- *common-script
build-oneapi:
image: scorep/devel-oneapi:$SCOREP_BUILD_TAG
extends: .common
script:
# do not download libbfd, it triggers https://gitlab.jsc.fz-juelich.de/perftools/scorep/-/issues/116
# because libunwinding is disabled by Intel MPI
- configure_flags="
--with-nocross-compiler-suite=oneapi
--with-libbfd=yes
"
- *common-script
build-rocm:
image: scorep/devel-rocm:$SCOREP_BUILD_TAG
extends: .common
script:
- configure_flags="
--with-nocross-compiler-suite=amdclang
--without-shmem
"
- *common-script