-
Notifications
You must be signed in to change notification settings - Fork 9
/
.travis.yml
105 lines (94 loc) · 3.42 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
dist: trusty
os: linux
language: cpp
sudo: required
branches:
only:
- master
- travis
env:
global:
- CUDA_VERSION=8.0.61-1
- CUDA_VERSION_SHORT=8.0
#- GEARSHIFFT_CLFFT_VERSION=v2.12.2
- CLANG_VERSION=3.8
cache:
directories:
- ${TRAVIS_BUILD_DIR}/deps/
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- clang-3.8
- cmake
- opencl-headers
matrix:
include:
- name: Clang-3.8 CUDA-8.0.61 Boost-1.60.0 FFTW3 Release
compiler: clang
env: GEARSHIFFT_BUILD_TYPE=Release
- name: g++-5 CUDA-8.0.61 Boost-1.60.0 FFTW3 Release
compiler: gcc
env: GEARSHIFFT_BUILD_TYPE=Release
- name: g++-5 CUDA-8.0.61 Boost-1.60.0 FFTW3 Debug
compiler: gcc
env: GEARSHIFFT_BUILD_TYPE=Debug
before_install:
- set -e
- travis_retry sudo apt-get install -qq g++-5
- sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-5 90
- |
CUDA_CACHE_PATH=${TRAVIS_BUILD_DIR}/deps/cuda-${CUDA_VERSION_SHORT}
mkdir -p ${CUDA_CACHE_PATH}
if [[ -z "$(ls -A ${CUDA_CACHE_PATH})" ]]; then
travis_retry wget https://developer.nvidia.com/compute/cuda/8.0/Prod2/local_installers/cuda-repo-ubuntu1404-8-0-local-ga2_${CUDA_VERSION}_amd64-deb -q -O "${CUDA_CACHE_PATH}/cuda.deb";
else
echo "Using cached cuda.deb in $CUDA_CACHE_PATH"
fi
travis_retry sudo dpkg -i ${CUDA_CACHE_PATH}/cuda.deb
travis_retry sudo apt-get update -qq
CUDA_APT=${CUDA_VERSION_SHORT/./-}
travis_retry sudo apt-get install -qy cuda-core-${CUDA_APT} cuda-cudart-dev-${CUDA_APT} cuda-cufft-${CUDA_APT} cuda-cufft-dev-${CUDA_APT}
install:
- if [ "${CXX}" == "g++" ]; then export CXX=g++-5; export CC=${CXX/g++/gcc}; export GCOV=${CXX/g++/gcov}; fi
- if [ "${CXX}" == "clang++" ]; then export CXX=clang++-${CLANG_VERSION}; export CC=clang-${CLANG_VERSION}; export GCOV="gcov"; fi
# Boost [is now done via gearshifft cmake]
# CUDA
- |
export CUDA_ROOT=/usr/local/cuda-${CUDA_VERSION_SHORT}
export LD_LIBRARY_PATH=${CUDA_ROOT}/lib64:${LD_LIBRARY_PATH}
export PATH=${CUDA_ROOT}/bin:${PATH}
# Versions
- $CXX --version
- nvcc --version
- cmake --version
script:
- mkdir build && cd build
- set -e
- |
cmake -DCMAKE_BUILD_TYPE=${GEARSHIFFT_BUILD_TYPE} \
-DGEARSHIFFT_VERBOSE=ON \
-DBUILD_TESTING=ON \
-DGEARSHIFFT_USE_SUPERBUILD=ON \
-DGEARSHIFFT_TESTS_ADD_CPU_ONLY=ON \
-DGEARSHIFFT_SUPERBUILD_EXT_INBUILD=ON \
-DGEARSHIFFT_SUPERBUILD_EXT_DOWNLOAD_Boost=ON \
-DGEARSHIFFT_SUPERBUILD_EXT_DOWNLOAD_FFTW=ON \
-DGEARSHIFFT_SUPERBUILD_EXT_DOWNLOAD_CLFFT=OFF \
-DGEARSHIFFT_SUPERBUILD_EXT_DOWNLOAD_ROCFFT=OFF \
-DGEARSHIFFT_USE_STATIC_LIBS=ON \
..
make gearshifft
cd gearshifft-build
ctest --output-on-failure
sigs=(QUIT ABRT KILL TERM)
echo "Sending signals to gearshifft_fftw ..."
for sig in "${sigs[@]}"; do
timeout -s "$sig" 10 ./gearshifft/gearshifft_fftw -e 16 32 64 128 -o myout.csv || true
[[ $(wc -l < myout.csv~) -gt 2 ]] && echo "Test successful for SIG$sig" || { echo "Test failed for SIG$sig" && false; }
rm myout.csv*
done
- set +e
notifications:
email: false