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

Open CV (CV2) is not loading with Metacall #33

Closed
wants to merge 23 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 16 additions & 28 deletions .github/workflows/test-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,36 +18,39 @@ jobs:
METACALL_INSTALL_DEBUG: 1
run: |
powershell -NoProfile -ExecutionPolicy unrestricted ./install.ps1

- name: NodeJS Test
shell: cmd
run: |
metacall ./test/script.js | findstr "123456"
IF %ERRORLEVEL% NEQ 0 exit /B 1

- name: Python Test
shell: cmd
run: |
metacall pip install -r test/requirements.txt | findstr "Successfully installed"
IF %ERRORLEVEL% NEQ 0 exit /B 1
metacall ./test/requirements.py | findstr "123456"
IF %ERRORLEVEL% NEQ 0 exit /B 1

metacall pip uninstall numpy --yes
- name: Install Numpy
shell: cmd
run: |
metacall pip install numpy==1.21.6

- name: Test requirements.py
shell: cmd
run: |
metacall ./test/requirements.py

- name: Deploy & FaaS Test
shell: cmd
run: |
metacall deploy --version | findstr /R "^v.*\..*\..*"
IF %ERRORLEVEL% NEQ 0 exit /B 1
metacall faas --version | findstr /R "^v.*\..*\..*"
IF %ERRORLEVEL% NEQ 0 exit /B 1

- name: Uninstall MetaCall
shell: cmd
env:
METACALL_INSTALL_DEBUG: 1
run: |
powershell -NoProfile -ExecutionPolicy unrestricted ./install.ps1 -Uninstall

- name: Uninstall Test
shell: pwsh
run: |
Expand All @@ -63,7 +66,6 @@ jobs:
exit 2
}
Write-Output "Uninstall verification passed."

install-from-path:
name: Install MetaCall via Path Installation
runs-on: windows-latest
Expand All @@ -77,43 +79,37 @@ jobs:
$version = $redirectUri.Segments[$redirectUri.Segments.Count - 1]
$url = "https://github.com/metacall/distributable-windows/releases/download/$version/metacall-tarball-win-x64.zip"
Invoke-WebRequest $url -OutFile metacall-tarball-win-x64.zip

- name: Install MetaCall
shell: cmd
env:
METACALL_INSTALL_DEBUG: 1
run: |
powershell -NoProfile -ExecutionPolicy unrestricted ./install.ps1 -FromPath metacall-tarball-win-x64.zip

- name: NodeJS Test
shell: cmd
run: |
metacall ./test/script.js | findstr "123456"
IF %ERRORLEVEL% NEQ 0 exit /B 1

- name: Python Test
shell: cmd
run: |
metacall pip install -r test/requirements.txt | findstr "Successfully installed"
metacall pip install -r test/requirements.txt
IF %ERRORLEVEL% NEQ 0 exit /B 1
metacall ./test/requirements.py | findstr "123456"
metacall ./test/requirements.py
IF %ERRORLEVEL% NEQ 0 exit /B 1

- name: Deploy & FaaS Test
shell: cmd
run: |
metacall deploy --version | findstr /R "^v.*\..*\..*"
IF %ERRORLEVEL% NEQ 0 exit /B 1
metacall faas --version | findstr /R "^v.*\..*\..*"
IF %ERRORLEVEL% NEQ 0 exit /B 1

- name: Uninstall MetaCall
shell: cmd
env:
METACALL_INSTALL_DEBUG: 1
run: |
powershell -NoProfile -ExecutionPolicy unrestricted ./install.ps1 -Uninstall

- name: Uninstall Test
shell: pwsh
run: |
Expand All @@ -129,7 +125,6 @@ jobs:
exit 2
}
Write-Output "Uninstall verification passed."

install-path-with-whitespaces:
name: Install MetaCall via Path With Whitespaces
runs-on: windows-latest
Expand All @@ -139,48 +134,41 @@ jobs:
shell: cmd
run: |
mkdir "install folder with spaces"

- name: Install MetaCall
shell: cmd
env:
METACALL_INSTALL_DEBUG: 1
run: |
powershell -NoProfile -ExecutionPolicy unrestricted ./install.ps1 -InstallDir '%cd%\install folder with spaces'

- name: Install Test
shell: cmd
run: |
dir "%cd%\install folder with spaces"

- name: NodeJS Test
shell: cmd
run: |
metacall ./test/script.js | findstr "123456"
IF %ERRORLEVEL% NEQ 0 exit /B 1

- name: Python Test
shell: cmd
run: |
metacall pip install -r test/requirements.txt | findstr "Successfully installed"
metacall pip install -r test/requirements.txt
IF %ERRORLEVEL% NEQ 0 exit /B 1
metacall ./test/requirements.py | findstr "123456"
metacall ./test/requirements.py
IF %ERRORLEVEL% NEQ 0 exit /B 1

- name: Deploy & FaaS Test
shell: cmd
run: |
metacall deploy --version | findstr /R "^v.*\..*\..*"
IF %ERRORLEVEL% NEQ 0 exit /B 1
metacall faas --version | findstr /R "^v.*\..*\..*"
IF %ERRORLEVEL% NEQ 0 exit /B 1

- name: Uninstall MetaCall
shell: cmd
env:
METACALL_INSTALL_DEBUG: 1
run: |
powershell -NoProfile -ExecutionPolicy unrestricted ./install.ps1 -Uninstall -InstallDir '%cd%\install folder with spaces'

- name: Uninstall Test
shell: pwsh
run: |
Expand All @@ -195,4 +183,4 @@ jobs:
Write-Error "MetaCall binary is still available"
exit 2
}
Write-Output "Uninstall verification passed."
Write-Output "Uninstall verification passed."
2 changes: 2 additions & 0 deletions test/requirements.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
import certifi
import cv2
print("OpenCV-Version ",cv2.__version__)
print('123456')
1 change: 1 addition & 0 deletions test/requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
certifi==2024.7.4
opencv-contrib-python==3.4.11.45
Loading