Skip to content
This repository was archived by the owner on Oct 18, 2023. It is now read-only.

Commit 7a15a84

Browse files
committed
Merge branch 'master' of github.com:nut-tree/opencv4nodejs
2 parents 5a04a3b + 9cb0a74 commit 7a15a84

File tree

5 files changed

+295
-223
lines changed

5 files changed

+295
-223
lines changed

.travis.yml

Lines changed: 50 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -2,105 +2,95 @@ language: node_js
22

33
sudo: required
44

5+
os:
6+
- linux
7+
- osx
8+
node_js:
9+
- 8
10+
- 9
11+
- 10
12+
- 11
13+
- 12
14+
- 13
15+
- 14
16+
env:
17+
- BUILD_TASK=test
18+
- BUILD_TASK=prebuild
19+
520
matrix:
621
include:
722
- os: linux
8-
node_js: 8
9-
env:
10-
- BUILD_TASK=test
11-
- os: linux
12-
node_js: 8
13-
env:
14-
- BUILD_TASK=prebuild
15-
- os: linux
16-
node_js: 10
17-
env:
18-
- BUILD_TASK=test
19-
- os: linux
20-
node_js: 10
23+
node_js: 12
2124
env:
25+
- TARGET=4.0.0
2226
- BUILD_TASK=prebuild
27+
- RUNTIME=electron
2328
- os: linux
24-
node_js: 11
25-
env:
26-
- BUILD_TASK=test
27-
- os: linux
28-
node_js: 11
29+
node_js: 12
2930
env:
31+
- TARGET=4.0.4
3032
- BUILD_TASK=prebuild
33+
- RUNTIME=electron
3134
- os: linux
3235
node_js: 12
3336
env:
34-
- BUILD_TASK=test
37+
- TARGET=5.0.0
38+
- BUILD_TASK=prebuild
39+
- RUNTIME=electron
3540
- os: linux
3641
node_js: 12
3742
env:
43+
- TARGET=6.0.0
3844
- BUILD_TASK=prebuild
45+
- RUNTIME=electron
3946
- os: linux
40-
node_js: 13
41-
env:
42-
- BUILD_TASK=test
43-
- os: linux
44-
node_js: 13
47+
node_js: 12
4548
env:
49+
- TARGET=7.0.0
4650
- BUILD_TASK=prebuild
51+
- RUNTIME=electron
4752
- os: linux
48-
node_js: 14
49-
env:
50-
- BUILD_TASK=test
51-
- os: linux
52-
node_js: 14
53-
env:
54-
- BUILD_TASK=prebuild
55-
56-
- os: osx
57-
node_js: 8
58-
env:
59-
- BUILD_TASK=test
60-
- os: osx
61-
node_js: 8
53+
node_js: 12
6254
env:
55+
- TARGET=8.0.0
6356
- BUILD_TASK=prebuild
57+
- RUNTIME=electron
6458
- os: osx
65-
node_js: 10
66-
env:
67-
- BUILD_TASK=test
68-
- os: osx
69-
node_js: 10
59+
node_js: 12
7060
env:
61+
- TARGET=4.0.0
7162
- BUILD_TASK=prebuild
63+
- RUNTIME=electron
7264
- os: osx
73-
node_js: 11
74-
env:
75-
- BUILD_TASK=test
76-
- os: osx
77-
node_js: 11
65+
node_js: 12
7866
env:
67+
- TARGET=4.0.4
7968
- BUILD_TASK=prebuild
69+
- RUNTIME=electron
8070
- os: osx
8171
node_js: 12
8272
env:
83-
- BUILD_TASK=test
73+
- TARGET=5.0.0
74+
- BUILD_TASK=prebuild
75+
- RUNTIME=electron
8476
- os: osx
8577
node_js: 12
8678
env:
79+
- TARGET=6.0.0
8780
- BUILD_TASK=prebuild
81+
- RUNTIME=electron
8882
- os: osx
89-
node_js: 13
90-
env:
91-
- BUILD_TASK=test
92-
- os: osx
93-
node_js: 13
83+
node_js: 12
9484
env:
85+
- TARGET=7.0.0
9586
- BUILD_TASK=prebuild
87+
- RUNTIME=electron
9688
- os: osx
97-
node_js: 14
98-
env:
99-
- BUILD_TASK=test
100-
- os: osx
101-
node_js: 14
89+
node_js: 12
10290
env:
91+
- TARGET=8.0.0
10392
- BUILD_TASK=prebuild
93+
- RUNTIME=electron
10494

10595
before_install:
10696
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
@@ -115,11 +105,5 @@ script:
115105
fi
116106
- if [[ $BUILD_TASK == "prebuild" && $TRAVIS_TAG != "" ]]; then
117107
cd ./ci/$BUILD_TASK;
118-
npm run $BUILD_TASK $OPENCV_VERSION $TRAVIS_NODE_VERSION;
119-
fi
120-
121-
after_success:
122-
- if [ $BUILD_TASK = 'cover' ]; then
123-
npm install;
124-
npm run codecov -- -t $CODECOV_TOKEN;
108+
npm run $BUILD_TASK $TARGET $RUNTIME;
125109
fi

appveyor.yml

Lines changed: 52 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ init:
1010
- git config --global core.autocrlf true
1111

1212
# cache:
13-
# - c:\tools\opencv
13+
# - c:\tools\opencv
1414

1515
# what combinations to test
1616
environment:
@@ -20,16 +20,57 @@ environment:
2020
matrix:
2121
- nodejs_version: 14
2222
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
23+
TARGET: "14.0.0"
24+
RUNTIME: "node"
2325
- nodejs_version: 13
2426
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
27+
TARGET: "13.0.0"
28+
RUNTIME: "node"
2529
- nodejs_version: 12
2630
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
31+
TARGET: "12.0.0"
32+
RUNTIME: "node"
2733
- nodejs_version: 11
2834
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
35+
TARGET: "11.0.0"
36+
RUNTIME: "node"
2937
- nodejs_version: 10
3038
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
39+
TARGET: "10.0.0"
40+
RUNTIME: "node"
41+
- nodejs_version: 9
42+
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
43+
TARGET: "9.0.0"
44+
RUNTIME: "node"
3145
- nodejs_version: 8
3246
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
47+
TARGET: "8.0.0"
48+
RUNTIME: "node"
49+
50+
- nodejs_version: 12
51+
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
52+
TARGET: "4.0.0"
53+
RUNTIME: "electron"
54+
- nodejs_version: 12
55+
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
56+
TARGET: "4.0.4"
57+
RUNTIME: "electron"
58+
- nodejs_version: 12
59+
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
60+
TARGET: "5.0.0"
61+
RUNTIME: "electron"
62+
- nodejs_version: 12
63+
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
64+
TARGET: "6.0.0"
65+
RUNTIME: "electron"
66+
- nodejs_version: 12
67+
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
68+
TARGET: "7.0.0"
69+
RUNTIME: "electron"
70+
- nodejs_version: 12
71+
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
72+
TARGET: "8.0.0"
73+
RUNTIME: "electron"
3374

3475
install:
3576
# - cmd: choco install OpenCV -y -version %OPENCV_VERSION%
@@ -45,20 +86,20 @@ build: off
4586
test_script:
4687
- node --version
4788
- if "%BUILD_TASK%" == "ENVS" (
48-
cd c:\projects\opencv4nodejs\ci\envs &&
49-
npm install &&
50-
npm test
89+
cd c:\projects\opencv4nodejs\ci\envs &&
90+
npm install &&
91+
npm test
5192
) else (
52-
cd c:\projects\opencv4nodejs &&
53-
npm install &&
54-
cd c:\projects\opencv4nodejs\test &&
55-
npm install &&
56-
npm run test-appveyor &&
57-
npm run test-externalMemTracking
93+
cd c:\projects\opencv4nodejs &&
94+
npm install &&
95+
cd c:\projects\opencv4nodejs\test &&
96+
npm install &&
97+
npm run test-appveyor &&
98+
npm run test-externalMemTracking
5899
)
59100

60101
on_success:
61102
- cmd: cd c:\projects\opencv4nodejs
62103
- IF defined APPVEYOR_REPO_TAG_NAME (
63-
npm run prebuild -- --include-regex "\.(node|a|so|dylib|lib|dll).*$" -u %GITHUB_TOKEN%
104+
npm run prebuild -- -t %TARGET% -r %RUNTIME% --include-regex "\.(node|a|so|dylib|lib|dll).*$" -u %GITHUB_TOKEN%
64105
)

ci/prebuild/prebuild.sh

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,17 @@
1-
#!/bin/sh
1+
#!/bin/bash
2+
3+
TARGET=$1
4+
RUNTIME=$2
5+
6+
TARGET="${TARGET:-$TRAVIS_NODE_VERSION.0.0}"
7+
RUNTIME="${RUNTIME:-node}"
8+
9+
echo "Prebuild target: ${TARGET}"
10+
echo "Prebuild runtime: ${RUNTIME}"
11+
212
cd ../../ &&\
313
npm install --unsafe-perm &&\
414
cd test
515
npm install && npm test
616
cd -
7-
npm run prebuild -- --include-regex "\.(node|a|so|dylib|lib|dll).*$" -u $GITHUB_TOKEN;
17+
npm run prebuild -- -t $TARGET -r $RUNTIME --include-regex "\.(node|a|so|dylib|lib|dll).*$" -u $GITHUB_TOKEN;

0 commit comments

Comments
 (0)