diff --git a/.travis.yml b/.travis.yml index 70004d8..ecdcd6d 100755 --- a/.travis.yml +++ b/.travis.yml @@ -12,6 +12,10 @@ node_js: - '0.12' - "iojs-v1.0.4" +sudo: required +services: + - docker + compiler: clang env: @@ -50,6 +54,7 @@ install: # test our module - npm test - node lib/opencv.js + - docker build -t peterbraden/node-opencv . before_script: - echo "Publishing native platform Binary Package? ->" $PUBLISH_BINARY diff --git a/Dockerfile b/Dockerfile index 3919141..7e4334e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,5 +16,4 @@ run apt-get update run apt-get install -y libcv-dev libcvaux-dev libhighgui-dev libopencv-dev run curl -sL https://deb.nodesource.com/setup | bash - run apt-get install -y nodejs -# ensure npm installs at v3.2.0 vice tip run npm install opencv || cat npm-debug.log diff --git a/test/Dockerfile-ubuntu-12-04 b/test/Dockerfile-ubuntu-12-04 index 2af10e5..735625d 100644 --- a/test/Dockerfile-ubuntu-12-04 +++ b/test/Dockerfile-ubuntu-12-04 @@ -1,12 +1,4 @@ -# This file describes how to build node-opencv into a runnable linux container with all dependencies installed -# To build: -# 1) Install docker (http://docker.io) -# 2) Build: wget https://raw.github.com/dotcloud/docker/v0.1.6/contrib/docker-build/docker-build && python docker-build $USER/node-opencv < Dockerfile -# 3) Test: docker run $USER/node-opencv node -e "console.log(require('opencv').version)" -# -# VERSION 0.1 -# DOCKER-VERSION 0.1.6 - +# This is a dockerfile to test the build on ubuntu 12.04 from ubuntu:12.04 run apt-get update -qq run apt-get install -y software-properties-common python-software-properties @@ -15,4 +7,7 @@ run apt-get update run apt-get install -y libcv-dev libcvaux-dev libhighgui-dev libopencv-dev run curl -sL https://deb.nodesource.com/setup | bash - run apt-get install -y nodejs -run npm install opencv || cat npm-debug.log +WORKDIR /root/node-opencv +add . /root/node-opencv +run npm install --unsafe-perm --build-from-source || cat npm-debug.log +run make test diff --git a/test/Dockerfile-ubuntu-14-04 b/test/Dockerfile-ubuntu-14-04 index 3919141..262a37d 100644 --- a/test/Dockerfile-ubuntu-14-04 +++ b/test/Dockerfile-ubuntu-14-04 @@ -1,13 +1,4 @@ -# This file describes how to build node-opencv into a runnable linux container with all dependencies installed -# To build: -# 1) Install docker (http://docker.io) -# 2) Build: wget https://raw.github.com/dotcloud/docker/v0.1.6/contrib/docker-build/docker-build && python docker-build $USER/node-opencv < Dockerfile -# 3) Test: docker run $USER/node-opencv node -e "console.log(require('opencv').version)" -# -# VERSION 0.2 -# DOCKER-VERSION 8.1.2 - -# update to 14.04 +# This is a dockerfile to test the build on ubuntu 14.04 from ubuntu:14.04 run apt-get update -qq run apt-get install -y software-properties-common python-software-properties @@ -16,5 +7,7 @@ run apt-get update run apt-get install -y libcv-dev libcvaux-dev libhighgui-dev libopencv-dev run curl -sL https://deb.nodesource.com/setup | bash - run apt-get install -y nodejs -# ensure npm installs at v3.2.0 vice tip -run npm install opencv || cat npm-debug.log +WORKDIR /root/node-opencv +add . /root/node-opencv +run npm install --unsafe-perm --build-from-source || cat npm-debug.log +run make test