From 1fba56967cff7939565e84983dc9cbf427ba1590 Mon Sep 17 00:00:00 2001 From: Brian Van Klaveren Date: Thu, 18 Jul 2019 07:53:23 -0700 Subject: [PATCH 1/6] Switch to Boost unit test headers --- tests/ndarray-eigen.cc | 3 +-- tests/ndarray-fft.cc | 3 +-- tests/ndarray.cc | 3 +-- tests/views.cc | 3 +-- 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/tests/ndarray-eigen.cc b/tests/ndarray-eigen.cc index 475c7a63..2b6511b0 100644 --- a/tests/ndarray-eigen.cc +++ b/tests/ndarray-eigen.cc @@ -12,9 +12,8 @@ #include "ndarray/buildOptions.h" #include "Eigen/SVD" -#define BOOST_TEST_DYN_LINK #define BOOST_TEST_MODULE ndarray-eigen -#include "boost/test/unit_test.hpp" +#include "boost/test/included/unit_test.hpp" template void testElements2(T const & a, U const & b) { diff --git a/tests/ndarray-fft.cc b/tests/ndarray-fft.cc index 151f6dcc..beb0aa13 100644 --- a/tests/ndarray-fft.cc +++ b/tests/ndarray-fft.cc @@ -10,9 +10,8 @@ */ #include -#define BOOST_TEST_DYN_LINK #define BOOST_TEST_MODULE ndarray-fft -#include "boost/test/unit_test.hpp" +#include "boost/test/included/unit_test.hpp" #include diff --git a/tests/ndarray.cc b/tests/ndarray.cc index 7729e4ad..5f0311b5 100644 --- a/tests/ndarray.cc +++ b/tests/ndarray.cc @@ -10,9 +10,8 @@ */ #include "ndarray.h" -#define BOOST_TEST_DYN_LINK #define BOOST_TEST_MODULE ndarray -#include "boost/test/unit_test.hpp" +#include "boost/test/included/unit_test.hpp" BOOST_AUTO_TEST_CASE(sizes) { std::cerr << "sizeof(int): " << sizeof(int) << "\n"; diff --git a/tests/views.cc b/tests/views.cc index 70dfd1c2..11621a4c 100644 --- a/tests/views.cc +++ b/tests/views.cc @@ -10,9 +10,8 @@ */ #include "ndarray.h" -#define BOOST_TEST_DYN_LINK #define BOOST_TEST_MODULE views -#include "boost/test/unit_test.hpp" +#include "boost/test/included/unit_test.hpp" template int templateC(ndarray::ArrayRef const &) { return C; } From 1504e9690c61dc495a771c95f2cc17d821f31477 Mon Sep 17 00:00:00 2001 From: Brian Van Klaveren Date: Thu, 18 Jul 2019 08:04:04 -0700 Subject: [PATCH 2/6] Switch to conda-forge --- .travis.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 91298410..338dfd20 100644 --- a/.travis.yml +++ b/.travis.yml @@ -22,8 +22,11 @@ install: - conda update -q conda # Useful for debugging any issues with conda - conda info -a - - conda create -q -n test-environment python=$TRAVIS_PYTHON_VERSION boost fftw numpy pybind11 swig cmake gxx_linux-64 + - conda create -q -n test-environment + - conda config --env --add channels conda-forge - source activate test-environment + - conda config --env --add channels conda-forge + - conda install python=$TRAVIS_PYTHON_VERSION boost fftw numpy pybind11 swig cmake compilers - echo "eigen 3.2.*" > $CONDA_PREFIX/conda-meta/pinned - conda install eigen - export BOOST_DIR=$CONDA_PREFIX From 07647c0ece2420ec2eae4617f5daf83cc749b919 Mon Sep 17 00:00:00 2001 From: Brian Van Klaveren Date: Thu, 18 Jul 2019 08:15:37 -0700 Subject: [PATCH 3/6] Remove 3.2 restriction on eigen --- .travis.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 338dfd20..724ae64b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,9 +26,7 @@ install: - conda config --env --add channels conda-forge - source activate test-environment - conda config --env --add channels conda-forge - - conda install python=$TRAVIS_PYTHON_VERSION boost fftw numpy pybind11 swig cmake compilers - - echo "eigen 3.2.*" > $CONDA_PREFIX/conda-meta/pinned - - conda install eigen + - conda install python=$TRAVIS_PYTHON_VERSION boost fftw numpy pybind11 swig cmake compilers eigen - export BOOST_DIR=$CONDA_PREFIX - export EIGEN_DIR=$CONDA_PREFIX - export FFTW_DIR=$CONDA_PREFIX From 01429f26fa26c4e46c45a17c223b1935466cf694 Mon Sep 17 00:00:00 2001 From: Brian Van Klaveren Date: Thu, 18 Jul 2019 08:46:30 -0700 Subject: [PATCH 4/6] Pin pybind11 to 2.2 branch --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 724ae64b..436eaac0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,7 +26,7 @@ install: - conda config --env --add channels conda-forge - source activate test-environment - conda config --env --add channels conda-forge - - conda install python=$TRAVIS_PYTHON_VERSION boost fftw numpy pybind11 swig cmake compilers eigen + - conda install python=$TRAVIS_PYTHON_VERSION boost fftw numpy pybind11=2.2.* swig cmake compilers eigen - export BOOST_DIR=$CONDA_PREFIX - export EIGEN_DIR=$CONDA_PREFIX - export FFTW_DIR=$CONDA_PREFIX From 3ab57998864ef84a2e44f8c9af3702db8d2df0c7 Mon Sep 17 00:00:00 2001 From: Brian Van Klaveren Date: Thu, 18 Jul 2019 08:58:56 -0700 Subject: [PATCH 5/6] Pin eigen 3.2 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 436eaac0..cb88b98f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,7 +26,7 @@ install: - conda config --env --add channels conda-forge - source activate test-environment - conda config --env --add channels conda-forge - - conda install python=$TRAVIS_PYTHON_VERSION boost fftw numpy pybind11=2.2.* swig cmake compilers eigen + - conda install python=$TRAVIS_PYTHON_VERSION boost fftw numpy pybind11=2.2.* swig cmake compilers eigen=3.2.* - export BOOST_DIR=$CONDA_PREFIX - export EIGEN_DIR=$CONDA_PREFIX - export FFTW_DIR=$CONDA_PREFIX From f3d0a2a24b0ecae363c451e99e42bb15b9ff3087 Mon Sep 17 00:00:00 2001 From: Brian Van Klaveren Date: Thu, 18 Jul 2019 14:29:33 -0700 Subject: [PATCH 6/6] Add -lrt for old versions of glibc (conda-forge) --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index cb88b98f..e23c7604 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,7 +23,6 @@ install: # Useful for debugging any issues with conda - conda info -a - conda create -q -n test-environment - - conda config --env --add channels conda-forge - source activate test-environment - conda config --env --add channels conda-forge - conda install python=$TRAVIS_PYTHON_VERSION boost fftw numpy pybind11=2.2.* swig cmake compilers eigen=3.2.* @@ -31,6 +30,8 @@ install: - export EIGEN_DIR=$CONDA_PREFIX - export FFTW_DIR=$CONDA_PREFIX - export CMAKE_PREFIX_PATH=$CONDA_PREFIX + # For conda-forge's old glibc + - export LDFLAGS="-lrt ${LDFLAGS}" script: - mkdir build