forked from libxsmm/libxsmm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
202 lines (178 loc) · 9.19 KB
/
.travis.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
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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
os: linux # default
language: cpp
#dist: xenial
branches:
except:
- develop
- results
- wip
jobs:
fast_finish: true
include:
- os: linux
compiler: gcc
env: INSTALL=install-artifacts OPT=1 PYTHON=python2 MALLOC=-1 LIBXSMM_MALLOC=1
- os: linux
compiler: gcc
env: INSTALL=install DBG=1 LIBXSMM_SE=1 LIBXSMM_TARGET=0 ANALYZE=1
- os: linux
compiler: clang
env: INSTALL=install DBG=1 LIBXSMM_TARGET=sse MALLOC=1 LD_LIBRARY_PATH=/usr/local/clang/lib:${LD_LIBRARY_PATH}
- os: osx
osx_image: xcode12.2
compiler: clang
env: SYM=1 OPT=1 SPACES=1 TIMER_DELTA=-1
- os: osx
osx_image: xcode7.3
compiler: clang
env: DBG=1 INSTALL=install-artifacts LIBXSMM_SE=1
env:
global:
- PEDANTIC_HIGH="PEDANTIC=2"
- PEDANTIC_TEST="PEDANTIC=1"
- LIBXSMM_VERBOSE=3
- RUN_LINUX_PERF=0
addons:
apt:
update: true
packages:
- gfortran
- libblas-dev
- liblapack-dev
- python3
coverity_scan:
project:
name: "hfp/libxsmm"
description: "Matrix operations and deep learning primitives"
build_command_prepend: "source .env/travis.env; make -e clean"
# consider ${MAKEJ} to potentially accelerate the build
build_command: "make -e"
branch_pattern: coverity
before_install:
- source .env/travis.env
- if [ -e /proc/cpuinfo ]; then
grep -m1 "flags" /proc/cpuinfo | cut -d":" -f2-;
elif [ "" != "$(command -v sysctl)" ]; then
sysctl -a machdep.cpu.features
machdep.cpu.extfeatures
machdep.cpu.leaf7_features
| cut -d":" -f2- | tr -s "\n" " "
| tr "[:upper:]" "[:lower:]";
fi
- if [ "1" = "${COVERITY_SCAN_BRANCH}" ] && [ -e /etc/ssl/certs/ca-certificates.crt ]; then
echo -n | openssl s_client -connect scan.coverity.com:443 2>/dev/null
| sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' 2>/dev/null
| sudo tee -a /etc/ssl/certs/ca-certificates.crt 2>/dev/null;
fi
- if [ "" = "${CODECOV_ENABLED}" ] || [ "0" != "${CODECOV_ENABLED}" ]; then
if [ "osx" = "${TRAVIS_OS_NAME}" ] && [ "clang" != "${CC}" ]; then sudo easy_install pip; fi;
fi
install:
- if [ "" != "${UPLOAD_ENABLED}" ] && [ "0" != "${UPLOAD_ENABLED}" ] && [ "1" != "${COVERITY_SCAN_BRANCH}" ]; then
( cd /tmp && curl -O -L https://github.com/openssl/openssl/archive/OpenSSL_1_1_1d.tar.gz &&
tar xvf OpenSSL_1_1_1d.tar.gz && cd openssl-OpenSSL_1_1_1d &&
./config --prefix=${HOME}/openssl && make ${MAKEJ} && make install &&
cd /tmp && curl -O -L https://www.libssh2.org/download/libssh2-1.9.0.tar.gz &&
tar xvf libssh2-1.9.0.tar.gz && cd libssh2-1.9.0 &&
./configure --prefix=${HOME}/libssh2 --with-libssl-prefix=${HOME}/openssl &&
make ${MAKEJ} install &&
cd /tmp && curl -O -L https://github.com/curl/curl/archive/curl-7_67_0.tar.gz &&
tar xvf curl-7_67_0.tar.gz && cd curl-curl-7_67_0 && ./buildconf &&
./configure --prefix=${HOME}/curl --with-ssl=${HOME}/openssl
--with-libssh2=${HOME}/libssh2 && make ${MAKEJ} install &&
cd ${TRAVIS_BUILD_DIR}
) || true;
fi
- if [ "" = "${CODECOV_ENABLED}" ] || [ "0" != "${CODECOV_ENABLED}" ]; then
if [ "clang" != "${CC}" ]; then
pip install --upgrade pip;
pip install --user codecov;
fi;
fi
after_success:
- eval ${CODECOV}
# upload artifacts
after_failure:
- eval ${UPLOAD}
before_script:
- source .env/travis.env
# avoid any dashes at the begin of a line within a test section
script:
- if [ "1" = "${COVERITY_SCAN_BRANCH}" ]; then exit 0; fi;
source ${TRAVIS_BUILD_DIR}/.env/codecov.env $(if [ "clang" = "${CC}" ]; then echo "0"; fi) &&
make -e ${MAKEJ} PREFIX=${UPLOAD_DIR} ${PEDANTIC_HIGH} TRACE=1 STATIC=0 BLAS=1 ABSLIBS=1 MIX=0
EFLAGS="-DITYPE=double -DINCLUDE_LIBXSMM_LAST" ${INSTALL} tests &&
eval ${RUNXCOV} &&
if [ "" != "${UPLOAD_ENABLED}" ] && [ "0" != "$((1<UPLOAD_ENABLED))" ]; then eval ${UPLOAD}; fi
- if [ "1" = "${COVERITY_SCAN_BRANCH}" ]; then exit 0; fi;
source ${TRAVIS_BUILD_DIR}/.env/codecov.env $(if [ "clang" = "${CC}" ]; then echo "0"; fi) &&
make -e ${MAKEJ} PREFIX=${UPLOAD_DIR} ${PEDANTIC_HIGH} TRACE=1 MNK="19 27, 23"
EFLAGS="-DLIBXSMM_CAPACITY_REGISTRY=32" ${INSTALL} test-cp2k &&
eval ${RUNXCOV} &&
if [ "" != "${UPLOAD_ENABLED}" ] && [ "0" != "$((1<UPLOAD_ENABLED))" ]; then eval ${UPLOAD}; fi
- if [ "1" = "${COVERITY_SCAN_BRANCH}" ]; then exit 0; fi;
source ${TRAVIS_BUILD_DIR}/.env/codecov.env $(if [ "clang" = "${CC}" ]; then echo "0"; fi) &&
make -e ${MAKEJ} PREFIX=${UPLOAD_DIR} ${PEDANTIC_HIGH} SYM=1 MNK="4 8" STATIC=0 PREFETCH=0 CACHE=0
EFLAGS="-DLIBXSMM_NO_CTOR -DINCLUDE_LIBXSMM_LAST" ${INSTALL} test-nek &&
eval ${RUNXCOV} &&
if [ "" != "${UPLOAD_ENABLED}" ] && [ "0" != "$((1<UPLOAD_ENABLED))" ]; then eval ${UPLOAD}; fi
- if [ "1" = "${COVERITY_SCAN_BRANCH}" ]; then exit 0; fi;
source ${TRAVIS_BUILD_DIR}/.env/codecov.env $(if [ "clang" = "${CC}" ]; then echo "0"; fi) &&
make -e ${MAKEJ} PREFIX=${UPLOAD_DIR} ${PEDANTIC_HIGH} SYM=1 PYMOD=1 JITDUMP=${RUN_LINUX_PERF}
EFLAGS="-DLIBXSMM_NO_CTOR -DINCLUDE_LIBXSMM_LAST" ${INSTALL} tests &&
eval ${RUNXCOV} &&
if [ "" != "${UPLOAD_ENABLED}" ] && [ "0" != "$((1<UPLOAD_ENABLED))" ]; then eval ${UPLOAD}; fi
- if [ "1" = "${COVERITY_SCAN_BRANCH}" ]; then exit 0; fi;
source ${TRAVIS_BUILD_DIR}/.env/codecov.env $(if [ "clang" = "${CC}" ]; then echo "0"; fi) &&
make -e ${MAKEJ} PREFIX=${UPLOAD_DIR} ${PEDANTIC_HIGH} SYM=1 MNK="9 3, 23" STATIC=0
EFLAGS="-DLIBXSMM_MALLOC_MMAP" ${INSTALL} test-smm &&
eval ${RUNXCOV} &&
if [ "" != "${UPLOAD_ENABLED}" ] && [ "0" != "$((1<UPLOAD_ENABLED))" ]; then eval ${UPLOAD}; fi
- if [ "1" = "${COVERITY_SCAN_BRANCH}" ]; then exit 0; fi;
source ${TRAVIS_BUILD_DIR}/.env/codecov.env $(if [ "clang" = "${CC}" ]; then echo "0"; fi) &&
make -e ${MAKEJ} PREFIX=${UPLOAD_DIR} ${PEDANTIC_HIGH} SYM=1 INTRINSICS=1 MIX=0 JITDUMP=${RUN_LINUX_PERF}
EFLAGS="-DELEM_TYPE=char -DUSE_EXPECTED" ${INSTALL} tests &&
eval ${RUNXCOV} &&
if [ "" != "${UPLOAD_ENABLED}" ] && [ "0" != "$((1<UPLOAD_ENABLED))" ]; then eval ${UPLOAD}; fi
- if [ "1" = "${COVERITY_SCAN_BRANCH}" ]; then exit 0; fi;
source ${TRAVIS_BUILD_DIR}/.env/codecov.env $(if [ "clang" = "${CC}" ]; then echo "0"; fi) &&
make -e ${MAKEJ} PREFIX=${UPLOAD_DIR} ${PEDANTIC_HIGH} SYM=1 SSE=0 AVX=0 JIT=0
EFLAGS="-DELEM_TYPE=short" ${INSTALL} tests &&
eval ${RUNXCOV} &&
if [ "" != "${UPLOAD_ENABLED}" ] && [ "0" != "$((1<UPLOAD_ENABLED))" ]; then eval ${UPLOAD}; fi
- if [ "1" = "${COVERITY_SCAN_BRANCH}" ]; then exit 0; fi;
source ${TRAVIS_BUILD_DIR}/.env/codecov.env $(if [ "clang" = "${CC}" ]; then echo "0"; fi) &&
make -e ${MAKEJ} ${PEDANTIC_TEST} VLA=0 INTRINSICS=0 test-wrap &&
eval ${RUNXCOV} &&
if [ "" != "${UPLOAD_ENABLED}" ] && [ "0" != "$((1<UPLOAD_ENABLED))" ]; then eval ${UPLOAD}; fi
- if [ "1" = "${COVERITY_SCAN_BRANCH}" ]; then exit 0; fi;
source ${TRAVIS_BUILD_DIR}/.env/codecov.env $(if [ "clang" = "${CC}" ]; then echo "0"; fi) &&
make -e ${MAKEJ} ${PEDANTIC_TEST} VLA=0 STATIC=1 test-wrap &&
eval ${RUNXCOV} &&
if [ "" != "${UPLOAD_ENABLED}" ] && [ "0" != "$((1<UPLOAD_ENABLED))" ]; then eval ${UPLOAD}; fi
- if [ "1" = "${COVERITY_SCAN_BRANCH}" ]; then exit 0; fi;
source ${TRAVIS_BUILD_DIR}/.env/codecov.env $(if [ "clang" = "${CC}" ]; then echo "0"; fi) &&
make -e ${MAKEJ} ${PEDANTIC_TEST} VLA=0 GEMM=2 STATIC=0 BLAS=2 test-wrap &&
eval ${RUNXCOV} &&
if [ "" != "${UPLOAD_ENABLED}" ] && [ "0" != "$((1<UPLOAD_ENABLED))" ]; then eval ${UPLOAD}; fi
- if [ "1" = "${COVERITY_SCAN_BRANCH}" ]; then exit 0; fi;
source ${TRAVIS_BUILD_DIR}/.env/codecov.env $(if [ "clang" = "${CC}" ]; then echo "0"; fi) &&
make -e ${PEDANTIC_HIGH} AVX=3 MIC=0 OMP=1 JITDUMP=1 test-cpp &&
make -e ${PEDANTIC_HIGH} AVX=2 THREADS=0 test-cpp &&
make -e ${PEDANTIC_HIGH} AVX=1 VLA=0 test-cpp
- if [ "1" = "${COVERITY_SCAN_BRANCH}" ] || [ "" = "${ANALYZE}" ] || [ "0" = "${ANALYZE}" ]; then exit 0; fi;
${TRAVIS_BUILD_DIR}/scripts/tool_analyze.sh
- if [ "1" = "${COVERITY_SCAN_BRANCH}" ] || [ "" = "${ANALYZE}" ] || [ "0" = "${ANALYZE}" ]; then exit 0; fi;
${TRAVIS_BUILD_DIR}/scripts/tool_normalize.sh
- if [ "1" = "${COVERITY_SCAN_BRANCH}" ] || [ "" = "${ANALYZE}" ] || [ "0" = "${ANALYZE}" ]; then exit 0; fi;
make -e STATIC=0 DBG=1 && ${TRAVIS_BUILD_DIR}/scripts/tool_checkabi.sh
- if [ "" = "${ANALYZE}" ] || [ "0" = "${ANALYZE}" ]; then exit 0; fi;
if [ "" = "${COVERITY_SCAN_BINDIR}" ] || [ "" = "${COVERITY_SCAN_USER}" ] || [ "" = "${COVERITY_SCAN_TOKEN}" ]; then
echo "Please setup COVERITY_SCAN_BINDIR, COVERITY_SCAN_USER, and COVERITY_SCAN_TOKEN.";
exit 1;
fi;
rm -rf cov-int && ${COVERITY_SCAN_BINDIR}/cov-build --dir cov-int make -e ${MAKEJ} && tar cvfz cov-int.tgz cov-int &&
curl https://scan.coverity.com/builds?project=hfp-libxsmm --form
token=${COVERITY_SCAN_TOKEN} --form email=${COVERITY_SCAN_USER} --form
[email protected] --form version="$(git describe --tags)" --form
description="$(date -I): $(git log -1 --pretty=oneline | cut -d' ' -f2-)"