.travis.yml 2.78 KB
Newer Older
1
2
language: python

3
4
5
6
7
8
9
addons:
  apt:
    packages:
      - gromacs
      - doxygen
      - python-numpy
      - python-scipy
10

11
12
13
matrix:
  include:
    - sudo: required
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
      env: OPENCL=true
           CC=gcc
           CXX=g++
           CMAKE_FLAGS="
           -OPENMM_BUILD_OPENCL_LIB=ON
           -DOPENMM_BUILD_OPENCL_TESTS=ON
           -DOPENMM_BUILD_STATIC_LIB=OFF
           -DOPENMM_BUILD_CPU_LIB=OFF
           -DOPENMM_BUILD_REFERENCE_TESTS=OFF
           -DOPENMM_BUILD_SERIALIZATION_TESTS=OFF
           -DOPENMM_BUILD_PME_PLUGIN=OFF
           -DOPENMM_BUILD_AMOEBA_PLUGIN=OFF
           -DOPENMM_BUILD_PYTHON_WRAPPERS=OFF
           -DOPENMM_BUILD_C_AND_FORTRAN_WRAPPERS=OFF
           -DOPENMM_BUILD_EXAMPLES=OFF"
      addons: {apt: {packages: []}}

31
32
    - sudo: false
      python: 2.7_with_system_site_packages
33
34
35
36
37
      env: OPENCL=false
           CC=clang
           CXX=clang++
           CMAKE_FLAGS="-DOPENMM_BUILD_STATIC_LIB=ON"

38
39
    - sudo: false
      python: 2.7_with_system_site_packages
40
41
42
43
44
      env: OPENCL=false
           CC=clang
           CXX=clang++
           CMAKE_FLAGS="-DOPENMM_BUILD_STATIC_LIB=OFF"

45
46
    - sudo: false
      python: 3.4
47
48
49
50
      env: OPENCL=false
           CC=gcc
           CXX=g++
           CMAKE_FLAGS="-DOPENMM_BUILD_STATIC_LIB=OFF"
Robert McGibbon's avatar
Robert McGibbon committed
51

52
before_install:
53
54
55
56
57
58
59
60
61
62
63
  - if [[ "$OPENCL" == "true" ]]; then
      sudo apt-get -yq update &>> ~/apt-get-update.log;
      sudo apt-get install -qq fglrx=2:8.960-0ubuntu1 opencl-headers;
    fi
  - if [[ "$OPENCL" == "false" ]]; then
      wget https://anaconda.org/anaconda/swig/3.0.2/download/linux-64/swig-3.0.2-0.tar.bz2;
      mkdir $HOME/swig;
      tar -xjvf swig-3.0.2-0.tar.bz2 -C $HOME/swig;
      export PATH=$HOME/swig/bin:$PATH;
      export SWIG_LIB=$HOME/swig/share/swig/3.0.2;
    fi
64

65
script:
66
67
68
  - CTEST_STOP_TIME=$(python -c "from datetime import datetime, timedelta; import sys; sys.stdout.write((datetime.now() + timedelta(minutes=25)).strftime('%H:%M:%S'))")
  - cmake . $CMAKE_FLAGS -DCMAKE_INSTALL_PREFIX=$HOME/OpenMM

69
  - make -j2 install
70
71
72
73
74
75
76
  - if [[ "$OPENCL" == "true" ]]; then ./TestOpenCLDeviceQuery; fi
  - if [[ "$OPENCL" == "false" ]]; then
      make PythonInstall;
      python -m simtk.testInstallation;
      (cd python/tests && py.test -v *);
    fi

77
  - # run all of the tests, making sure failures at this stage don't cause travis failures
78
  - ctest -j2 --output-on-failure --schedule-random --stop-time $CTEST_STOP_TIME || true
79
  - # get a list of all of the failed tests into this stupid ctest format
80
  - python -c "import os; fn = os.path.join('Testing', 'Temporary', 'LastTestsFailed.log'); os.path.exists(fn) or exit(0); failed = [line.split(':')[0] for line in open(fn)]; print(','.join(x+','+x for x in failed))" > FailedTests.log
81
82
83
  - if [ -s Testing/Temporary/LastTestsFailed.log ]; then
      ctest -I FailedTests.log;
    fi