Merge pull request #260 from rainyl/update-example #46
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: windows | |
on: | |
push: | |
branches: ["main"] | |
tags: | |
- "v*.*.*" | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
windows: | |
name: windows | |
runs-on: windows-2019 | |
strategy: | |
matrix: | |
arch: [x64] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- uses: robinraju/[email protected] | |
with: | |
repository: "rainyl/opencv.full" | |
tag: "4.10.0+6" | |
fileName: "libopencv-windows-${{ matrix.arch }}.tar.gz" | |
out-file-path: "build/opencv" | |
extract: true | |
- name: build | |
run: | | |
cd build | |
cmake -DCMAKE_INSTALL_PREFIX=install ` | |
-DCMAKE_BUILD_TYPE=Release ` | |
-DCVD_PLATFORM_INSTALL_DIR="${{ github.workspace }}/windows" ` | |
-DOpenCV_DIR=${{ github.workspace }}/build/opencv .. | |
cmake --build . --config Release -j $(nproc) | |
cmake --build . --config Release --target install | |
- name: package | |
run: | | |
tar -C build/install -zcvf libopencv_dart-windows-${{ matrix.arch }}.tar.gz . | |
- uses: actions/upload-artifact@v4 | |
name: upload | |
with: | |
path: libopencv_dart-windows-${{ matrix.arch }}.tar.gz | |
name: libopencv_dart-windows-${{ matrix.arch }}.tar.gz | |
- uses: robinraju/[email protected] | |
with: | |
repository: "rainyl/opencv_dart" | |
tag: "dnn_test_files" | |
fileName: "models.zip" | |
out-file-path: "test/" | |
extract: true | |
- uses: subosito/flutter-action@v2 | |
with: | |
channel: "stable" | |
- name: test coverage | |
run: | | |
cd "${{github.workspace}}" | |
ls windows | |
$env:PATH="${{github.workspace}}\windows;$env:PATH" | |
dart pub global activate coverage | |
dart pub global run coverage:test_with_coverage --package . --package-name opencv_dart | |
- name: Upload to Codecov | |
uses: codecov/[email protected] | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
slug: rainyl/opencv_dart | |
file: ./coverage/lcov.info | |
- name: release | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
draft: true | |
prerelease: false | |
files: | | |
libopencv_dart-windows-${{ matrix.arch }}.tar.gz |