mirror of
https://github.com/pybind/pybind11.git
synced 2025-03-02 06:42:45 +00:00
Travis: Install CUDA 7.5 and Cache it
This commit is contained in:
parent
9dcb1c3b3a
commit
20d71f4580
37
.travis.yml
37
.travis.yml
@ -1,11 +1,16 @@
|
|||||||
language: cpp
|
language: cpp
|
||||||
sudo: false
|
sudo: false
|
||||||
|
|
||||||
|
cache:
|
||||||
|
apt: true
|
||||||
|
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
sources:
|
sources:
|
||||||
- ubuntu-toolchain-r-test
|
- ubuntu-toolchain-r-test
|
||||||
- deadsnakes
|
- deadsnakes
|
||||||
packages:
|
packages:
|
||||||
|
- g++-4.9
|
||||||
- g++-4.8
|
- g++-4.8
|
||||||
- g++-4.8-multilib
|
- g++-4.8-multilib
|
||||||
- g++-multilib
|
- g++-multilib
|
||||||
@ -13,6 +18,7 @@ addons:
|
|||||||
- python3.5-dev
|
- python3.5-dev
|
||||||
- python3.5-venv
|
- python3.5-venv
|
||||||
- python3.5-dev:i386
|
- python3.5-dev:i386
|
||||||
|
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- os: linux
|
- os: linux
|
||||||
@ -24,6 +30,37 @@ matrix:
|
|||||||
- source venv/bin/activate
|
- source venv/bin/activate
|
||||||
- pip install numpy
|
- pip install numpy
|
||||||
- CTEST_OUTPUT_ON_FAILURE=TRUE make test
|
- CTEST_OUTPUT_ON_FAILURE=TRUE make test
|
||||||
|
- os: linux
|
||||||
|
compiler: gcc-4.9
|
||||||
|
env:
|
||||||
|
- CUDA_DIR: $HOME/.cache/cuda
|
||||||
|
cache:
|
||||||
|
directories:
|
||||||
|
- $HOME/.cache/cuda
|
||||||
|
before_script:
|
||||||
|
- python3.5-config --cflags --ldflags --libs
|
||||||
|
- export LD_LIBRARY_PATH=$CUDA_DIR/lib64:$LD_LIBRARY_PATH
|
||||||
|
- export PATH=$CUDA_DIR/bin:$PATH
|
||||||
|
- NVCC_FOUND=$(which nvcc >/dev/null && { echo 0; } || { echo 1; })
|
||||||
|
- echo $CUDA_DIR
|
||||||
|
- ls $CUDA_DIR/
|
||||||
|
- if [ $NVCC_FOUND -ne 0 ]; then
|
||||||
|
mkdir -p $CUDA_DIR &&
|
||||||
|
cd $CUDA_DIR &&
|
||||||
|
travis_retry wget http://developer.download.nvidia.com/compute/cuda/7.5/Prod/local_installers/cuda_7.5.18_linux.run &&
|
||||||
|
chmod u+x *.run &&
|
||||||
|
./cuda_7.5.18_linux.run --silent --verbose --toolkit --toolkitpath=$CUDA_DIR &&
|
||||||
|
rm -f cuda_7.5.18_linux.run &&
|
||||||
|
cd -;
|
||||||
|
fi
|
||||||
|
script:
|
||||||
|
# to do: add a cuda example to compile
|
||||||
|
- pyvenv-3.5 venv
|
||||||
|
- cmake -DPYBIND11_PYTHON_VERSION=3.5 -DPYTHON_INCLUDE_DIR:PATH=/usr/include/python3.5m -DPYTHON_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libpython3.5m.so -DPYTHON_EXECUTABLE:FILEPATH=`pwd`/venv/bin/python3.5 -DCMAKE_CXX_COMPILER=g++-4.9
|
||||||
|
- make -j 2
|
||||||
|
- source venv/bin/activate
|
||||||
|
- pip install numpy
|
||||||
|
- CTEST_OUTPUT_ON_FAILURE=TRUE make test
|
||||||
- os: osx
|
- os: osx
|
||||||
compiler: clang
|
compiler: clang
|
||||||
script:
|
script:
|
||||||
|
Loading…
Reference in New Issue
Block a user