-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
126 lines (108 loc) · 4.6 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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
language: cpp
#notifications:
# email: false
compiler:
- gcc
- clang
os: linux
sudo: required
dist: focal
cache:
directories:
- $HOME/.ccache
- $TRAVIS_BUILD_DIR/../petsc
env:
global:
- PETSC_DIR=${TRAVIS_BUILD_DIR}/../petsc
- PETSCOPT_DIR=${TRAVIS_BUILD_DIR}
- PETSCOPT_ARCH=arch-popt #test different arch names
- BLASLAPACK=
- PETSC_OPTIONS='-check_pointer_intensity 0 -malloc_test'
- OPTFLAGS='-O'
- CXXFLAGS='-std=c++11'
- PETSC_COMMIT=
- CLANGUAGE=C
#- MFEM_COMMIT=v4.3
- MFEM_COMMIT=origin/master
matrix:
# default builds using PETSc master. Keep one origin/release build
- MPI=mpich INT64=0 SCALAR=real PRECISION=double MFEM=1
- MPI=mpich INT64=1 SCALAR=real PRECISION=double MFEM=1
- MPI=mpich INT64=0 SCALAR=complex PRECISION=double CLANGUAGE=C++
- MPI=mpich INT64=0 SCALAR=real PRECISION=double MFEM=1 PETSC_COMMIT=origin/release
### - MPI=mpich INT64=0 SCALAR=real PRECISION=__float128 BLASLAPACK="--download-f2cblaslapack=1"
### - MPI=mpich INT64=1 SCALAR=real PRECISION=__float128 BLASLAPACK="--download-f2cblaslapack=1"
### - MPI=mpich INT64=1 SCALAR=complex PRECISION=double CLANGUAGE=C++
matrix:
include:
# OSX
- env: MPI=mpich INT64=0 SCALAR=real MFEM=1
compiler: clang
os: osx
osx_image: xcode12.2
# - env: MPI=mpich INT64=1 SCALAR=complex CLANGUAGE=C++
# compiler: clang
# os: osx
# backward compatibility # cannot use 3.11.x or earlier since github.com/LLNL/hypre disappeared!
- env: PETSC_COMMIT=v3.12.5 MPI=mpich INT64=0 SCALAR=real MFEM=1
git:
depth: 3
branches:
only:
- master
- /^ci\/.*$/
addons:
apt:
packages:
- libblas-dev
- liblapack-dev
- libmpich-dev
homebrew:
packages:
- ccache
- mpich
update: true
before_install:
- which gcc
- echo "CC is "$CC
- which clang
- if [[ "$TRAVIS_COMPILER" == "gcc" ]]; then CC=gcc && CXX=g++; fi
# - if [[ "$TRAVIS_OS_NAME" == "linux" && "$TRAVIS_COMPILER" == "clang" ]]; then CC=clang-3.6 && CXX=clang++-3.6; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export PATH=/usr/local/opt/ccache/libexec:$PATH; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export CCACHE_BINDIR=/usr/local/bin; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export CCACHE_BINLIB=/usr/local/bin; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export TMPDIR=/tmp; fi
# - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi
# - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install mpich ccache; fi
# - sudo update-ccache-symlinks -> does not work with clang
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then export PATH=/usr/lib/ccache:$PATH; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then export CCACHE_BINDIR=/usr/bin; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then export CCACHE_BINLIB=/usr/lib/ccache; fi
install:
- which $CC
- sudo rm -rf ${CCACHE_BINLIB}/${CC}
- sudo rm -rf ${CCACHE_BINLIB}/${CXX}
- sudo ln -s ${CCACHE_BINDIR}/ccache ${CCACHE_BINLIB}/${CC}
- sudo ln -s ${CCACHE_BINDIR}/ccache ${CCACHE_BINLIB}/${CXX}
- echo $PETSC_DIR
- export MPICH_CC=$CC
- export MPICH_CXX=$CXX
- mpicc -show
- echo $PETSC_DIR && ls -A $PETSC_DIR
#- rm -rf $PETSC_DIR
- if [[ ! "$(ls -A $PETSC_DIR)" ]]; then git clone https://gitlab.com/petsc/petsc.git $PETSC_DIR; fi
- cd $PETSC_DIR
- git fetch
- git clean -q -d -x -f
- git reset --hard ${PETSC_COMMIT:-origin/main}
- rm -rf arch-test
- ./configure PETSC_ARCH=arch-test --with-cc=mpicc --with-cxx=mpicxx --with-fc=0 --with-debugging=${DBG:-0} --with-clanguage=${CLANGUAGE} --with-64-bit-indices=${INT64:-0} --with-scalar-type=${SCALAR:-real} --with-precision=${PRECISION:-double} --download-mfem=${MFEM:-0} --download-hypre=${MFEM:-0} --download-metis=${MFEM:-0} --download-mfem-commit=${MFEM_COMMIT:-master} --with-cxx-dialect=C++11 $BLASLAPACK COPTFLAGS="$OPTFLAGS" CXXOPTFLAGS="$OPTFLAGS" FOPTFLAGS="$OPTFLAGS" CXXFLAGS="$CXXFLAGS" CPPFLAGS="$CPPFLAGS" CXXPPFLAGS="$CPPFLAGS" || /bin/sh -c "tail -2500 configure.log; false"
- make MAKE_NP=$(nproc) PETSC_ARCH=arch-test || /bin/sh -c "if [ -f arch-test/lib/petsc/conf/mfem.errorflg ]; then tail -200 arch-test/lib/petsc/conf/mfem.log; fi; tail -200 make.log; false"
- cd $PETSCOPT_DIR
- make with_mfem=${MFEM:-0} MAKE_NP=$(nproc) PETSC_ARCH=arch-test
- make check
script:
- cd $PETSCOPT_DIR
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then make -i -j1 PETSC_ARCH=arch-test TIMEOUT=120 test | tee alltests.log; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then test -z "$(grep FAILED alltests.log)"; fi
- cd $PETSC_DIR && git clean -q -x -d -f