-
Notifications
You must be signed in to change notification settings - Fork 3
/
.travis.yml
78 lines (73 loc) · 2.91 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
language: C
matrix:
include:
- os: linux
dist: trusty
sudo: required
env: PETSC_VERSION=3.13.3 UPDATE_REPOSITORY="true" LD_LIBRARY_PATH=$HOME/petsc/lib
before_install:
# Install Octave and MATLAB
- '[[ "$TRAVIS_OS_NAME" != "linux" ]] || echo $(ifconfig eth0 | grep HWaddr)'
- '[[ "$TRAVIS_OS_NAME" != "osx" ]] || echo $(ifconfig en0 | grep ether)'
- 'if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
sudo $UPDATE_REPOSITORY;
sudo apt-get update -q;
sudo apt-get install -y --no-install-recommends
realpath
octave
bsdtar
liboctave-dev
mpich2
libmpich2-dev
build-essential
gfortran
cmake
bison
flex;
pip install -U requests;
[[ "$BUILD_MATLAB" == "0" ]] || (curl -s -L
https://raw.githubusercontent.com/hpdata/gdutil/master/gd_get_pub.py |
python - -o - -i "$MEX_LINUX" |
sudo bsdtar zxf - -C /usr/local --strip-components 2;
sudo ln -s -f /usr/local/MATLAB/R*/bin/mex /usr/local/bin);
fi'
- 'if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
pip install -U requests;
[[ "$BUILD_MATLAB" == "0" ]] || (curl -s -L
https://raw.githubusercontent.com/hpdata/gdutil/master/gd_get_pub.py |
python - -o - -i "$MEX_OSX" |
sudo bsdtar zxf - -C /Applications --strip-components 1;
sudo ln -s -f /Applications/MATLAB_R*/bin/mex /usr/local/bin);
brew tap homebrew/science;
brew update;
brew install --without-java octave;
brew install mpich2 flex;
sudo ln -s -f /usr/local/bin/gcc-7 /usr/local/bin/gcc-mp;
sudo ln -s -f /usr/local/bin/g++-7 /usr/local/bin/g++-mp;
sudo ls -l /usr/local/bin/gcc-* /usr/local/bin/g++-*;
fi'
# Build PETSc
- 'curl -s http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-lite-${PETSC_VERSION}.tar.gz |
tar zx &&
cd petsc-${PETSC_VERSION} &&
./configure --COPTFLAGS="-g" --CXXOPTFLAGS="-g" --FOPTFLAGS="-g"
--with-c-support --with-debugging=1 --with-shared-libraries
--download-blas --download-lapack
--download-suitesparse --download-superlu
--download-scalapack
--download-metis --download-parmetis
--download-ptscotch --download-hypre
--download-mumps --download-blacs
--download-spai --prefix=$HOME/petsc'
- make && sudo make install && cd ..
script:
# Inatall paracoder
- 'cd .. &&
mkdir -p paracoder &&
curl -s -L https://github.com/fastsolve/paracoder/archive/master.zip |
bsdtar zxf - --strip-components 1 -C paracoder &&
cd paracoder &&
cd ../petsc4m'
# compile and test petsc4m
- '[[ "$BUILD_MATLAB" == "1" ]] || PETSC_DIR=$HOME/petsc octave --eval "build_petsc -force; run tests/test_petsc"'
# '[[ "$BUILD_MATLAB" == "0" ]] || PETSC_DIR=$HOME/petsc octave --eval "build_petsc -force -matlab"'