-
Notifications
You must be signed in to change notification settings - Fork 14
76 lines (71 loc) · 2.24 KB
/
linux.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: linux
on:
push:
tags:
- "v*.*.*"
pull_request:
branches: [ "main" ]
jobs:
ubuntu:
name: ubuntu
runs-on: ubuntu-22.04
strategy:
matrix:
arch: [x64]
env:
COMMON_CMAKE_OPTIONS: |
-DCMAKE_INSTALL_PREFIX=install \
-DCMAKE_BUILD_TYPE=Release \
-DCVD_PLATFORM_INSTALL_DIR="${{ github.workspace }}/linux" \
steps:
- name: setup
run: |
sudo apt-get update
sudo apt-get install -y curl 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
- uses: actions/checkout@v4
with:
submodules: true
- uses: robinraju/[email protected]
with:
repository: "rainyl/opencv.full"
latest: true
fileName: "libopencv-linux-${{ matrix.arch }}.tar.gz"
out-file-path: "build/opencv"
extract: true
- name: build
run: |
cd build
cmake -S ${{ github.workspace }} \
${{ env.COMMON_CMAKE_OPTIONS }} \
-DOpenCV_DIR=${{ github.workspace }}/build/opencv/lib/cmake/opencv4
cmake --build . --config Release -j $(nproc)
cmake --build . --config Release --target install
- name: package
run: |
tar -C build/install -zcvf libopencv_dart-linux-${{ matrix.arch }}.tar.gz .
- uses: actions/upload-artifact@v4
name: upload
with:
path: libopencv_dart-linux-${{ matrix.arch }}.tar.gz
name: libopencv_dart-linux-${{ matrix.arch }}.tar.gz
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.19.6'
channel: "stable"
- name: test
run: |
export OPENCV_DART_LIB_PATH="${{github.workspace}}/linux/libopencv_dart.so"
dart pub get
dart 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: |
libopencv_dart-linux-${{ matrix.arch }}.tar.gz