Commit a0aa81a3 authored by Jay's avatar Jay Committed by jay
Browse files

Update to travis trying to get openCV to build.

parent 19df28c9
Loading
Loading
Loading
Loading
+36 −1
Original line number Original line Diff line number Diff line
language: python
language: python
sudo: false
sudo: true


branches:
branches:
only:
only:
@@ -9,6 +9,7 @@ python:
  - "3.5"
  - "3.5"


before_install:
before_install:
  - sudo apt-get update
install:
install:
  # We do this conditionally because it saves us some downloading if the
  # We do this conditionally because it saves us some downloading if the
  # version is the same.
  # version is the same.
@@ -36,6 +37,40 @@ install:
  - pip install coverage
  - pip install coverage
  - pip install coveralls
  - pip install coveralls


  # Now get OpenCV3 installed
  - sudo apt-get install -y build-essential
  - sudo apt-get install -y cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev
  - sudo apt-get install -y python-dev python-numpy libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libjasper-dev libdc1394-22-dev

  #Grab the source
  - curl -sL https://github.com/Itseez/opencv/archive/3.0.0.zip > opencv.zip
  - curl -sL https://github.com/Itseez/opencv_contrib/archive/3.0.0.zip > opencv_contrib.zip
  - unzip opencv_contrib.zip
  - unzip opencv.zip
  - cd opencv-3.0.0

  # Create a new 'build' folder.
  - mkdir build
  - cd build

  # Set build instructions for Ubuntu distro.
  - cmake -D CMAKE_BUILD_TYPE=RELEASE -D OPENCV_EXTRA_MODULES_PATH=../../opencv_contrib/modules -D CMAKE_INSTALL_PREFIX=$(python -c "import sys; print(sys.prefix)") -D PYTHON_EXECUTABLE=$(which python ) ..

  # Run 'make' with the 1.5 threads Travis makes available
  - make -j2

  # Install to OS.
  - sudo make install

  # Add configuration to OpenCV to tell it where the library files are located on the file system (/usr/local/lib)
  - sudo sh -c 'echo "/usr/local/lib" > /etc/ld.so.conf.d/opencv.conf'

  - sudo ldconfig
  - echo "OpenCV installed."

  # Return to the root
  - cd ../../

script:
script:
  - nosetests --with-coverage --cover-package=autocnet
  - nosetests --with-coverage --cover-package=autocnet