Skip to content

Commit

Permalink
add build and release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveBronder committed Oct 4, 2024
1 parent 2ab59fc commit 338ac1a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 13 deletions.
24 changes: 12 additions & 12 deletions .github/workflows/build-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,16 @@ jobs:
- name: Checkout code
uses: actions/checkout@v3

- name: Install vcpkg
if : matrix.os == 'windows-latest'
run: |
git clone https://github.com/microsoft/vcpkg.git
.\vcpkg\bootstrap-vcpkg.bat
- name: Install dependencies via vcpkg
run: |
.\vcpkg\vcpkg.exe install opencv[contrib]:x64-windows
- name: Get Ninja
uses: seanmiddleditch/gha-setup-ninja@master

Expand All @@ -33,19 +43,8 @@ jobs:
cache: true

## Windows Build ##
- name: run-vcpkg
if: matrix.os == 'windows-latest'
uses: lukka/run-vcpkg@v11.5
with:
vcpkgJsonGlob: 'vcpkg.json'
vcpkgGitCommitId: 'c82f74667287d3dc386bce81e44964370c91a289'

# Install OpenCV via vcpkg
- name: Install OpenCV via vcpkg
if: matrix.os == 'windows-latest'
run: |
.\vcpkg\vcpkg.exe install
# Set up MSVC environment
- name: Set up MSVC environment
if: matrix.os == 'windows-latest'
Expand All @@ -61,7 +60,8 @@ jobs:
run: |
cmake -B build -S . -G Ninja ^
-DCMAKE_TOOLCHAIN_FILE=%cd%\vcpkg\scripts\buildsystems\vcpkg.cmake ^
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_BUILD_TYPE=Release ^
-DVCPKG_FEATURE_FLAGS=""
## End Windows Build ##

Expand Down
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ include(FetchContent)
FetchContent_Declare(
platypus
GIT_REPOSITORY https://github.com/SteveBronder/platypus
GIT_TAG main)
GIT_TAG main
CMAKE_ARGS -DOpenCV_DIR=${OpenCV_DIR})
FetchContent_MakeAvailable(platypus)

# Include directories for OpenCV and other dependencies if necessary
Expand Down

0 comments on commit 338ac1a

Please sign in to comment.