From 52da870c3f2c469a2d6a67e06332b989e10e1489 Mon Sep 17 00:00:00 2001 From: Peter Braden Date: Tue, 22 Sep 2015 18:41:09 +0200 Subject: [PATCH 1/2] Revert "Revert "try docker and travis"" This reverts commit ae84a6891bebda4d602bbe00766b690b7a610897. --- .travis.yml | 6 ++++++ Dockerfile | 1 + 2 files changed, 7 insertions(+) diff --git a/.travis.yml b/.travis.yml index 70004d8..a1d67bc 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: @@ -43,6 +47,8 @@ before_install: # or if we put [publish binary] in the commit message - if test "${COMMIT_MESSAGE#*'[publish binary]'}" != "$COMMIT_MESSAGE"; then PUBLISH_BINARY=true; fi; - platform=$(uname -s | sed "y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/") + - docker build -t peterbraden/node-opencv . + - docker run peterbraden/node-opencv /bin/sh -c "cd /root/node-opencv; make test" install: # ensure source install works diff --git a/Dockerfile b/Dockerfile index 2af10e5..dd98f18 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,3 +16,4 @@ 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 +run add . /root/node-opencv From f172d5ceaa44fd516fbef29a6e407db08e4a2d83 Mon Sep 17 00:00:00 2001 From: Peter Braden Date: Tue, 22 Sep 2015 19:08:26 +0200 Subject: [PATCH 2/2] Correct travis / docker build --- .travis.yml | 3 +-- Dockerfile | 6 ++++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index a1d67bc..ecdcd6d 100755 --- a/.travis.yml +++ b/.travis.yml @@ -47,8 +47,6 @@ before_install: # or if we put [publish binary] in the commit message - if test "${COMMIT_MESSAGE#*'[publish binary]'}" != "$COMMIT_MESSAGE"; then PUBLISH_BINARY=true; fi; - platform=$(uname -s | sed "y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/") - - docker build -t peterbraden/node-opencv . - - docker run peterbraden/node-opencv /bin/sh -c "cd /root/node-opencv; make test" install: # ensure source install works @@ -56,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 dd98f18..5361267 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,5 +15,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 -run add . /root/node-opencv +WORKDIR /root/node-opencv +add . /root/node-opencv +run npm install --unsafe-perm --build-from-source || cat npm-debug.log +run make test