-
Notifications
You must be signed in to change notification settings - Fork 826
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master'
- Loading branch information
Showing
425 changed files
with
21,838 additions
and
7,785 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 . | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.