Skip to content

feat: refactor

feat: refactor #3

Workflow file for this run

name: Windows Build Test
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 'latest'
- name: Install CMake
uses: lukka/get-cmake@latest
- name: Download and Install OpenCV
run: |
$opencvVersion = "4.8.0"
$downloadUrl = "https://github.com/opencv/opencv/releases/download/$opencvVersion/opencv-$opencvVersion-windows.exe"
Invoke-WebRequest -Uri $downloadUrl -OutFile "opencv-windows.exe"
Start-Process -FilePath "opencv-windows.exe" -ArgumentList "-y", "-o", "D:" -Wait
- name: Set Environment Variables
run: |
echo "OPENCV_INCLUDE_DIR=C:\opencv\build\include" | Out-File -FilePath $env:GITHUB_ENV -Append
echo "OPENCV_LIB_DIR=C:\opencv\build\x64\vc16\lib" | Out-File -FilePath $env:GITHUB_ENV -Append
echo "C:\opencv\build\x64\vc16\bin" | Out-File -FilePath $env:GITHUB_PATH -Append
- name: Install dependencies and build
run: npm install
- name: Test
run: npm test --if-present