Skip to content

Commit 6a1f732

Browse files
committed
update readme, changelog, ffigen, deprecate build.py
1 parent 04ceb0f commit 6a1f732

File tree

9 files changed

+110
-920
lines changed

9 files changed

+110
-920
lines changed

.github/workflows/build_test.yaml

Lines changed: 45 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: build test release
22

33
on:
44
push:
5-
# branches: [ "main" ]
5+
# branches: ["conan"]
66
tags:
77
- "v*.*.*"
88
# pull_request:
@@ -26,31 +26,26 @@ jobs:
2626
sudo apt-get update
2727
2828
sudo apt-get install -y build-essential libgtk-3-dev ffmpeg libavcodec-dev \
29-
cmake ninja-build ccache nasm libavformat-dev libavutil-dev libswscale-dev libgflags-dev \
30-
python3 unzip tree
29+
cmake ninja-build ccache nasm libavformat-dev libavutil-dev libswscale-dev \
30+
libgflags-dev python3 unzip tree python3-pip
3131
32-
cd ${{github.workspace}}
33-
mkdir -p build/opencv/android
34-
wget -q -O build/opencv-$OPENCV_VERSION-android-sdk.zip \
35-
https://github.com/opencv/opencv/releases/download/$OPENCV_VERSION/opencv-$OPENCV_VERSION-android-sdk.zip
32+
python3 -m pip install conan
33+
conan profile detect -f
3634
37-
unzip -q -o build/opencv-$OPENCV_VERSION-android-sdk.zip -d build/opencv/
38-
mv build/opencv/OpenCV-android-sdk/* build/opencv/android
35+
cd ${{github.workspace}}
36+
mkdir -p build/android
3937
4038
wget -q -O build/android-ndk-$ANDROID_NDK_VERSION-linux.zip \
4139
https://dl.google.com/android/repository/android-ndk-$ANDROID_NDK_VERSION-linux.zip
42-
4340
unzip -q -o build/android-ndk-$ANDROID_NDK_VERSION-linux.zip -d build/
44-
mv build/android-ndk-$ANDROID_NDK_VERSION build/android-ndk
4541
- name: build-android
4642
run: |
47-
python3 scripts/build.py --dart --src src --build-dir build \
48-
android --arch x86_64 --android-ndk build/android-ndk
49-
python3 scripts/build.py --dart --src src --build-dir build \
50-
android --arch arm64-v8a --android-ndk build/android-ndk
51-
python3 scripts/build.py --dart --src src --build-dir build \
52-
android --arch armeabi-v7a --android-ndk build/android-ndk
53-
43+
conan build . -b missing -pr:h profiles/android-x86_64 \
44+
-c tools.android:ndk_path="`pwd`/build/android-ndk-$ANDROID_NDK_VERSION"
45+
conan build . -b missing -pr:h profiles/android-armv8 \
46+
-c tools.android:ndk_path="`pwd`/build/android-ndk-$ANDROID_NDK_VERSION"
47+
conan build . -b missing -pr:h profiles/android-armv7 \
48+
-c tools.android:ndk_path="`pwd`/build/android-ndk-$ANDROID_NDK_VERSION"
5449
- uses: actions/upload-artifact@v4
5550
name: upload-android-x86_64
5651
with:
@@ -89,16 +84,19 @@ jobs:
8984
sudo apt-get update
9085
sudo apt-get install -y curl git wget python3 unzip build-essential \
9186
libgtk-3-dev ffmpeg libavcodec-dev \
92-
cmake ninja-build ccache nasm libavformat-dev libavutil-dev libswscale-dev libgflags-dev \
93-
libjpeg-dev libpng-dev libtiff-dev
87+
cmake ninja-build ccache nasm libavformat-dev libavutil-dev \
88+
libswscale-dev libgflags-dev \
89+
libjpeg-dev libpng-dev libtiff-dev python3-pip
90+
91+
python3 -m pip install conan
92+
conan profile detect -f
9493
9594
- uses: actions/checkout@v4
9695
with:
9796
submodules: true
9897
- name: build-opencv-dart
9998
run: |
100-
python3 scripts/build.py --opencv --src src --build-dir build linux --arch x64
101-
python3 scripts/build.py --dart --src src --build-dir build linux --arch x64
99+
conan build . -b missing -c tools.cmake.cmaketoolchain:generator=Ninja
102100
- uses: subosito/flutter-action@v2
103101
with:
104102
# flutter-version: '3.16.9'
@@ -132,20 +130,22 @@ jobs:
132130
submodules: true
133131
- uses: actions/setup-python@v5
134132
with:
135-
python-version: '3.11'
133+
python-version: "3.11"
136134
- name: build-opencv-dart
137135
run: |
138-
python3 ${{github.workspace}}\scripts\build.py --opencv --src src --build-dir build windows --arch x64
139-
python3 ${{github.workspace}}\scripts\build.py --dart --src src --build-dir build windows --arch x64
140-
- uses: subosito/flutter-action@v2
141-
with:
142-
# flutter-version: '3.16.9'
143-
channel: "stable"
136+
python3 -m pip install conan
137+
conan profile detect -f
138+
conan build . -b missing -s compiler.cppstd=20
139+
144140
- uses: actions/upload-artifact@v4
145141
name: upload-windows-x64
146142
with:
147143
path: build/publish/libopencv_dart-windows-x64.tar.gz
148144
name: libopencv_dart-windows-x64.tar.gz
145+
- uses: subosito/flutter-action@v2
146+
with:
147+
# flutter-version: '3.16.9'
148+
channel: "stable"
149149
- name: Run Test
150150
run: |
151151
$env:PATH = "${{github.workspace}}\windows;${env:PATH}"
@@ -168,22 +168,23 @@ jobs:
168168
submodules: true
169169
- name: setup
170170
run: |
171-
# brew update
172171
brew install --force --overwrite ninja ccache ffmpeg nasm
172+
python3 -m pip install conan
173+
conan profile detect -f
173174
cd ${{github.workspace}}
174175
- name: build
175176
run: |
176-
python3 scripts/build.py --opencv --src src --build-dir build macos --arch x64
177-
python3 scripts/build.py --dart --src src --build-dir build macos --arch x64
178-
- uses: subosito/flutter-action@v2
179-
with:
180-
# flutter-version: '3.16.9'
181-
channel: "stable"
177+
conan build . -b missing
178+
182179
- uses: actions/upload-artifact@v4
183180
name: upload-macos-x64
184181
with:
185182
path: build/publish/libopencv_dart-macos-x64.tar.gz
186183
name: libopencv_dart-macos-x64.tar.gz
184+
- uses: subosito/flutter-action@v2
185+
with:
186+
# flutter-version: '3.16.9'
187+
channel: "stable"
187188
- name: Run Test
188189
run: |
189190
ls -alh $GITHUB_WORKSPACE/macos
@@ -209,21 +210,23 @@ jobs:
209210
run: |
210211
# brew update
211212
brew install --force --overwrite ninja ccache ffmpeg nasm
213+
python3 -m pip install conan
214+
conan profile detect -f
212215
cd ${{github.workspace}}
213216
- name: build
214217
run: |
215-
python3 scripts/build.py --opencv --src src --build-dir build macos --arch arm64
216-
python3 scripts/build.py --dart --src src --build-dir build macos --arch arm64
217-
- uses: subosito/flutter-action@v2
218-
with:
219-
# flutter-version: '3.16.9'
220-
channel: "stable"
218+
conan build . -b missing
219+
ls -alh build/Macos
221220
222221
- uses: actions/upload-artifact@v4
223222
name: upload-macos-arm64
224223
with:
225224
path: build/publish/libopencv_dart-macos-arm64.tar.gz
226225
name: libopencv_dart-macos-arm64.tar.gz
226+
- uses: subosito/flutter-action@v2
227+
with:
228+
# flutter-version: '3.16.9'
229+
channel: "stable"
227230
- name: Run Test
228231
run: |
229232
ls -alh $GITHUB_WORKSPACE/macos

0 commit comments

Comments
 (0)