Skip to content

CPP Adaption

CPP Adaption #57

name: Cross-platform Build
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest]
env:
CMAKE_BUILD_TYPE: Release
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up CMake
uses: lukka/get-cmake@v3.29.2
- name: Install dependencies (Windows)
shell: pwsh
run: |
choco install cmake git openssl -y
# OpenCV and Pcap might require manual handling or vcpkg if not prebuilt
git clone https://github.com/microsoft/vcpkg
.\vcpkg\bootstrap-vcpkg.bat
.\vcpkg\vcpkg install opencv:x64-windows pcap:x64-windows
echo "VCPKG_ROOT=${{ github.workspace }}\vcpkg" >> $env:GITHUB_ENV
echo "CMAKE_TOOLCHAIN_FILE=${{ github.workspace }}\vcpkg\scripts\buildsystems\vcpkg.cmake" >> $env:GITHUB_ENV
- name: Configure CMake
run: |
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=$env:CMAKE_TOOLCHAIN_FILE
- name: Build
run: cmake --build build --config Release --parallel
- name: Test binaries
run: |
./build/heiFIP --help || true
./build/main --help || true
shell: bash