Conflicts:
	Dockerfile
This commit is contained in:
TJ Borromeo 2015-09-22 20:59:05 -07:00
commit e35522fdab
10 changed files with 58 additions and 11 deletions

View File

@ -12,7 +12,7 @@ charset = utf-8
# Tab indentation (no size specified)
[Makefile]
indent_style = space
indent_style = tab
indent_size = 2
# Indentation override for all JS under lib directory

View File

@ -1,10 +1,20 @@
language: node_js
os:
- linux
# - osx
matrix:
allow_failures:
- os: osx
node_js:
- '0.10'
- '0.11'
- '0.12'
- "iojs-v1.0.4"
# - "iojs-v1.0.4"
sudo: required
services:
- docker
compiler: clang
@ -44,6 +54,8 @@ install:
# test our module
- npm test
- node lib/opencv.js
- docker build -t peterbraden/node-opencv-ubuntu-12-04 -f test/Dockerfile-ubuntu-12-04 .
- docker build -t peterbraden/node-opencv-ubuntu-14-04 -f test/Dockerfile-ubuntu-14-04 .
before_script:
- echo "Publishing native platform Binary Package? ->" $PUBLISH_BINARY

View File

@ -5,9 +5,9 @@
# 3) Test: docker run $USER/node-opencv node -e "console.log(require('opencv').version)"
#
# VERSION 0.2
# DOCKER-VERSION 1.8.2
# DOCKER-VERSION 8.1.2
# update to 14.04, but lock versions at 12.04 for now
# update to 14.04
from ubuntu:14.04
run apt-get update -qq
run apt-get install -y software-properties-common python-software-properties

View File

@ -1,14 +1,14 @@
VERSION := $(shell node -e "console.log(require('./package.json').version)")
.PHONY: default release smoke
test:
npm test
.PHONY: test
smoke:
npm install --build-from-source
node smoke/smoketest.js
npm test
.PHONY: smoke
release:
@ -32,3 +32,10 @@ release:
@echo "Publishing to NPM"
@npm publish
.PHONY: release
travis-build:
docker build -t peterbraden/node-opencv-ubuntu-12-04 -f test/Dockerfile-ubuntu-12-04 .
docker build -t peterbraden/node-opencv-ubuntu-14-04 -f test/Dockerfile-ubuntu-14-04 .
.PHONY: travis-build

View File

@ -148,7 +148,7 @@ detection. This can be used for face detection etc.
mat.detectObject(haar_cascade_xml, opts, function(err, matches){})
```
For convenience in face recognition, cv.FACE_CASCADE is a cascade that can be used for frontal face recognition.
For convenience in face detection, cv.FACE_CASCADE is a cascade that can be used for frontal face detection.
Also:

View File

@ -1,3 +1,4 @@
/*
var cv = require('../lib/opencv');
cv.readImage("./files/mona.png", function(err, im) {
@ -18,3 +19,4 @@ function salt(img, n) {
img.set(y, x, 255);
}
}
*/

View File

@ -35,7 +35,7 @@
"url": "https://github.com/peterbraden/node-opencv.git"
},
"engines": {
"node": ">=0.10"
"node": ">=0.12"
},
"binary": {
"module_name": "opencv",

View File

@ -1,7 +1,7 @@
#include "FaceRecognizer.h"
#include "OpenCV.h"
#if ((CV_MAJOR_VERSION >= 2) && (CV_MINOR_VERSION >=4))
#if ((CV_MAJOR_VERSION >= 2) && (CV_MINOR_VERSION >=4) && (CV_SUBMINOR_VERSION>=4))
#include "Matrix.h"
#include <nan.h>

View File

@ -0,0 +1,13 @@
# 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
run add-apt-repository -y ppa:kubuntu-ppa/backports
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
WORKDIR /root/node-opencv
add . /root/node-opencv
run npm install --unsafe-perm --build-from-source || cat npm-debug.log
run make test

View File

@ -0,0 +1,13 @@
# 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
run add-apt-repository -y ppa:kubuntu-ppa/backports
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
WORKDIR /root/node-opencv
add . /root/node-opencv
run npm install --unsafe-perm --build-from-source || cat npm-debug.log
run make test