File: .jenkins-pr.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 (54 lines) | stat: -rwxr-xr-x 1,582 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
#!/bin/bash

# Script for Jenkins continuous integration testing of libgpuarray

# Print commands as they are executed
set -x

# Anaconda python
export PATH=/usr/local/miniconda2/bin:$PATH

# CUDA
export PATH=/usr/local/cuda/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH
export LIBRARY_PATH=/usr/local/cuda/lib64:$LIBRARY_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
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 LD_LIBRARY_PATH=`pwd`/lib:${LD_LIBRARY_PATH}
export LIBRARY_PATH=`pwd`/lib:${LIBRARY_PATH}
export CPATH=`pwd`/src:${CPATH}

# Build the pygpu modules
python setup.py build_ext --inplace

# Test it
test=pygpu
for dev in ${DEVICES_CUDA}; do
    echo "Testing pygpu for DEVICE=${dev}"
    DEVICE=${dev} time 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} time nosetests --with-xunit --xunit-file=${test}${dev}tests.xml pygpu/tests -e test_blas.py
done