-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
63 lines (51 loc) · 2.11 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
sudo: false
language: c++
os:
- linux
matrix:
exclude:
- os: linux
include:
- os: linux
docker: true
compiler: gcc
env: LLVM_VERSION=6.0 HWLOC_VERSION=1.11 DOCKERFILE=Ubuntu/16_04.64bit
- os: osx
compiler: clang
env: LLVM_VERSION=6.0 HWLOC_VERSION=2.0 CONDA=True
before_install:
- if [ "$TRAVIS_OS_NAME" = "osx" ] ; then
export MINICONDA_FILE="Miniconda3-latest-MacOSX-x86_64.sh";
else
export MINICONDA_FILE="Miniconda3-latest-Linux-x86_64.sh";
fi
- if [ "$CONDA" = "True" ] ; then
echo "Installing a fresh version of Miniconda.";
MINICONDA_URL="https://repo.continuum.io/miniconda";
curl -L -O "${MINICONDA_URL}/${MINICONDA_FILE}";
bash $MINICONDA_FILE -b;
source $HOME/miniconda3/bin/activate root;
conda config --add channels conda-forge;
conda install --yes --quiet llvmdev=${LLVM_VERSION}.* clangdev=${LLVM_VERSION}.* libhwloc=${HWLOC_VERSION}.*;
export LD_LIBRARY_PATH=$HOME/miniconda3/lib:$LD_LIBRARY_PATH;
fi
- if [ "$CONDA" = "True" ] ; then export MY_CMAKE_PREFIX_PATH="-DCMAKE_PREFIX_PATH=$HOME/miniconda3" ; fi
- if [ "$TRAVIS_OS_NAME" = "osx" ] ; then export MY_CMAKE_ICD_OFF="-DENABLE_ICD=OFF" ; fi
- if [ "$TRAVIS_OS_NAME" = "osx" ] && [ "$CXX" = "clang++" ] ; then MY_CMAKE_LIBCXX="-DCMAKE_CXX_FLAGS=-stdlib=libc++ -DCMAKE_EXE_LINKER_FLAGS=-Wl,-rpath,$HOME/miniconda3/lib" ; fi
- if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then
export GIT_COMMIT="$TRAVIS_COMMIT";
else
export GH_PR=$TRAVIS_PULL_REQUEST;
fi
script:
- if [ "$CONDA" = "True" ] ; then
mkdir build && cd build;
cmake .. -DCMAKE_INSTALL_PREFIX=/tmp $MY_CMAKE_PREFIX_PATH $MY_CMAKE_LIBCXX $MY_CMAKE_ICD_OFF;
make -j2 && make check && make install;
fi
- if [ ! "$DOCKERFILE" = "" ] ; then
docker build -f tools/docker/$DOCKERFILE . --build-arg GH_PR=$GH_PR --build-arg GH_SLUG=$TRAVIS_REPO_SLUG --build-arg GH_COMMIT=$GIT_COMMIT --build-arg LLVM_VERSION=$LLVM_VERSION -t travis_ci_pocl_test;
docker run `docker images -q travis_ci_pocl_test`;
fi
notifications:
email: false