-
Notifications
You must be signed in to change notification settings - Fork 870
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: add macOS build for GH actions CI
Signed-off-by: deadprogram <[email protected]>
- Loading branch information
1 parent
4f4c5ca
commit d26e4e3
Showing
1 changed file
with
44 additions
and
0 deletions.
There are no files selected for viewing
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,44 @@ | ||
name: macOS | ||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- dev | ||
- release | ||
|
||
jobs: | ||
build: | ||
runs-on: macos-14 | ||
steps: | ||
- name: Install Dependencies | ||
shell: bash | ||
run: | | ||
HOMEBREW_NO_AUTO_UPDATE=1 brew install opencv | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Install Caffe test model | ||
run: | | ||
mkdir -p ${GITHUB_WORKSPACE}/testdata | ||
curl -sL https://raw.githubusercontent.com/opencv/opencv_extra/master/testdata/dnn/bvlc_googlenet.prototxt > ${GITHUB_WORKSPACE}/testdata/bvlc_googlenet.prototxt | ||
curl -sL http://dl.caffe.berkeleyvision.org/bvlc_googlenet.caffemodel > ${GITHUB_WORKSPACE}/testdata/bvlc_googlenet.caffemodel | ||
curl -sL https://raw.githubusercontent.com/WeChatCV/opencv_3rdparty/wechat_qrcode/detect.caffemodel > ${GITHUB_WORKSPACE}/testdata/detect.caffemodel | ||
curl -sL https://raw.githubusercontent.com/WeChatCV/opencv_3rdparty/wechat_qrcode/detect.prototxt > ${GITHUB_WORKSPACE}/testdata/detect.prototxt | ||
curl -sL https://raw.githubusercontent.com/WeChatCV/opencv_3rdparty/wechat_qrcode/sr.caffemodel > ${GITHUB_WORKSPACE}/testdata/sr.caffemodel | ||
curl -sL https://raw.githubusercontent.com/WeChatCV/opencv_3rdparty/wechat_qrcode/sr.prototxt > ${GITHUB_WORKSPACE}/testdata/sr.prototxt | ||
- name: Install Tensorflow test model | ||
run: | | ||
mkdir -p ${GITHUB_WORKSPACE}/testdata | ||
curl -sL https://storage.googleapis.com/download.tensorflow.org/models/inception5h.zip > ${GITHUB_WORKSPACE}/testdata/inception5h.zip | ||
unzip -o ${GITHUB_WORKSPACE}/testdata/inception5h.zip tensorflow_inception_graph.pb -d ${GITHUB_WORKSPACE}/testdata | ||
- name: Install ONNX test model | ||
run: | | ||
mkdir -p ${GITHUB_WORKSPACE}/testdata | ||
curl -sL https://github.com/onnx/models/blob/master/vision/classification/inception_and_googlenet/googlenet/model/googlenet-9.onnx\?raw\=true > ${GITHUB_WORKSPACE}/testdata/googlenet-9.onnx | ||
- name: Run main tests | ||
run: go test -v -tags matprofile . | ||
env: | ||
GOCV_CAFFE_TEST_FILES: ${{ github.workspace }}/testdata | ||
GOCV_TENSORFLOW_TEST_FILES: ${{ github.workspace }}/testdata | ||
NO_GOCV_ONNX_TEST_FILES: ${{ github.workspace }}/testdata | ||
- name: Run contrib tests | ||
run: go test -v -tags matprofile ./contrib |