Files
arpack-ng/.travis.yml
T
2020-06-04 09:50:05 +02:00

235 lines
14 KiB
YAML

sudo: true
language: c
compiler:
- gcc
addons:
apt:
packages:
- gfortran
- gcc
- g++
- openmpi-bin
- libopenmpi-dev
- cmake
- automake
- autoconf
- pkg-config
- libtool
- libblas-dev
- liblapack-dev
- diffutils
- findutils
- libeigen3-dev
services:
- docker
stages:
# order stages
- name: fedora
- name: osx
- name: precise
- name: trusty
- name: xenial
- name: bionic
- name: coverage
- name: interface64
jobs:
include:
# fedora (released fedora with openmpi)
- stage: fedora
dist: bionic
script: ./scripts/travis_fedora.sh setup openmpi latest
# fedora (with gcc 10 and mpich)
- stage: fedora
dist: bionic
script: ./scripts/travis_fedora.sh setup mpich rawhide
# osx <=> macOS 10.13 (high sierra)
- stage: osx
os: osx
osx_image: xcode10.1
before_install:
- brew list -1 | while read line; do brew unlink $line; done;
- brew list gcc || brew install gcc
- brew list cmake || brew install cmake
- brew list openblas || brew install openblas
- brew list lapack || brew install lapack
- brew list openmpi || brew install openmpi
- brew list -1 | while read line; do brew link --overwrite $line; done;
# full build but only partial testing as some tests crash on osx (no stack: if you get one, open an issue https://github.com/opencollab/arpack-ng/issues)
script: |
mkdir -p build && cd build && cmake -D EXAMPLES=ON -D MPI=ON -D ICB=ON .. && make VERBOSE=1 && \
make test ARGS="-R snbdr2_ex" && \
make test ARGS="-R dnbdr2_ex" && \
make test ARGS="-R cnbdr2_ex" && \
make test ARGS="-R znbdr2_ex" && \
make test ARGS="-R psndrv1_ex" && \
make test ARGS="-R pdndrv1_ex" && \
make test ARGS="-R pcndrv1_ex"
- stage: osx
os: osx
osx_image: xcode10.1
before_install:
- brew list -1 | while read line; do brew unlink $line; done;
- brew list gcc || brew install gcc
- brew list autoconf || brew install autoconf
- brew list automake || brew install automake
- brew list openblas || brew install openblas
- brew list lapack || brew install lapack
- brew list openmpi || brew install openmpi
- brew list -1 | while read line; do brew link --overwrite $line; done;
# full build but only partial testing as some tests crash on osx (no stack: if you get one, open an issue https://github.com/opencollab/arpack-ng/issues)
script: |
./bootstrap && ./configure --enable-mpi --enable-icb && make VERBOSE=1 && \
cd $TRAVIS_BUILD_DIR/EXAMPLES/BAND && make check TESTS="snbdr2 dnbdr2 cnbdr2 znbdr2" && \
cd $TRAVIS_BUILD_DIR/PARPACK/EXAMPLES/MPI && make check TESTS="psndrv1 pdndrv1 pcndrv1"
# precise <=> test "older" systems, without ICB, without cmake (too old to be supported)
- stage: precise
dist: precise
script: ./bootstrap && ./configure && make VERBOSE=1 && make check && make distcheck;
- stage: precise
dist: precise
script: ./bootstrap && ./configure --enable-mpi && make VERBOSE=1 && make check && make distcheck;
# trusty <=> test "older" systems, without ICB
- stage: trusty
dist: trusty
script: mkdir -p build && cd build && cmake -D EXAMPLES=ON -D MPI=OFF -D ICB=OFF .. && make VERBOSE=1 && make test && make package_source;
- stage: trusty
dist: trusty
script: mkdir -p build && cd build && cmake -D EXAMPLES=ON -D MPI=ON -D ICB=OFF .. && make VERBOSE=1 && make test && make package_source;
- stage: trusty
dist: trusty
script: ./bootstrap && ./configure && make VERBOSE=1 && make check && make distcheck;
- stage: trusty
dist: trusty
script: ./bootstrap && ./configure --enable-mpi && make VERBOSE=1 && make check && make distcheck;
# xenial <=> test "recent" systems, with and without ICB
- stage: xenial
dist: xenial
script: mkdir -p build && cd build && cmake -D EXAMPLES=ON -D MPI=OFF -D ICB=OFF .. && make VERBOSE=1 && make test && make package_source;
- stage: xenial
dist: xenial
script: mkdir -p build && cd build && cmake -D EXAMPLES=ON -D MPI=ON -D ICB=OFF .. && make VERBOSE=1 && make test && make package_source;
- stage: xenial
dist: xenial
script: mkdir -p build && cd build && cmake -D EXAMPLES=ON -D MPI=OFF -D ICB=ON .. && make VERBOSE=1 && make test && make package_source;
- stage: xenial
dist: xenial
script: mkdir -p build && cd build && cmake -D EXAMPLES=ON -D MPI=ON -D ICB=ON .. && make VERBOSE=1 && make test && make package_source;
- stage: xenial
dist: xenial
script: ./bootstrap && ./configure && make VERBOSE=1 && make check && make distcheck;
- stage: xenial
dist: xenial
script: ./bootstrap && ./configure --enable-mpi && make VERBOSE=1 && make check && make distcheck;
- stage: xenial
dist: xenial
script: ./bootstrap && ./configure --enable-icb && make VERBOSE=1 && make check && make distcheck;
- stage: xenial
dist: xenial
script: ./bootstrap && ./configure --enable-mpi --enable-icb && make VERBOSE=1 && make check && make distcheck;
# bionic <=> test "recent" systems, with ICB
- stage: bionic
dist: bionic
script: ./bootstrap && ./configure --enable-icb --enable-icb-exmm --enable-mpi && export VERBOSE=1 && make all && make check
- stage: bionic
dist: bionic
before_install:
- sudo apt-get -y install python3-minimal python3-pip python3-numpy
- sudo pip3 install --system numpy
# need to build boost-python from source for python 3 (repository package is built for python 2)
- sudo apt-get -y install wget
- wget https://sourceforge.net/projects/boost/files/boost/1.67.0/boost_1_67_0.tar.gz
- tar -xf boost_1_67_0.tar.gz && cd boost_1_67_0
- ./bootstrap.sh --with-libraries=python --with-python=/usr/bin/python3
- sudo ./b2 install
- sudo apt-get install locate
- sudo updatedb
script: |
cd $TRAVIS_BUILD_DIR && mkdir -p build && cd build && \
cmake -DEXAMPLES=ON -DICB=ON -DICBEXMM=ON -DMPI=ON -DPYTHON3=ON -DBOOST_PYTHON_LIBSUFFIX='36' .. && \
export VERBOSE=1 && make all && make test
# coverage: "recent" systems with ICB
- stage: coverage
dist: bionic
script: |
mkdir -p build && cd build \
&& \
cmake -DEXAMPLES=ON -DMPI=ON -DICB=ON -DCOVERALLS=ON .. &> cmake.log \
&& \
tail -n 50 cmake.log \
&& \
make all &> compil.log \
&& \
tail -n 50 compil.log \
&& \
make test &> test.log \
&& \
tail -n 50 test.log \
&& \
make coveralls &> coveralls.log \
&& \
head -n 50 coveralls.log && tail -n 50 coveralls.log \
&& \
head -n 50 coveralls.json && tail -n 50 coveralls.json
# interface64: "recent" systems with ICB + MKL + ILP64 (need debian/testing to get MKL-ILP64)
# note: when you PR, docker-cp provides, in the container, the branch associated with the PR (not master where there's nothing new)
# 1. docker create --name mobydick IMAGE CMD <=> create a container (= instance of image) but container is NOT yet started
# 2. docker cp -a ${TRAVIS_BUILD_DIR} mobydick:/tmp <=> copy git repository (CI worker, checkout-ed on PR branch) into the container
# note: docker-cp works only if copy from/to containers (not images)
# 3. docker start -a mobydick <=> start to run the container (initialized with docker-cp)
- stage: interface64
dist: xenial
script: |
sudo docker pull debian \
&& \
sudo docker create --name mobydick debian /bin/bash -c \
"cat /etc/os-release && \
cat /etc/apt/sources.list && \
sed -e 's/stretch/testing/' -i /etc/apt/sources.list && \
sed -e 's/main/main non-free contrib/' -i /etc/apt/sources.list && \
sed -e '/security.debian.org/d' -i /etc/apt/sources.list && \
cat /etc/apt/sources.list && \
export DEBIAN_FRONTEND=noninteractive && \
apt-get -y update && \
apt-get -y --allow-unauthenticated -o Dpkg::Options::=--force-confdef upgrade && \
apt-get -y --allow-unauthenticated -o Dpkg::Options::=--force-confdef dist-upgrade && \
cat /etc/os-release && \
apt-get -y install dialog && \
echo yes | apt-get -y install intel-mkl libmkl-dev && \
apt-get -y install build-essential && \
apt-get -y install git gfortran gcc g++ openmpi-bin libopenmpi-dev automake autoconf libtool pkg-config && \
apt-get -y install libeigen3-dev && \
cd /tmp && \
cd arpack-ng && \
git status && \
git log -2 && \
sed -e 's/LOG_FLAGS = /LOG_FLAGS = --allow-run-as-root --oversubscribe /' -i PARPACK/EXAMPLES/MPI/Makefile.am && \
sed -e 's/LOG_FLAGS = /LOG_FLAGS = --allow-run-as-root --oversubscribe /' -i PARPACK/TESTS/MPI/Makefile.am && \
./bootstrap && \
export FFLAGS='-DMKL_ILP64 -I/usr/include/mkl' && \
export FCFLAGS='-DMKL_ILP64 -I/usr/include/mkl' && \
export LIBS='-Wl,--no-as-needed -L/usr/lib/x86_64-linux-gnu -lmkl_sequential -lmkl_core -lpthread -lm -ldl' && \
export INTERFACE64=1 && \
./configure --with-blas=mkl_gf_ilp64 --with-lapack=mkl_gf_ilp64 --enable-mpi --enable-icb-exmm \
--disable-dependency-tracking && \
export VERBOSE=1 && \
make all && \
make check && \
find . -name test-suite.log | xargs tail -n 300" \
&& \
sudo docker cp -a ${TRAVIS_BUILD_DIR} mobydick:/tmp \
&& \
sudo docker start -a mobydick
after_failure:
# show build error or test log to know what is wrong if errors occured.
- if [[ -f $TRAVIS_BUILD_DIR/build/Testing/Temporary/LastTest.log ]]; then tail -n 300 $TRAVIS_BUILD_DIR/build/Testing/Temporary/LastTest.log; fi
- find . -name test-suite.log | xargs tail -n 300
- find . -name arpackmm.run.log | xargs tail -n 300