CPP Adaption #54
This file contains hidden or 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: Linux Build | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest] | |
| env: | |
| CMAKE_BUILD_TYPE: Release | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up CMake | |
| uses: lukka/[email protected] | |
| - name: Install dependencies (Linux) | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| build-essential \ | |
| libssl-dev \ | |
| libopencv-dev \ | |
| libpcap-dev \ | |
| libpthread-stubs0-dev \ | |
| git | |
| - name: Install precompiled PcapPlusPlus | |
| run: | | |
| curl -LO https://github.com/seladb/PcapPlusPlus/releases/download/v25.05/pcapplusplus-25.05-ubuntu-22.04-gcc-11.4.0-x86_64.tar.gz | |
| tar -xzf pcapplusplus-25.05-ubuntu-22.04-gcc-11.4.0-x86_64.tar.gz | |
| cd pcapplusplus-25.05-ubuntu-22.04-gcc-11.4.0-x86_64 | |
| sudo cp -r include/* /usr/local/include/ | |
| sudo cp -r lib/* /usr/local/lib/ | |
| sudo ldconfig | |
| - name: Configure and Build | |
| run: | | |
| cd heiFIP/ | |
| # Create build directory | |
| mkdir -p build && cd build | |
| cmake .. \ | |
| -DCMAKE_BUILD_TYPE=Release \ | |
| -DUSE_MANUAL_PCAPPLUSPLUS=ON \ | |
| -DPcapPlusPlus_INCLUDE_DIRS="/usr/local/include/pcapplusplus/" \ | |
| -DPcapPlusPlus_LIBRARIES="/usr/local/lib/libCommon++.a;/usr/local/lib/libPacket++.a;/usr/local/lib/libPcap++.a" \ | |
| -DUSE_MANUAL_OPENSSL=ON \ | |
| -DOPENSSL_INCLUDE_DIR="/usr/include/openssl" \ | |
| -DOPENSSL_CRYPTO_LIBRARY="/usr/lib/x86_64-linux-gnu/libcrypto.a" | |
| make -j$(nproc) |