This repository has been archived by the owner on Nov 8, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 32
/
.travis.yml
109 lines (95 loc) · 4.36 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
106
107
108
109
language: julia
# Use Ubuntu 14.04 on Travis, which makes it possible to use gcc 4.8.
sudo: required
dist: trusty
os:
- linux
- osx
julia:
- 0.6
- nightly
matrix:
allow_failures:
- julia: nightly
env:
- PROSPECT_DEV_MODE=1 TEST_SUITE=pa-tests
- PROSPECT_DEV_MODE=1 TEST_SUITE=pa-examples
- PROSPECT_DEV_MODE=1 TEST_SUITE=hpat-tests
- JULIA_NUM_THREADS=1 PROSPECT_MODE=THREADS PROSPECT_DEV_MODE=1 TEST_SUITE=pa-tests-native
- JULIA_NUM_THREADS=1 PROSPECT_MODE=THREADS PROSPECT_DEV_MODE=1 TEST_SUITE=pa-examples-native
script:
- if [[ -a .git/shallow ]]; then git fetch --unshallow; fi
- if [[ "$TRAVIS_OS_NAME" != "osx" ]]; then sudo apt-get update -qq; fi
- if [[ "$TRAVIS_OS_NAME" != "osx" ]]; then sudo apt-get install -qq gcc g++ gfortran; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi
# Add OpenBLAS.
- if [[ "$TRAVIS_OS_NAME" != "osx" ]]; then sudo apt-get install -qq libopenblas-dev; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install homebrew/science/openblas; fi
# On Mac in particular, we need a couple of env vars set to be able to use OpenBLAS.
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/opt/openblas/lib; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export CPLUS_INCLUDE_PATH=$CPLUS_INCLUDE_PATH:/usr/local/opt/openblas/include/; fi
# Pull in and build CompilerTools dependency.
- julia -e 'Pkg.clone("https://github.com/IntelLabs/CompilerTools.jl")'
- julia -e 'Pkg.build("CompilerTools")'
# Add packages necessary to run examples.
- julia -e 'Pkg.add("DocOpt"); Pkg.add("Images"); Pkg.add("ImageMagick"); Pkg.add("Winston")'
# Build ParallelAccelerator.
- julia -e 'Pkg.clone(pwd()); Pkg.build("ParallelAccelerator")'
# Run tests.
- if [ $TEST_SUITE = 'pa-tests' ]; then
julia --code-coverage=user test/runtests.jl;
julia -e 'cd(Pkg.dir("ParallelAccelerator")); Pkg.add("Coverage"); using Coverage; Coveralls.submit(Coveralls.process_folder())';
fi
# Run tests.
- if [ $TEST_SUITE = 'pa-tests-native' ]; then
if [[ "$TRAVIS_OS_NAME" = "linux" ]]; then
if [[ "$TRAVIS_JULIA_VERSION" = "0.5" ]]; then
julia --code-coverage=user test/runtests.jl;
julia -e 'cd(Pkg.dir("ParallelAccelerator")); Pkg.add("Coverage"); using Coverage; Coveralls.submit(Coveralls.process_folder())';
fi;
fi;
fi
# Run examples.
-
if [ $TEST_SUITE = 'pa-examples' ]; then
if [[ "$TRAVIS_OS_NAME" != "osx" ]]; then
julia --code-coverage=user examples/black-scholes/black-scholes.jl;
julia --code-coverage=user examples/boltzmann/boltzmann.jl;
julia --code-coverage=user examples/quant/quant.jl;
julia --code-coverage=user examples/gaussian-blur/gaussian-blur.jl;
fi;
julia --code-coverage=user examples/harris/harris.jl;
julia --code-coverage=user examples/juliaset/juliaset.jl;
julia --code-coverage=user examples/laplace-3d/laplace-3d.jl;
julia --code-coverage=user examples/opt-flow/opt-flow.jl;
julia --code-coverage=user examples/wave-2d/wave-2d.jl;
julia --code-coverage=user examples/nengo/nengo-nef.jl;
julia -e 'cd(Pkg.dir("ParallelAccelerator")); Pkg.add("Coverage"); using Coverage; Coveralls.submit(Coveralls.process_folder())';
fi
# Run native mode.
- >
if [ $TEST_SUITE = 'pa-examples-native' ]; then
if [[ "$TRAVIS_OS_NAME" = "linux" ]]; then
if [[ "$TRAVIS_JULIA_VERSION" = "0.5" ]]; then
julia --code-coverage=user examples/black-scholes/black-scholes.jl;
julia --code-coverage=user examples/boltzmann/boltzmann.jl;
julia --code-coverage=user examples/quant/quant.jl;
julia --code-coverage=user examples/gaussian-blur/gaussian-blur.jl;
julia --code-coverage=user examples/harris/harris.jl;
julia --code-coverage=user examples/juliaset/juliaset.jl;
julia --code-coverage=user examples/laplace-3d/laplace-3d.jl;
julia --code-coverage=user examples/opt-flow/opt-flow.jl;
julia --code-coverage=user examples/wave-2d/wave-2d.jl;
julia --code-coverage=user examples/nengo/nengo-nef.jl;
julia -e 'cd(Pkg.dir("ParallelAccelerator")); Pkg.add("Coverage"); using Coverage; Coveralls.submit(Coveralls.process_folder())';
fi;
fi;
fi
after_success:
# Run HPAT tests.
- >
if [ $TEST_SUITE = 'hpat-tests' ]; then
sudo apt-get install -y nodejs npm;
npm install travis-ci;
node trigger-build.js;
fi