|
| 1 | +#============================================================================= |
| 2 | +# Travis CoreNeuron settings |
| 3 | +#============================================================================= |
| 4 | + |
| 5 | +#============================================================================= |
| 6 | +# Environment |
| 7 | +#============================================================================= |
| 8 | +language: cpp |
| 9 | + |
| 10 | +#============================================================================= |
| 11 | +# Build matrix |
| 12 | +#============================================================================= |
| 13 | +matrix: |
| 14 | + fast_finish: true |
| 15 | + include: |
| 16 | + - os: linux |
| 17 | + dist: xenial |
| 18 | + env: |
| 19 | + - cmake_option="-DCORENRN_ENABLE_MPI=ON" |
| 20 | + - os: linux |
| 21 | + dist: xenial |
| 22 | + env: |
| 23 | + - cmake_option="-DCORENRN_ENABLE_MPI=OFF" |
| 24 | + - os: linux |
| 25 | + dist: xenial |
| 26 | + env: |
| 27 | + - cmake_option="-DCORENRN_ENABLE_SOA=ON" |
| 28 | + - os: linux |
| 29 | + dist: xenial |
| 30 | + env: |
| 31 | + - cmake_option="-DCORENRN_ENABLE_SOA=OFF" |
| 32 | + - os: linux |
| 33 | + dist: xenial |
| 34 | + env: |
| 35 | + - cmake_option="-DCORENRN_ENABLE_NMODL=ON" |
| 36 | + - PYTHON_VERSION=3.6.7 # for nmodl pip3 install |
| 37 | + - USE_NMODL=ON |
| 38 | + - os: osx |
| 39 | + osx_image: xcode10.2 |
| 40 | + env: |
| 41 | + - cmake_option="-DCORENRN_ENABLE_MPI=ON" |
| 42 | + - os: osx |
| 43 | + osx_image: xcode10.2 |
| 44 | + env: |
| 45 | + - cmake_option="-DCORENRN_ENABLE_MPI=OFF" |
| 46 | + - os: osx |
| 47 | + osx_image: xcode10.2 |
| 48 | + env: |
| 49 | + - cmake_option="-DCORENRN_ENABLE_SOA=ON" |
| 50 | + - os: osx |
| 51 | + osx_image: xcode10.2 |
| 52 | + env: |
| 53 | + - cmake_option="-DCORENRN_ENABLE_SOA=OFF" |
| 54 | + - os: osx |
| 55 | + osx_image: xcode10.2 |
| 56 | + env: |
| 57 | + - cmake_option="-DCORENRN_ENABLE_NMODL=ON" |
| 58 | + - USE_NMODL=ON |
| 59 | + - os: linux |
| 60 | + dist: xenial |
| 61 | + addons: |
| 62 | + apt: |
| 63 | + sources: |
| 64 | + - ubuntu-toolchain-r-test |
| 65 | + packages: |
| 66 | + - bison |
| 67 | + - flex |
| 68 | + - g++-9 |
| 69 | + - libboost-all-dev |
| 70 | + - libopenmpi-dev |
| 71 | + - openmpi-bin |
| 72 | + env: |
| 73 | + - GCC_VERSION=9 |
| 74 | + - os: linux |
| 75 | + dist: xenial |
| 76 | + env: |
| 77 | + - USE_ISPC=ON |
| 78 | + - PYTHON_VERSION=3.6.7 |
| 79 | + |
| 80 | +#============================================================================= |
| 81 | +# Common Packages |
| 82 | +#============================================================================= |
| 83 | +addons: |
| 84 | + # for Linux builds, we use APT |
| 85 | + apt: |
| 86 | + sources: |
| 87 | + - ubuntu-toolchain-r-test |
| 88 | + packages: |
| 89 | + - bison |
| 90 | + - flex |
| 91 | + - libboost-all-dev |
| 92 | + - libopenmpi-dev |
| 93 | + - openmpi-bin |
| 94 | + |
| 95 | + # for Mac builds, we use Homebrew |
| 96 | + homebrew: |
| 97 | + packages: |
| 98 | + - bison |
| 99 | + - flex |
| 100 | + - openmpi |
| 101 | + - boost |
| 102 | + |
| 103 | +#============================================================================= |
| 104 | +# Set up environments |
| 105 | +#============================================================================= |
| 106 | +before_install: |
| 107 | + # brew installed flex and bison is not in $PATH |
| 108 | + - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then |
| 109 | + export PATH=/usr/local/opt/flex/bin:/usr/local/opt/bison/bin:$PATH; |
| 110 | + fi |
| 111 | + # when python 3.6.7 is required, ex. NMODL in linux |
| 112 | + - if [ -n "$PYTHON_VERSION" ]; then |
| 113 | + pyenv global $PYTHON_VERSION; |
| 114 | + fi |
| 115 | + # install NMODL dependencies |
| 116 | + - if [[ "$USE_NMODL" == "ON" || "$USE_ISPC" == "ON" ]]; then |
| 117 | + pip3 install jinja2 pyyaml pytest sympy; |
| 118 | + fi |
| 119 | + - if [ -n "$GCC_VERSION" ]; then |
| 120 | + export CXX="g++-${GCC_VERSION}" CC="gcc-${GCC_VERSION}"; |
| 121 | + $CXX --version; |
| 122 | + fi |
| 123 | + # install ISPC compiler (only for mac or linux build for now) |
| 124 | + - if [[ "$USE_ISPC" == "ON" ]]; then |
| 125 | + if [ "$TRAVIS_OS_NAME" == "linux" ]; then |
| 126 | + url_os="linux"; |
| 127 | + else |
| 128 | + url_os="macOS"; |
| 129 | + fi; |
| 130 | + url="https://sourceforge.net/projects/ispcmirror/files/v1.12.0/ispc-v1.12.0-${url_os}.tar.gz"; |
| 131 | + wget -O ispc.tar.gz $url; |
| 132 | + mkdir ispc && tar -xvzf ispc.tar.gz -C ispc --strip 1; |
| 133 | + fi |
| 134 | +#============================================================================= |
| 135 | +# Build, test and install |
| 136 | +#============================================================================= |
| 137 | +script: |
| 138 | + - echo "------- Build, Test and Install -------" |
| 139 | + - mkdir build && cd build |
| 140 | + - if [[ "$USE_ISPC" == "ON" ]]; then |
| 141 | + cmake -DCORENRN_ENABLE_ISPC=ON -DCMAKE_ISPC_COMPILER=../ispc/bin/ispc |
| 142 | + -DCMAKE_INSTALL_PREFIX=$HOME/CoreNeuron ..; |
| 143 | + else |
| 144 | + cmake ${cmake_option} -DCMAKE_INSTALL_PREFIX=$HOME/CoreNeuron ..; |
| 145 | + fi |
| 146 | + - cmake --build . |
| 147 | + - ctest --output-on-failure |
| 148 | + - make install |
0 commit comments