Closed jlipps closed 2 years ago
CI will fail until https://github.com/appium/appium/pull/16137 is merged and published
perhaps I should do the thing I did to appium
on this monorepo, to avoid the lockfile apocalypse
OK @mykola-mokhnach @boneskull made a bunch of updates here, including using vm2 in place of vm. Someone should double check this though. It works but that doesn't mean I did it right.
OK, with the new version of appium and the docs added, the CI is green. we good to go here?
well, CI is now broken because of opencv4nodejs. i've attempted to debug the issue. i'm guessing that an NPM update changed node modules layout and a package internal to opencv4nodejs is relying on a certain directory structure. i can't figure out how to see full logs from the workflow (the npm output isn't showing the logging that should be coming from opencv4nodejs's install scripts). that might help. but sadly opencv4nodejs is not maintained so it may be impossible to fix. ugh.
@jlipps Could you please try with the fork of opencv4nodejs mentioned by @UrielCh in https://github.com/justadudewhohacks/opencv4nodejs/pull/762#issuecomment-1006679417 ?
ok, giving it a go
nope, it's actually imported from appium-support. i wonder if we should move it to the images plugin? anyway, https://github.com/appium/appium/pull/16327/files
ok pulled in appium support changes, let's see what happens.
@mykola-mokhnach looks like this package doesn't work. It also doesn't install on my machine even with the m1-specific flags enabled. https://github.com/appium/appium-plugins/runs/4782669773?check_suite_focus=true
Thanks for trying it @jlipps Perhaps we could report the issue log at https://github.com/appium/appium-plugins/runs/4782669773?check_suite_focus=true#step:9:3393 to the forked repository issue tracker and ask its author about how we could resolve it. Let see how responsive they are.
The forked repo doesn't appear to have the issue tracker enabled. @UrielCh are you at all open to helping us troubleshoot this opencv4nodejs installation in GitHub Actions CI? (I get the same error on my local machine). Have tried with opencv version set to latest 3.x as well as latest 4.x.
I assume that compilation error happens because of https://answers.opencv.org/question/212650/opencv-sift-surf/
Running with OPENCV4NODEJS_AUTOBUILD_OPENCV_VERSION=4.5.5 OPENCV_BUILD_ROOT=~/opencv npx build-opencv --flag="-DCMAKE_SYSTEM_PROCESSOR=arm64 -DCMAKE_OSX_ARCHITECTURES=arm64 -DCMAKE_OPENCV_ENABLE_NONFREE=ON" build
gives the same error. What do you run on your machine to get things to build?
ofc, will try it on the weekend
@jlipps I have managed it to work on my Intel mac. The steps I've done:
tsc
is installed (npm i -g typescript)mkdir /Users/user/opencv
OPENCV_BUILD_ROOT=/Users/user/opencv node node_modules/@u4/opencv-build/bin/main.js --version 4.5.4 install
(The build of 4.5.5 has failed on my machine due to some zlib dependency). I assume for arm-based macs some additional command line parameters should be provided. See https://github.com/UrielCh/opencv4nodejs/blob/fad9f016380d8207dc9b86ee523cfe95cbad9ba5/package.json#L39OPENCV_BUILD_ROOT=~/opencv OPENCV4NODEJS_DISABLE_AUTOBUILD=1 OPENCV_INCLUDE_DIR=/Users/user/opencv/opencv-4.5.4/build/include OPENCV_LIB_DIR=/Users/user/opencv/opencv-4.5.4/build/lib OPENCV_BIN_DIR=/Users/user/opencv/opencv-4.5.4/build/bin npm run do-install build
@u4/opencv4nodejs
library to appium-support. I've just created a simple symlink in my test: ln -s ~/code/opencv4nodejs ~/code/appium-support/node_modules/@u4
OPENCV_BUILD_ROOT=/Users/user/opencv OPENCV_INCLUDE_DIR=/Users/user/opencv/opencv-4.5.4/build/include OPENCV_LIB_DIR=/Users/user/opencv/opencv-4.5.4/build/lib OPENCV_BIN_DIR=/Users/user/opencv/opencv-4.5.4/build/bin _FORCE_LOGS=1 gulp e2e-test
Btw many thanks to @KeitelDOG for the detailed description of the building process. It helped me a lot.
OK, this PR now includes a change where the images plugin depends on @appium/opencv
and no longer requires opencv4nodejs to be installed in CI. let's see how it goes.
yay, build passed! we can finally get the execute driver plugin merged, and publish an images plugin with no dependency on opencv4nodejs!!!