sync main branch #65
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: Native Assets | |
on: | |
push: | |
branches: ["2.x"] | |
tags: | |
- "v2.*.*" | |
pull_request: | |
branches: ["2.x"] | |
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 \ | |
libavformat-dev libavutil-dev libswscale-dev libc6-dev \ | |
libgflags-dev python3 unzip tree python3-pip | |
python3 -m pip install conan | |
conan profile detect -f | |
cd ${{github.workspace}} | |
- uses: subosito/flutter-action@v2 | |
with: | |
# flutter-version: '3.16.9' | |
channel: "main" | |
- run: | | |
cd example | |
flutter --version | |
flutter config --enable-native-assets | |
flutter pub get | |
flutter build apk --release --target-platform android-arm64,android-arm,android-x64 | |
# - 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 | |
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 \ | |
libavformat-dev libavutil-dev \ | |
libswscale-dev libgflags-dev libc6-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 | |
- uses: subosito/flutter-action@v2 | |
with: | |
# flutter-version: '3.16.9' | |
channel: "beta" | |
- uses: robinraju/[email protected] | |
with: | |
repository: "rainyl/opencv_dart" | |
tag: "dnn_test_files" | |
fileName: "models.zip" | |
out-file-path: "test/" | |
extract: true | |
- name: Run Test | |
run: | | |
dart pub get | |
dart --enable-experiment=native-assets test -x skip-workflow | |
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 -m pip install conan | |
conan profile detect -f | |
- uses: subosito/flutter-action@v2 | |
with: | |
# flutter-version: '3.16.9' | |
channel: "beta" | |
- uses: robinraju/[email protected] | |
with: | |
repository: "rainyl/opencv_dart" | |
tag: "dnn_test_files" | |
fileName: "models.zip" | |
out-file-path: "test/" | |
extract: true | |
- name: Run Test | |
run: | | |
dart pub get | |
dart --enable-experiment=native-assets test | |
build-macos: | |
name: build-macos | |
runs-on: macos-latest | |
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}} | |
- uses: subosito/flutter-action@v2 | |
with: | |
# flutter-version: '3.16.9' | |
channel: "beta" | |
- uses: robinraju/[email protected] | |
with: | |
repository: "rainyl/opencv_dart" | |
tag: "dnn_test_files" | |
fileName: "models.zip" | |
out-file-path: "test/" | |
extract: true | |
- name: Run Test | |
run: | | |
dart pub get | |
dart --enable-experiment=native-assets test -x skip-workflow | |
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}} | |
- uses: subosito/flutter-action@v2 | |
with: | |
# flutter-version: '3.16.9' | |
channel: "beta" | |
- uses: robinraju/[email protected] | |
with: | |
repository: "rainyl/opencv_dart" | |
tag: "dnn_test_files" | |
fileName: "models.zip" | |
out-file-path: "test/" | |
extract: true | |
- name: Run Test | |
run: | | |
dart pub get | |
dart --enable-experiment=native-assets test -x skip-workflow | |
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: Set up Flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
channel: main # or: beta, master (or main) | |
- name: build | |
run: | | |
cd example | |
flutter config --enable-native-assets | |
flutter build ios --release --no-codesign |