File: .jenkins_pr_mac.sh

package info (click to toggle)
libgpuarray 0.7.6-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 2,552 kB
  • sloc: ansic: 19,235; python: 4,621; makefile: 219; sh: 9
file content (55 lines) | stat: -rwxr-xr-x 1,716 bytes parent folder | download | duplicates (2)
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
#!/bin/bash

# Script for Jenkins continuous integration testing of libgpuarray on mac

# Print commands as they are executed
set -x

# Set path for conda and cmake
export PATH="/Users/jenkins/miniconda2/bin:/usr/local/bin:$PATH"

# CUDA
export PATH=/usr/local/cuda/bin:${PATH}
export DYLD_LIBRARY_PATH=/usr/local/cuda/lib:${DYLD_LIBRARY_PATH}
export CPLUS_INCLUDE_PATH=/usr/local/cuda/include:${CPLUS_INCLUDE_PATH}

# Can also set to "Debug", "Release" to go faster
: ${GPUARRAY_CONFIG:="Release"}
# Set these to " " to disable (empty doesn't work)
: ${DEVICES_CUDA:="cuda"} # for multiple devices use "cuda0 cuda1"
: ${DEVICES_OPENCL:=" "}

git rev-parse HEAD

# Build libgpuarray and run C tests
rm -rf build lib
mkdir build
(cd build && cmake .. -DCMAKE_BUILD_TYPE=${GPUARRAY_CONFIG} && make)

# Test on different devices
for dev in ${DEVICES_CUDA}; do
    echo "Testing libgpuarray for DEVICE=${dev}"
    (cd build && DEVICE=${dev} make test)
done
for dev in ${DEVICES_OPENCL}; do
    echo "Testing libgpuarray for DEVICE=${dev}"
    (cd build && DEVICE=${dev} make test)
done

export PYTHONPATH=`pwd`/lib/python:$PYTHONPATH
export DYLD_LIBRARY_PATH=`pwd`/lib:${DYLD_LIBRARY_PATH}
export CPLUS_INCLUDE_PATH=`pwd`/src:${CPLUS_INCLUDE_PATH}

# Build the pygpu modules
python setup.py build_ext --inplace -I`pwd`/src -L`pwd`/lib

# Test it
test=pygpu_pr_mac
for dev in ${DEVICES_CUDA}; do
    echo "Testing pygpu for DEVICE=${dev}"
    DEVICE=${dev} nosetests --with-xunit --xunit-file=${test}_${dev}tests.xml pygpu/tests
done
for dev in ${DEVICES_OPENCL}; do
    echo "Testing pygpu for DEVICE=${dev}"
    DEVICE=${dev} nosetests --with-xunit --xunit-file=${test}_${dev}tests.xml pygpu/tests -e test_blas.py
done