[TravisCI] Add osx job (#234)
* parpack.hpp: don't use complex.h C macros. * [BUG FIX] fix autotools build on osx. * [TravisCI] Add osx job. Full build but only partial testing as some tests crash on osx.
This commit is contained in:
+40
@@ -29,6 +29,7 @@ services:
|
||||
|
||||
stages:
|
||||
# order stages
|
||||
- name: osx
|
||||
- name: precise
|
||||
- name: trusty
|
||||
- name: xenial
|
||||
@@ -39,6 +40,45 @@ stages:
|
||||
|
||||
jobs:
|
||||
include:
|
||||
# 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
|
||||
|
||||
+4
-2
@@ -132,10 +132,11 @@ inline void neupd(MPI_Fint comm, a_int rvec, howmny const howmny_option,
|
||||
std::complex<float>* rwork, a_int& info)
|
||||
|
||||
{
|
||||
std::complex<float> sigma2 = sigma;
|
||||
internal::pcneupd_c(comm, rvec, internal::convert_to_char(howmny_option),
|
||||
select, reinterpret_cast<_Complex float*>(d),
|
||||
reinterpret_cast<_Complex float*>(z), ldz,
|
||||
std::real(sigma) + _Complex_I * std::imag(sigma),
|
||||
*reinterpret_cast<_Complex float*>(&sigma2),
|
||||
reinterpret_cast<_Complex float*>(workev),
|
||||
internal::convert_to_char(bmat_option), n,
|
||||
internal::convert_to_char(which_option), nev, tol,
|
||||
@@ -170,10 +171,11 @@ inline void neupd(MPI_Fint comm, a_int rvec, howmny const howmny_option,
|
||||
a_int ldv, a_int* iparam, a_int* ipntr, std::complex<double>* workd,
|
||||
std::complex<double>* workl, a_int lworkl,
|
||||
std::complex<double>* rwork, a_int& info) {
|
||||
std::complex<double> sigma2 = sigma;
|
||||
internal::pzneupd_c(comm, rvec, internal::convert_to_char(howmny_option),
|
||||
select, reinterpret_cast<_Complex double*>(d),
|
||||
reinterpret_cast<_Complex double*>(z), ldz,
|
||||
std::real(sigma) + _Complex_I * std::imag(sigma),
|
||||
*reinterpret_cast<_Complex double*>(&sigma2),
|
||||
reinterpret_cast<_Complex double*>(workev),
|
||||
internal::convert_to_char(bmat_option), n,
|
||||
internal::convert_to_char(which_option), nev, tol,
|
||||
|
||||
@@ -140,6 +140,7 @@ if test x"$enable_icb" != x"no"; then
|
||||
AX_MPI([], AC_MSG_ERROR([could not compile a Fortran MPI test program]))
|
||||
FC=$MPIFC
|
||||
AC_FC_LIBRARY_LDFLAGS dnl set FCLIBS
|
||||
AC_SUBST([MPI_Fortran_LIBS], ["$MPILIBS $FCLIBS"])
|
||||
AC_LANG_POP([Fortran])
|
||||
|
||||
AC_LANG_PUSH([C])
|
||||
|
||||
Reference in New Issue
Block a user