Skip to content

Async imgproc

Async imgproc #86

name: Release
on:
push:
# branches: ["conan"]
tags:
- "v*.*.*"
pull_request:
branches: [ "main" ]
env:
ANDROID_NDK_VERSION: r26c
jobs:
build-android:
name: build-android
runs-on: ubuntu-22.04
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 nasm libavformat-dev libavutil-dev libswscale-dev \
libgflags-dev python3 unzip tree python3-pip
python3 -m pip install conan
conan profile detect -f
cd ${{github.workspace}}
mkdir -p build/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/
- name: build-android
run: |
conan build . -b missing -pr:h profiles/android-x86_64 \
-c tools.android:ndk_path="`pwd`/build/android-ndk-$ANDROID_NDK_VERSION" \
-o output_dir="build/Android/x86_64"
conan build . -b missing -pr:h profiles/android-armv8 \
-c tools.android:ndk_path="`pwd`/build/android-ndk-$ANDROID_NDK_VERSION" \
-o output_dir="build/Android/armv8"
conan build . -b missing -pr:h profiles/android-armv7 \
-c tools.android:ndk_path="`pwd`/build/android-ndk-$ANDROID_NDK_VERSION" \
-o output_dir="build/Android/armv7"
- 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-x86_64.tar.gz
build/publish/libopencv_dart-android-arm64-v8a.tar.gz
build/publish/libopencv_dart-android-armeabi-v7a.tar.gz
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.19.6'
channel: "stable"
build-ubuntu:
name: build-ubuntu-android-armv7
runs-on: ubuntu-22.04
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 libavformat-dev libavutil-dev \
libswscale-dev libgflags-dev \
libjpeg-dev libpng-dev libtiff-dev python3-pip
python3 -m pip install conan
conan profile detect -f
- uses: actions/checkout@v4
with:
submodules: true
- name: build-opencv-dart
run: |
conan build . -b missing -c tools.cmake.cmaketoolchain:generator=Ninja \
-o output_dir="build/Linux/x64"
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.19.6'
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: 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
- name: Run Test
run: |
export OPENCV_DART_LIB_PATH="${{github.workspace}}/linux/libopencv_dart.so"
dart pub get
dart test -x skip-workflow,no-local-files
build-windows:
name: build-windows
runs-on: windows-2019
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: build-opencv-dart
run: |
python3 -m pip install conan
conan profile detect -f
conan build . -b missing -s compiler.cppstd=20 -o output_dir="build/Windows/x64"
- 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
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.19.6'
channel: "stable"
- 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
- name: Run Test
run: |
$env:OPENCV_DART_LIB_PATH = "${{github.workspace}}\windows\opencv_dart.dll"
dart pub get
dart test -x no-local-files
build-macos:
name: build-macos
runs-on: macos-13
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: setup
run: |
brew install --force --overwrite ninja ccache ffmpeg@6 nasm [email protected]
brew link --overwrite ffmpeg@6
brew link --overwrite [email protected]
brew install --force --overwrite conan
conan profile detect -f
cd ${{github.workspace}}
- name: build
run: |
conan build . -b missing \
-o output_dir="build/macos/x64"
- 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
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.19.6'
channel: "stable"
- 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
- name: Run Test
run: |
ls -alh ${{github.workspace}}/macos
export OPENCV_DART_LIB_PATH="${{github.workspace}}/macos/libopencv_dart.dylib"
dart pub get
dart test -x skip-workflow,no-local-files
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@6 nasm conan
brew link --overwrite ffmpeg@6
conan profile detect -f
cd ${{github.workspace}}
- name: build
run: |
conan build . -b missing \
-o output_dir="build/macos/arm64"
- 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
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.19.6'
channel: "stable"
- 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
- name: Run Test
run: |
ls -alh ${{github.workspace}}/macos
export OPENCV_DART_LIB_PATH="${{github.workspace}}/macos/libopencv_dart.dylib"
dart pub get
dart test -x skip-workflow,no-local-files
build-ios:
name: build-ios
runs-on: macos-14
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: setup
run: |
brew install --force --overwrite ninja ccache ffmpeg@6 nasm conan
brew link --overwrite ffmpeg@6
conan profile detect -f
cd ${{github.workspace}}
- name: build
run: |
echo "tools.cmake.cmaketoolchain:user_toolchain=[\"`pwd`/profiles/ios.toolchain.cmake\"]" >> profiles/ios-x86_64
conan build . -b missing -pr:h profiles/ios-x86_64 \
-o output_dir="build/ios/x86_64"
echo "tools.cmake.cmaketoolchain:user_toolchain=[\"`pwd`/profiles/ios.toolchain.cmake\"]" >> profiles/ios-armv8
conan build . -b missing -pr:h profiles/ios-armv8 \
-o output_dir="build/ios/armv8"
rm -rf ios/opencv_dart.xcframework
xcodebuild -create-xcframework \
-framework build/ios/x86_64/install/opencv_dart.framework \
-framework build/ios/armv8/install/opencv_dart.framework \
-output ios/opencv_dart.xcframework
tar -zcvf libopencv_dart-ios-os64.tar.gz -C ios opencv_dart.xcframework
- uses: actions/upload-artifact@v4
name: upload
with:
path: build/publish/libopencv_dart-ios-arm64.tar.gz
name: libopencv_dart-ios-arm64.tar.gz
- uses: actions/upload-artifact@v4
name: upload x64
with:
path: build/publish/libopencv_dart-ios-x64.tar.gz
name: libopencv_dart-ios-x64.tar.gz
- uses: actions/upload-artifact@v4
name: upload
with:
path: libopencv_dart-ios-os64.tar.gz
name: libopencv_dart-ios-os64.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-ios-arm64.tar.gz
build/publish/libopencv_dart-ios-x64.tar.gz
libopencv_dart-ios-os64.tar.gz
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.19.6'
channel: "stable"
- name: Run Test
run: |
cd example
flutter pub get
flutter build ios --release --no-codesign
flutter build ios --no-codesign --simulator