Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add img_hash with phash #834

Closed
wants to merge 367 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
367 commits
Select commit Hold shift + click to select a range
72a0099
add doc
UrielCh Feb 3, 2022
8f9e676
improve code
UrielCh Feb 6, 2022
e64d9e2
feat(config): add --node-gyp-options to set up options for node-gyp o…
zcmgyu Feb 8, 2022
b5f5623
Merge pull request #11 from zcmgyu/feat-cmd-options
UrielCh Feb 21, 2022
27e0b29
prepare v6.1.2
UrielCh Feb 27, 2022
113e737
call build-opencv instead of node bin/install.js
UrielCh Feb 27, 2022
ca6fc2c
update readme
UrielCh Feb 27, 2022
3203dd3
node-gyp patch
UrielCh Feb 27, 2022
44bfe7e
fix 13: fix install script syntax
QingLeiLi Feb 27, 2022
8fb3691
Merge pull request #14 from QingLeiLi/master
UrielCh Feb 28, 2022
b2f3cc7
V 6.1.3
UrielCh Feb 28, 2022
5ba7f51
improve --dry-run
UrielCh Mar 7, 2022
330065b
minor patch
UrielCh Mar 24, 2022
61402e5
fix: 649#issuecomment-591762686 and #649 thanks to @hkozachkov
piercus Apr 11, 2022
43b9e85
Merge branch 'master' of github.com:justadudewhohacks/opencv4nodejs
piercus Apr 12, 2022
ef5a62e
rm install
piercus Apr 12, 2022
b5a94d4
Merge pull request #18 from piercus/master
UrielCh Apr 12, 2022
1d1777f
improve Missing binding message
UrielCh Apr 13, 2022
139c1fd
more typing model and doc
UrielCh Apr 13, 2022
4b76d17
some more typing
UrielCh Apr 13, 2022
fe96ec4
Improve + Fix Mat.drawContours definition.
UrielCh Apr 13, 2022
a6b2b63
update help message
UrielCh Apr 13, 2022
11982d7
fis Cannot compile with ImplicitAny.
UrielCh Apr 13, 2022
651e3c7
fix extrinsic guess
piercus Apr 13, 2022
fafee77
Merge branch 'master' into extrinsicuessSolvePnP
piercus Apr 13, 2022
458f0c6
fix ts related errors
piercus Apr 13, 2022
3d1d84b
Merge pull request #21 from piercus/extrinsicuessSolvePnP
UrielCh Apr 13, 2022
53ce817
appveyor update
UrielCh Apr 16, 2022
1089cc8
clean appveyor
UrielCh Apr 16, 2022
3538ad7
clean
UrielCh Apr 16, 2022
e3c567a
build: off
UrielCh Apr 16, 2022
733c1e4
appveyor
UrielCh Apr 16, 2022
08554a3
appveyor
UrielCh Apr 16, 2022
7506b59
update dep
UrielCh Apr 16, 2022
4c3dd33
install node-gyp
UrielCh Apr 16, 2022
f71387d
appveyor
UrielCh Apr 16, 2022
3cc9af1
fix appveyor
UrielCh Apr 17, 2022
9c564d9
appveyor
UrielCh Apr 17, 2022
a7256a4
appveyor
UrielCh Apr 17, 2022
843178c
fix VideoCapture setAsync
UrielCh Apr 17, 2022
e918419
appveyor
UrielCh Apr 17, 2022
01266fd
appveyor
UrielCh Apr 17, 2022
2279464
drop ci\envs build
UrielCh Apr 17, 2022
01296cb
appveyor
UrielCh Apr 17, 2022
85cfbe1
test new mode auto
UrielCh Apr 17, 2022
a62f6b1
test build
UrielCh Apr 17, 2022
60c21eb
add 2 js files
UrielCh Apr 17, 2022
b385fbe
acommit some more js
UrielCh Apr 17, 2022
bd8c332
update js
UrielCh Apr 17, 2022
263165e
test mutiple versions
UrielCh Apr 18, 2022
a26c90f
appveyor
UrielCh Apr 18, 2022
444ca44
change build versdion list
UrielCh Apr 18, 2022
594c72c
fix WND_PROP_VSYNC
UrielCh Apr 18, 2022
ea51a15
add 3.4.2 consrtraint
UrielCh Apr 18, 2022
7c895aa
fix Dnn::ReadNet
UrielCh Apr 18, 2022
8951458
cv::dnn::DNN_BACKEND_OPENCV
UrielCh Apr 18, 2022
7db6b63
improve dnn builds
UrielCh Apr 18, 2022
75487d0
WND_PROP_TOPMOST
UrielCh Apr 18, 2022
ac34d5f
ReadNet
UrielCh Apr 18, 2022
0077603
fix test
UrielCh Apr 18, 2022
c505ede
speedup appveyor
UrielCh Apr 18, 2022
687aa42
build test
UrielCh Apr 18, 2022
553acfc
V 6.1.4
UrielCh Apr 18, 2022
38ed46c
Matrix constructor from rows, cols, Buffer, step
piercus Apr 19, 2022
a5c3c39
add types in test
UrielCh Apr 20, 2022
f733dcf
UrielCh/opencv4nodejs#23: add unit test
piercus Apr 21, 2022
1b431d6
Merge pull request #23 from piercus/mat-step
UrielCh Apr 22, 2022
c1b5771
lint + fix lint conf
UrielCh Apr 30, 2022
794c5f9
lint code
UrielCh Apr 30, 2022
15119a6
lint all errors
UrielCh Apr 30, 2022
715cc72
add templating test
UrielCh May 8, 2022
14de1b2
fix multiMat match
UrielCh May 10, 2022
0981c93
try fix appveyor
UrielCh May 10, 2022
819f1ed
Merge pull request #31 from UrielCh/template
UrielCh May 10, 2022
44b0b19
update deps
UrielCh May 10, 2022
681c4e3
reduce appveyor build matrix
UrielCh May 10, 2022
2ec0926
prepare version 6.1.5
UrielCh May 10, 2022
3479c25
clean imports
UrielCh May 10, 2022
dde447c
clean imports
UrielCh May 10, 2022
bc1bdaf
unify getResourcePath
UrielCh May 11, 2022
3bf6749
new keypress detector in examples
UrielCh May 11, 2022
ca8564e
fix samples
UrielCh May 11, 2022
ca07b59
fix samples
UrielCh May 11, 2022
4429581
add cv.getScoreMax
UrielCh May 11, 2022
887a0e8
add cv.dropOverlappingZone()
UrielCh May 11, 2022
08df121
update gitignore
UrielCh May 11, 2022
e20fc8f
improve example
UrielCh May 12, 2022
57ef9ec
add NetIdentifier (beta)
UrielCh May 12, 2022
11bf2c6
add Net.dump()
UrielCh May 12, 2022
74a9c1a
adding YOLOv3-Training-Snowman-Detector samples
UrielCh May 12, 2022
6ae8e77
add YOLOv3-Training-Snowman-Detector file
UrielCh May 12, 2022
6114d3a
lint + add doc + fix typing
UrielCh May 15, 2022
22d9a24
use @u4/opencv-build 0.5.0
UrielCh May 15, 2022
a46519d
eslint
UrielCh May 16, 2022
7c585e2
lint 2
UrielCh May 16, 2022
10570c4
lint + typing
UrielCh May 16, 2022
57a3690
roll back lint changes
UrielCh May 16, 2022
81df16e
refactor tests
UrielCh May 16, 2022
723747f
refactor asyncFaceDetection.ts
UrielCh May 16, 2022
be727d6
fix error in samples
UrielCh May 17, 2022
f36073a
update YOLOv3-Training-Snowman-Detecto
UrielCh May 21, 2022
54503ba
add doc
UrielCh May 21, 2022
70c3e61
fix warn in CC file
UrielCh May 21, 2022
83e8502
ssues/33
UrielCh May 23, 2022
4b1fe85
V 6.1.6
UrielCh May 23, 2022
c16ce5d
fix build using precompiled opencv.
UrielCh May 30, 2022
0ca365f
update /YOLOv3-Training-Snowman-Detector
UrielCh May 30, 2022
8e0d12a
update YOLOv3 Object Detector - Snowman
UrielCh May 30, 2022
15e301d
complet yolo conversion
UrielCh May 30, 2022
fd253fa
small c=hanges
UrielCh May 30, 2022
5917f19
patch Debug/Release selector
UrielCh May 31, 2022
6af966e
add comment in macro header.
UrielCh May 31, 2022
8b23ace
add comment in yolo samples
UrielCh May 31, 2022
c00e917
move macro single used MACRO out of common header.
UrielCh May 31, 2022
8513060
update doc
UrielCh Jun 1, 2022
85d81dd
start 3D / 4D support
UrielCh Jun 1, 2022
9ab447e
fix 3D
UrielCh Jun 2, 2022
24f4d7c
fix 4D macro
UrielCh Jun 2, 2022
320e9ba
complet 4D basic support + prepar 5D
UrielCh Jun 2, 2022
4593f95
add Mat(sizes: number[], type: number);
UrielCh Jun 2, 2022
8e79907
update changelog
UrielCh Jun 2, 2022
3ffc94e
add #D / 4D tests
UrielCh Jun 2, 2022
70a67b6
Add cv.resizeWindow() api
wayneparrott Jun 15, 2022
0a9f1bb
Removed commented C prototype function of resizeWindow()
wayneparrott Jun 16, 2022
e874910
Merge pull request #37 from wayneparrott/resizeWindow
UrielCh Jun 16, 2022
61907f0
test 4.5 4.4 4.3 .4.2 3.5 3.4 3.3
UrielCh Jun 16, 2022
afcce4a
update appveyor
UrielCh Jun 19, 2022
0934a6d
Merge pull request #38 from UrielCh/3d
UrielCh Jun 19, 2022
63dde56
remove 4.6.0 Version Test
UrielCh Jun 19, 2022
a6503ce
Create msbuild.yml
UrielCh Jun 19, 2022
aaffc75
drop duplicate step in workflow
UrielCh Jun 19, 2022
cc13661
drop extra step
UrielCh Jun 19, 2022
30d7fda
fix
UrielCh Jun 19, 2022
f5fb8f2
fix windows build path
UrielCh Jun 19, 2022
07b25a5
clean working-directory
UrielCh Jun 19, 2022
2bbf777
add an extra opencv-build-npm
UrielCh Jun 19, 2022
aaeb300
add missing OPENCV4NODEJS_DISABLE_AUTOBUILD env
UrielCh Jun 19, 2022
c654a0e
add strategy matrix
UrielCh Jun 19, 2022
5f49693
add full-build.yml workflow
UrielCh Jun 19, 2022
30b0aca
fix workflows
UrielCh Jun 19, 2022
4c10433
define OPENCV_BUILD_ROOT in workflow
UrielCh Jun 19, 2022
66b63e6
add 4.2.0 in to test versions
UrielCh Jun 19, 2022
99888f2
fill npm-publish
UrielCh Jun 19, 2022
77f2140
update workglow
UrielCh Jun 19, 2022
c63ff87
use npm
UrielCh Jun 19, 2022
ee53647
no cache workflow
UrielCh Jun 19, 2022
8a255c7
fry fix workfllow
UrielCh Jun 19, 2022
c9acbb2
back to pnpm
UrielCh Jun 19, 2022
b56460c
add missing prepack
UrielCh Jun 19, 2022
eeb235b
xfeatures2d is now not mandatory in test
UrielCh Jun 19, 2022
c192141
fix npm-publish.yml
UrielCh Jun 19, 2022
7760bf9
update work flow
UrielCh Jun 19, 2022
2d33bc6
add missing frozen-lockfile
UrielCh Jun 19, 2022
b3863be
add missing --frozen-lockfile
UrielCh Jun 19, 2022
a559f93
update all deps
UrielCh Jun 19, 2022
6c610f8
fix npm-publish.yml
UrielCh Jun 20, 2022
3ceed49
Fix typo in appveyor.yml
UrielCh Jun 21, 2022
43c3bfc
Add startWindowThread() api
wayneparrott Jun 29, 2022
c3a6213
fix error parsing in cvloader
UrielCh Jul 1, 2022
8eddad6
Merge pull request #39 from wayneparrott/startWindowThread
UrielCh Jul 1, 2022
febe33d
prepare release
UrielCh Jul 1, 2022
edff250
Update README.md
UrielCh Aug 7, 2022
47f92e3
Update README.md
UrielCh Aug 7, 2022
036efca
improve error messages
UrielCh Aug 7, 2022
6db7871
Merge branch 'master' of github.com:UrielCh/opencv4nodejs
UrielCh Aug 7, 2022
4575adf
prepare V6.2.2
UrielCh Aug 30, 2022
b01fc8f
update error msg
UrielCh Aug 30, 2022
25f8738
v6.2.3
UrielCh Aug 30, 2022
fe38a24
v6.2.4
UrielCh Aug 30, 2022
32e0a87
ttest build V 4.5.*
UrielCh Sep 3, 2022
fcce330
reduce appveyor build count
UrielCh Sep 4, 2022
ad4809e
add action build ubuntu + apt
UrielCh Sep 4, 2022
d982256
Update build-apt.yml
UrielCh Sep 4, 2022
55ecc61
Update build-apt.yml
UrielCh Sep 4, 2022
5e5093d
Update build-apt.yml
UrielCh Sep 4, 2022
44b66ce
Update build-apt.yml
UrielCh Sep 4, 2022
c171321
Update build-apt.yml
UrielCh Sep 4, 2022
ec3212e
Update build-apt.yml
UrielCh Sep 4, 2022
c428181
Update build-apt.yml
UrielCh Sep 4, 2022
2d3c9a2
update main doc
UrielCh Sep 4, 2022
ab213e3
replace relative inmport in test
UrielCh Sep 4, 2022
2ac4266
add docker files
UrielCh Sep 4, 2022
b523eb3
update pnpm losk
UrielCh Sep 4, 2022
a31bb18
docker update
UrielCh Sep 4, 2022
4b45197
se alpine
UrielCh Sep 4, 2022
e0324c2
add dockerhub workflow
UrielCh Sep 4, 2022
8afed9d
update rename workflow
UrielCh Sep 4, 2022
60601ba
change workflow branch
UrielCh Sep 4, 2022
e69c000
split debian and alpine Docker
UrielCh Sep 5, 2022
c122dc3
lint
UrielCh Sep 5, 2022
2c10abd
use global setup
UrielCh Sep 5, 2022
857c8c4
prepar docker debian
UrielCh Sep 5, 2022
1e65096
new docker files
UrielCh Sep 5, 2022
abdd9a4
clean package.json
UrielCh Sep 8, 2022
5959257
patch alpine build
UrielCh Sep 8, 2022
4df981e
test docker manifest
UrielCh Sep 8, 2022
73a992c
doker manifest
UrielCh Sep 8, 2022
45d7271
dump all deps, drop glob
UrielCh Oct 12, 2022
dfe80f4
prepare 6.2.5
UrielCh Oct 19, 2022
013ff65
fix workflow
UrielCh Oct 19, 2022
e38d0df
add matrix. in workflows
UrielCh Oct 19, 2022
ae66ac5
commit compileLib.js
UrielCh Oct 19, 2022
d3f0838
add path autodetection
UrielCh Oct 19, 2022
42dc383
AUTOBUILD VERSION=4.6.0 verbose autodetect
UrielCh Oct 19, 2022
9293241
push missing js
UrielCh Oct 19, 2022
4882c4f
fix %s %d
UrielCh Oct 19, 2022
dfcaea0
commit missing js
UrielCh Oct 19, 2022
5ba7299
drop tiny-glob usage
UrielCh Oct 19, 2022
90fe2d7
missing space in readme
UrielCh Oct 19, 2022
81eb2fe
update microsoft/setup-msbuild version
UrielCh Nov 5, 2022
73e5e99
prepare next docker deployment
UrielCh Nov 5, 2022
e246757
patch docker build script
UrielCh Nov 5, 2022
32a71ca
fix typo in build script
UrielCh Nov 5, 2022
ed3d07c
use replace echo by prinf in docker-manifest.sh
UrielCh Nov 6, 2022
aefd72c
improve docker build
UrielCh Nov 6, 2022
cefd76e
add varant loop
UrielCh Nov 6, 2022
bdbf278
improve build script
UrielCh Nov 7, 2022
df9f5c2
improve Docker script
UrielCh Nov 7, 2022
8b00a9f
try new docker-manifest
UrielCh Nov 10, 2022
607b30d
add Dockerfile.examples
UrielCh Nov 10, 2022
84be0e7
add HEADLESS for test docker
UrielCh Nov 11, 2022
c4a09ef
complet Docker sample
UrielCh Nov 11, 2022
8f1e9e7
update doc
UrielCh Nov 11, 2022
66d7d42
Update Dockerfile.debian.examples
UrielCh Nov 11, 2022
bad744c
merge docker manifest.sh
UrielCh Nov 29, 2022
eba8a48
Change version from 4.1.0 to 4.6.0 in Readme
UrielCh Dec 3, 2022
cfbdb16
prepare 6.3.0
UrielCh Dec 29, 2022
c89f47a
Fix typos in README.md
Zxun2 Dec 29, 2022
804a8cf
Merge pull request #61 from Zxun2/patch-1
UrielCh Dec 29, 2022
4c9b7dc
improve build script
UrielCh Dec 30, 2022
c94611c
add types
UrielCh Dec 30, 2022
053f458
add async samples
UrielCh Dec 30, 2022
6111334
try fix build pipeline
UrielCh Dec 30, 2022
01d79c0
add debug
UrielCh Dec 30, 2022
7cb27f3
change getOpenCV export
UrielCh Dec 30, 2022
0068d4e
on more test
UrielCh Dec 30, 2022
6672f4d
one more test
UrielCh Dec 30, 2022
7d4d4a5
try again
UrielCh Dec 30, 2022
262629e
add new needed files
UrielCh Dec 30, 2022
f790379
ts cleanong
UrielCh Dec 30, 2022
5626955
parcial ESM rollback
UrielCh Dec 30, 2022
35b9d3d
test 4.7.0
UrielCh Dec 30, 2022
589f9c0
cleanup + update github action
UrielCh Dec 30, 2022
2461f7f
improve tests
UrielCh Dec 30, 2022
718e9b2
add any back
UrielCh Dec 30, 2022
8106883
more tyope in test
UrielCh Dec 30, 2022
45e1d3f
fix GPU face detection
UrielCh Jan 1, 2023
d65ad93
should be relasable.
UrielCh Jan 1, 2023
cc6e88a
Merge remote-tracking branch 'upstream/master'
Jan 5, 2023
b3470e7
Clean up code for new forked repository
ht-jo Jan 6, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
15 changes: 0 additions & 15 deletions .dockerignore

This file was deleted.

26 changes: 26 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"ignorePatterns": [ "**/*.js" ],
"root": true,
"parser": "@typescript-eslint/parser",
"plugins": [
"@typescript-eslint"
],
"extends": ["eslint:recommended", "plugin:@typescript-eslint/eslint-recommended", "plugin:@typescript-eslint/recommended"],
"rules": {
"linebreak-style": 0,
"comma-dangle": ["error", "always-multiline"],
"no-plusplus": "off",
"func-names": 0,
"import/no-unresolved": 0,
"import/extensions": 0,
"import/no-extraneous-dependencies": 0,
"no-underscore-dangle": 0,
"no-nested-ternary": 0,
"no-async-promise-executor": 0,
"radix": 0
},
"env": {
"es6": true,
"node": true
}
}
40 changes: 40 additions & 0 deletions .github/workflows/Disabled/dockerhub.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Publish image to DockerHub

on:
push:
branches: [ "master" ]
paths:
- "cc/**"
- "install/**"
- "lib/**"
- "typings/**"
- "package.json"
- ".github/workflows/dockerhub.yml"

jobs:
buildx:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
-
name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
-
name: Available platforms
run: echo ${{ steps.buildx.outputs.platforms }}
-
name: Build the Docker image
run: docker buildx build -f Dockerfile-debian --platform linux/amd64,linux/arm64 -t urielch/opencv-nodejs:latest -t urielch/opencv-nodejs:$(date +%Y-%m-%d_%H%M%S) --push .

45 changes: 45 additions & 0 deletions .github/workflows/build-apt.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Node.js CI using prebuilt openCV

on:
push:
branches: [ "master" ]
paths:
- "cc/**"
- "install/**"
- "lib/**"
- "test/**"
- "typings/**"
- "package.json"
- ".github/workflows/build-apt.yml"

jobs:
build:

runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- name: Install opencv pkg
run: sudo apt-get install -y build-essential libopencv-contrib-dev libopencv-dev
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 7.3.0
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
- run: pnpm install --frozen-lockfile
env:
OPENCV4NODEJS_DISABLE_AUTOBUILD: 1
- run: pnpm run prepack
# - run: npm run build --if-present
# - run: npx build-opencv rebuild
# - run: npm test
56 changes: 56 additions & 0 deletions .github/workflows/full-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Build all from source

on:
# push:
# branches: [ "master" ]
# pull_request:
# branches: [ "master" ]
workflow_dispatch:
# Inputs the workflow accepts.
inputs:
name:
description: 'build all from source'
default: '4.7.0'
required: true

env:
SOLUTION_FILE_PATH: .
BUILD_CONFIGURATION: Release
OPENCV_BUILD_ROOT: D:/opencv

permissions:
contents: read

jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 7.3.0
- uses: actions/setup-node@v3
with:
node-version: 18
cache: 'pnpm'

- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@v1.1.3

- name: run pnpm install
run: pnpm install --frozen-lockfile

- name: pnpm run prepack
run: pnpm run prepack

- name: install deps in test
working-directory: ./test
run: pnpm install --frozen-lockfile

- name: build OpenCV
working-directory: ./test
run: pnpm build-opencv --version ${{ github.event.inputs.name }} rebuild

- name: run test-appveyor test
working-directory: ./test
run: pnpm run test-appveyor
38 changes: 38 additions & 0 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages

name: publish on npmjs

on:
release:
types: [created]
workflow_dispatch:

env:
OPENCV_INCLUDE_DIR: /usr/include/opencv4/
OPENCV_LIB_DIR: /usr/lib/x86_64-linux-gnu/
OPENCV_BIN_DIR: /usr/bin/
OPENCV4NODEJS_DISABLE_AUTOBUILD: 1

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Install libopencv
run: sudo apt-get install -y libopencv-dev libopencv-features2d-dev
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 7.3.0
- uses: actions/setup-node@v3
with:
node-version: 16
registry-url: https://registry.npmjs.org/
cache: 'pnpm'
- run: pnpm install --frozen-lockfile
- run: pnpm run prepack
- run: cd test && pnpm install --frozen-lockfile
- run: cd test && pnpm run test
- run: pnpm publish --no-git-checks
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
93 changes: 93 additions & 0 deletions .github/workflows/prebuild.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
name: Build using prebuild openCV

on:
push:
branches: [ "master" ]
paths:
- "cc/**"
- "install/**"
- "lib/**"
- "test/**"
- "typings/**"
- "package.json"
- ".github/workflows/prebuild.yml"
pull_request:
branches: [ "master" ]
paths:
- "cc/**"
- "install/**"
- "lib/**"
- "test/**"
- "typings/**"
- "package.json"
- ".github/workflows/prebuild.yml"

env:
# Path to the solution file relative to the root of the project.
SOLUTION_FILE_PATH: .
# define common env value no more needed since V 6.2.2
# OPENCV_INCLUDE_DIR: c:\tools\opencv\build\include
# OPENCV_LIB_DIR: c:\tools\opencv\build\x64\vc14\lib
# OPENCV_BIN_DIR: c:\tools\opencv\build\x64\vc14\bin
OPENCV4NODEJS_DISABLE_AUTOBUILD: 1
# Configuration type to build.
# You can convert this to a build matrix if you need coverage of multiple configuration types.
# https://docs.github.com/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
BUILD_CONFIGURATION: Release

permissions:
contents: read

jobs:
build:
runs-on: windows-latest
strategy:
matrix:
opencv_version:
# - 4.7.0 not available yet
- 4.6.0
# - 4.5.5 # 2019-12-23 ubuntu 22.04
# - 4.2.0 # 2019-12-23 ubuntu 20.04
# - 3.4.16
node_version:
# - 16
- 18
architecture:
- x64
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 7.3.0
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node_version }}
architecture: ${{ matrix.architecture }}
cache: 'pnpm'

- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@v1.0.2

- name: Install OpenCV
run: |
choco install OpenCV -y --version ${{ matrix.opencv_version }}

- name: add path to PATH environment variable
uses: myci-actions/export-env-var-powershell@1
with:
name: PATH
value: $env:PATH;$env:OPENCV_BIN_DIR

- name: run pnpm install
run: pnpm install --frozen-lockfile

- name: pnpm run prepack
run: pnpm run prepack

- name: install deps in test
working-directory: ./test
run: pnpm install --frozen-lockfile

- name: run test-appveyor test
working-directory: ./test
run: pnpm run test-appveyor
43 changes: 42 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ vs
.vs
.vscode
build
bin
node_modules
crash.log
coverage
Expand All @@ -13,3 +12,45 @@ data/dnn
dist
.DS_Store
native-node-utils
*/**.js.map
examples/typed/*.js
examples/typed/faceDetect/*.js
examples/typed/dnn/*.js
examples/*.js.map
examples/*.js
data/ocr/lcletters.xml
data/ocr/confusionmatrix.csv
examples/faceDetect/*.js
examples/dnn/*.js
examples/**/*.d.ts
install/*.d.ts
lib/**/*.d.ts
data/text-models/frozen_east_text_detection.pb
data/face/lbfmodel.yaml
bin/win32-x64-82/opencv4nodejs.node
test/**/*.js
examples/**/*.js
examples/src/ObjectDetection-YOLO/bird_yolo_out.jpg
examples/src/yolov3.weights
examples/src/ObjectDetection-YOLO/yolo_out_py.avi
examples/src/AgeGender/age-gender-out-sample1.jpg
examples/src/AgeGender/gender_net.caffemodel
examples/src/AgeGender/opencv_face_detector_uint8.pb
examples/src/AgeGender/age_net.caffemodel
.pnpm-debug.log
examples/data/dnn/yolo-object-detection/
lib/src/*.map
lib/src/*.js
examples/src/JPEGImages/
examples/labels/
examples/*.txt
examples/src/YOLOv3-Training-Snowman-Detector/JPEGImages/
examples/src/YOLOv3-Training-Snowman-Detector/labels/
examples/src/YOLOv3-Training-Snowman-Detector/*.txt
examples/src/YOLOv3-Training-Snowman-Detector/*.csv
examples/src/YOLOv3-Training-Snowman-Detector/darknet.data
examples/src/YOLOv3-Training-Snowman-Detector/classes.names
examples/src/YOLOv3-Training-Snowman-Detector/train.log
examples/src/YOLOv3-Training-Snowman-Detector/darknet53.conv.74
examples/src/YOLOv3-Training-Snowman-Detector/weights
docs/
Loading