-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy path.travis.yml
61 lines (56 loc) · 2.32 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
language: python
python:
- "3.6"
before_install:
# We do this conditionally because it saves us some downloading if the version is the same.
- sudo apt-get update
#- sudo apt-get install gfortran python3-setuptools python3-yaml
- sudo apt-get install gfortran
- pip install scipy singleton_decorator sphinx pytest pyyaml colorama pytest-cov coveralls h5py setuptools numpy scipy cython
- export PYTHONPATH=$PYTHONPATH:$(pwd)
# Get petsc
- git clone -b release https://gitlab.com/petsc/petsc.git petsc
# Set petsc enviroment
- cd petsc
#- git checkout v3.14
- export PETSC_DIR=$PWD
- export PETSC_ARCH=arch-linux2-c-debug
# Then, build and install PETSc:
- ./configure --with-cc=gcc --with-cxx=g++ --with-fc=gfortran --download-mpich --download-fblaslapack --with-scalar-type=complex --download-mumps --download-scalapack --download-parmetis --download-metis --download-ptscotch --download-cmake --download-petsc4py ./configure
- make $PETSC_DIR $PETSC_ARCH all
# Uncomment next two lines to activate petsc tests
#- make $PETSC_DIR $PETSC_ARCH test
#- make $PETSC_DIR $PETSC_ARCH streams
# Ensure mpicc compiler wrapper is on your search path:
- export PATH="${PETSC_DIR}/${PETSC_ARCH}/bin:${PATH}"
# Remove test directory to avoid pytest conflicts
- find . -type d -name test -prune -exec rm -rf {} \;
- find . -type d -name Test -prune -exec rm -rf {} \;
- find . -type d -name tests -prune -exec rm -rf {} \;
- find . -type d -name Tests -prune -exec rm -rf {} \;
- find . -type d -name testing -prune -exec rm -rf {} \;
- find . -type d -name Testing -prune -exec rm -rf {} \;
- rm -rf $PETESC_DIR/src/binding/petsc4py/demo
- cd ..
install:
# Ensure PYTHONPATH is on your search path:
#- export PYTHONPATH=$PYTHONPATH:$(pwd)
# Install petgem requirements
- pip install mpi4py
#- pip install scipy singleton_decorator sphinx pytest pyyaml colorama pytest-cov coveralls mpi4py h5py
#- pip install numpy scipy singleton_decorator sphinx pytest pyyaml colorama pytest-cov coveralls mpi4py h5py
# Install python binding for petsc
#- cd petsc/src/binding/petsc4py
#- python setup.py build
#- sudo python setup.py install
#- cd ..
#- rm -rf petsc4py
#- cd ../../../
script:
# Make documentation
- cd doc
- make html
- cd ..
- pytest --cov=tests/
after_success:
- coveralls