skip test cv.setNumThreads on macos #11
Workflow file for this run
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
name: build test release | |
on: | |
push: | |
# branches: [ "main" ] | |
tags: | |
- "v*.*.*" | |
# pull_request: | |
# branches: [ "main" ] | |
env: | |
ANDROID_NDK_VERSION: r26c | |
OPENCV_VERSION: 4.9.0 | |
LIB_NAME: libopencv_dart | |
jobs: | |
build-android: | |
name: build-android | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: setup | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y build-essential libgtk-3-dev ffmpeg libavcodec-dev \ | |
cmake ninja-build ccache nasm libavformat-dev libavutil-dev libswscale-dev libgflags-dev \ | |
python3 unzip tree | |
cd ${{github.workspace}} | |
mkdir -p build/opencv/android | |
wget -q -O build/opencv-$OPENCV_VERSION-android-sdk.zip \ | |
https://github.com/opencv/opencv/releases/download/$OPENCV_VERSION/opencv-$OPENCV_VERSION-android-sdk.zip | |
unzip -q -o build/opencv-$OPENCV_VERSION-android-sdk.zip -d build/opencv/ | |
mv build/opencv/OpenCV-android-sdk/* build/opencv/android | |
wget -q -O build/android-ndk-$ANDROID_NDK_VERSION-linux.zip \ | |
https://dl.google.com/android/repository/android-ndk-$ANDROID_NDK_VERSION-linux.zip | |
unzip -q -o build/android-ndk-$ANDROID_NDK_VERSION-linux.zip -d build/ | |
mv build/android-ndk-$ANDROID_NDK_VERSION build/android-ndk | |
- name: build-android | |
run: | | |
python3 scripts/build.py --dart --src src --build-dir build \ | |
android --arch x86_64 --android-ndk build/android-ndk | |
python3 scripts/build.py --dart --src src --build-dir build \ | |
android --arch arm64-v8a --android-ndk build/android-ndk | |
python3 scripts/build.py --dart --src src --build-dir build \ | |
android --arch armeabi-v7a --android-ndk build/android-ndk | |
- uses: actions/upload-artifact@v4 | |
name: upload-android-x86_64 | |
with: | |
path: build/publish/libopencv_dart-android-x86_64.tar.gz | |
name: libopencv_dart-android-x86_64.tar.gz | |
- uses: actions/upload-artifact@v4 | |
name: upload-android-arm64-v8a | |
with: | |
path: build/publish/libopencv_dart-android-arm64-v8a.tar.gz | |
name: libopencv_dart-android-arm64-v8a.tar.gz | |
- uses: actions/upload-artifact@v4 | |
name: upload-android-armeabi-v7a | |
with: | |
path: build/publish/libopencv_dart-android-armeabi-v7a.tar.gz | |
name: libopencv_dart-android-armeabi-v7a.tar.gz | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
draft: true | |
prerelease: false | |
files: | | |
build/publish/libopencv_dart-android-arm64-v8a.tar.gz | |
build/publish/libopencv_dart-android-armeabi-v7a.tar.gz | |
build/publish/libopencv_dart-android-x86_64.tar.gz | |
build-ubuntu: | |
name: build-ubuntu | |
runs-on: ubuntu-latest | |
steps: | |
- name: setup | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y curl git wget python3 unzip build-essential \ | |
libgtk-3-dev ffmpeg libavcodec-dev \ | |
cmake ninja-build ccache nasm libavformat-dev libavutil-dev libswscale-dev libgflags-dev \ | |
libjpeg-dev libpng-dev libtiff-dev | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: build-opencv-dart | |
run: | | |
python3 scripts/build.py --opencv --src src --build-dir build linux --arch x64 | |
python3 scripts/build.py --dart --src src --build-dir build linux --arch x64 | |
- uses: subosito/flutter-action@v2 | |
with: | |
# flutter-version: '3.16.9' | |
channel: "stable" | |
- uses: actions/upload-artifact@v4 | |
name: upload-linux-x64 | |
with: | |
path: build/publish/libopencv_dart-linux-x64.tar.gz | |
name: libopencv_dart-linux-x64.tar.gz | |
- name: Run Test | |
run: | | |
export LD_LIBRARY_PATH=$GITHUB_WORKSPACE/linux:$LD_LIBRARY_PATH | |
flutter pub get | |
flutter test -x skip-workflow,no-local-files | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
draft: true | |
prerelease: false | |
files: | | |
build/publish/libopencv_dart-linux-x64.tar.gz | |
build-windows: | |
name: build-windows | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.11' | |
- name: build-opencv-dart | |
run: | | |
python3 ${{github.workspace}}\scripts\build.py --opencv --src src --build-dir build windows --arch x64 | |
python3 ${{github.workspace}}\scripts\build.py --dart --src src --build-dir build windows --arch x64 | |
- uses: subosito/flutter-action@v2 | |
with: | |
# flutter-version: '3.16.9' | |
channel: "stable" | |
- uses: actions/upload-artifact@v4 | |
name: upload-windows-x64 | |
with: | |
path: build/publish/libopencv_dart-windows-x64.tar.gz | |
name: libopencv_dart-windows-x64.tar.gz | |
- name: Run Test | |
run: | | |
$env:PATH = "${{github.workspace}}\windows;${env:PATH}" | |
flutter pub get | |
flutter test -x no-local-files | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
draft: true | |
prerelease: false | |
files: | | |
build/publish/libopencv_dart-windows-x64.tar.gz | |
build-macos: | |
name: build-macos | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: setup | |
run: | | |
# brew update | |
brew install --force --overwrite ninja ccache ffmpeg nasm | |
cd ${{github.workspace}} | |
- name: build | |
run: | | |
python3 scripts/build.py --opencv --src src --build-dir build macos --arch x64 | |
python3 scripts/build.py --dart --src src --build-dir build macos --arch x64 | |
- uses: subosito/flutter-action@v2 | |
with: | |
# flutter-version: '3.16.9' | |
channel: "stable" | |
- uses: actions/upload-artifact@v4 | |
name: upload-macos-x64 | |
with: | |
path: build/publish/libopencv_dart-macos-x64.tar.gz | |
name: libopencv_dart-macos-x64.tar.gz | |
- name: Run Test | |
run: | | |
ls -alh $GITHUB_WORKSPACE/macos | |
export DYLD_LIBRARY_PATH=$GITHUB_WORKSPACE/macos:$DYLD_LIBRARY_PATH | |
flutter pub get | |
flutter test -x no-local-files | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
draft: true | |
prerelease: false | |
files: | | |
build/publish/libopencv_dart-macos-x64.tar.gz | |
build-macos-arm64: | |
name: build-macos-arm64 | |
runs-on: macos-14 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: setup | |
run: | | |
# brew update | |
brew install --force --overwrite ninja ccache ffmpeg nasm | |
cd ${{github.workspace}} | |
- name: build | |
run: | | |
python3 scripts/build.py --opencv --src src --build-dir build macos --arch arm64 | |
python3 scripts/build.py --dart --src src --build-dir build macos --arch arm64 | |
- uses: subosito/flutter-action@v2 | |
with: | |
# flutter-version: '3.16.9' | |
channel: "stable" | |
- uses: actions/upload-artifact@v4 | |
name: upload-macos-arm64 | |
with: | |
path: build/publish/libopencv_dart-macos-arm64.tar.gz | |
name: libopencv_dart-macos-arm64.tar.gz | |
- name: Run Test | |
run: | | |
ls -alh $GITHUB_WORKSPACE/macos | |
export DYLD_LIBRARY_PATH=$GITHUB_WORKSPACE/macos:$DYLD_LIBRARY_PATH | |
flutter pub get | |
flutter test -x no-local-files | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
draft: true | |
prerelease: false | |
files: | | |
build/publish/libopencv_dart-macos-arm64.tar.gz |