Skip to content

Commit

Permalink
separate opencv to speedup compile (#26)
Browse files Browse the repository at this point in the history
* separate opencv to speedup compile
  • Loading branch information
rainyl authored Apr 16, 2024
1 parent 380bf99 commit b9cce14
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 352 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/build_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: build and test

on:
push:
branches: ["main", "dnn-test"]
branches: ["main"]
pull_request:
branches: [ "main" ]
branches: ["main"]

jobs:
build-windows:
Expand All @@ -31,7 +31,7 @@ jobs:
ls test/models
python3 -m pip install conan
conan profile detect -f
conan build . -b missing -s compiler.cppstd=20
conan build . -b missing -s compiler.cppstd=20 -o package_root="$PWD" -o output_dir="$PWD\build\windows"
- uses: actions/upload-artifact@v4
name: upload-windows-x64
Expand All @@ -45,7 +45,8 @@ jobs:
- name: setup coverage
run: |
cd "${{github.workspace}}"
$env:PATH = "${{github.workspace}}\windows;${env:PATH}"
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 coverage reports to Codecov
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ CMakeUserPresets*
.clang-format
CMakePresets.json
gh-md-toc
.fvm/
publish/

# Files and directories created by pub
.dart_tool/
Expand Down
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_EXPORT_COMPILE_COMMANDS TRUE)
cmake_policy(SET CMP0135 NEW)

set(OpenCV_STATIC ON)

find_package(OpenCV REQUIRED)

set(OpenCV_LIBS
Expand Down Expand Up @@ -125,7 +127,7 @@ if(CVD_ENABLE_TEST)
DESTINATION ${CMAKE_BINARY_DIR}/test
)
# model files for DNN test
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/test/models")
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/test/models")
file(COPY
"${CMAKE_CURRENT_SOURCE_DIR}/test/models"
DESTINATION ${CMAKE_BINARY_DIR}/test
Expand Down
Loading

0 comments on commit b9cce14

Please sign in to comment.