From 984c75b978e789d94a6b2a554f4804629805df95 Mon Sep 17 00:00:00 2001 From: seladb Date: Sun, 23 Jun 2024 00:18:11 -0700 Subject: [PATCH 1/3] -Add Zstd for Linux and macOS --- .github/workflows/build_and_test.yml | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index f3044812e2..8b37497ce8 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -55,6 +55,9 @@ jobs: - image: ubuntu2204 python: python3 config-zstd: OFF + - image: ubuntu2204 + python: python3 + config-zstd: ON - image: ubuntu2204-icpx python: python3 config-zstd: OFF @@ -233,14 +236,21 @@ jobs: runs-on: ${{ matrix.os-version }} strategy: matrix: - os-version: [macos-12, macos-13] - arch: [x86_64, arm64] - # Handle ZSTD build by Cirrus CI - # config-zstd: [ON, OFF] - config-zstd: [OFF] - exclude: - # excludes ZSTD on Arm64 - - arch: arm64 + include: + - os-version: macos-12 + arch: x86_64 + config-zstd: OFF + - os-version: macos-12 + arch: arm64 + config-zstd: OFF + - os-version: macos-13 + arch: x86_64 + config-zstd: OFF + - os-version: macos-13 + arch: arm64 + config-zstd: OFF + - os-version: macos-13 + arch: arm64 config-zstd: ON steps: From 07311a2b64e077f3f568aef5eee5e529c83c8742 Mon Sep 17 00:00:00 2001 From: seladb Date: Sun, 23 Jun 2024 01:14:17 -0700 Subject: [PATCH 2/3] Fix --- .github/workflows/build_and_test.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 8b37497ce8..7fcf99079c 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -55,9 +55,6 @@ jobs: - image: ubuntu2204 python: python3 config-zstd: OFF - - image: ubuntu2204 - python: python3 - config-zstd: ON - image: ubuntu2204-icpx python: python3 config-zstd: OFF @@ -66,6 +63,9 @@ jobs: - image: ubuntu2004 python: python3 config-zstd: OFF + - image: ubuntu2004-zstd + python: python3 + config-zstd: ON - image: ubuntu1804 python: python3.8 config-zstd: OFF @@ -247,11 +247,11 @@ jobs: arch: x86_64 config-zstd: OFF - os-version: macos-13 - arch: arm64 - config-zstd: OFF + arch: x86_64 + config-zstd: ON - os-version: macos-13 arch: arm64 - config-zstd: ON + config-zstd: OFF steps: - name: Checkout code From 5292a5bb20f00e489774602345ab36d44a10ec99 Mon Sep 17 00:00:00 2001 From: seladb Date: Sun, 23 Jun 2024 01:31:36 -0700 Subject: [PATCH 3/3] Comment out Cirrus CI tasks --- .cirrus.yml | 147 +++++++++++++++++++--------------------------------- 1 file changed, 53 insertions(+), 94 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index dd54cc81e4..9a5059bc9c 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -2,97 +2,56 @@ env: BUILD_DIR: "build" GCOVR_FLAGS: "--gcov-ignore-parse-errors --exclude-throw-branches --filter Common --filter Pcap --filter Packet --xml" -task: - name: Test FreeBSD - freebsd_instance: - matrix: - image_family: freebsd-13-3 - image_family: freebsd-14-0 - install_script: - - pkg install -y bash cmake git gmake gsed libpcap tcpreplay - configure_script: - # Ensure user have access to network devices instead of giving super-user right - - chmod a+rw /dev/bpf* - - cmake -S . -B Dist - build_script: - - cmake --build Dist -j 2 - test_pcapplusplus_script: - - ifconfig vtnet0 promisc - - python -m ensurepip - - python -m pip install -r ci/run_tests/requirements.txt - - python ci/run_tests/run_tests.py --interface vtnet0 - test_examples_script: - - cd Tests/ExamplesTest - - python -m ensurepip - - python -m pip install -r requirements.txt - - python -m pytest --interface vtnet0 --root-path=../../Dist/examples_bin - -task: - name: Test Zstd Linux - container: - image: seladb/ubuntu2004-zstd:latest - configure_script: - - cmake -DLIGHT_PCAPNG_ZSTD=ON -DPCAPPP_BUILD_COVERAGE=ON -S . -B Dist - build_script: - - cmake --build Dist -j 2 - test_pcapplusplus_script: - - python3 -m pip install gcovr - - python3 -m pip install -r ci/run_tests/requirements.txt - - python3 ci/run_tests/run_tests.py --interface eth0 - coverage_report_script: - - gcovr -v -r . $GCOVR_FLAGS -o coverage.xml - - curl -Os https://uploader.codecov.io/latest/linux/codecov - - chmod +x codecov - - ./codecov -v -f coverage.xml -F zstd -F ubuntu2004 -F unittest || true - -task: - name: Test Zstd MacOS - macos_instance: - image: ghcr.io/cirruslabs/macos-ventura-xcode:14.1 - configure_script: - - brew install zstd - # Ensure user have access to network devices instead of giving super-user right - - sudo chmod a+rw /dev/bpf* - - cmake -DLIGHT_PCAPNG_ZSTD=ON -DPCAPPP_BUILD_COVERAGE=ON -S . -B Dist - build_script: - - cmake --build Dist -j 2 - install_tcpreplay_gcovr_script: - - brew install tcpreplay gcovr - test_pcapplusplus_script: - - python3 -m ensurepip - - python3 -m pip install -r ci/run_tests/requirements.txt - - python3 ci/run_tests/run_tests.py --interface en0 --pcap-test-args="-x TestPcapLiveDeviceSpecialCfg" - coverage_report_script: - - gcovr -v -r . $GCOVR_FLAGS -o coverage.xml - - curl -Os https://uploader.codecov.io/latest/macos/codecov - - chmod +x codecov - - ./codecov -v -f coverage.xml -F zstd -F macos-ventura -F unittest || true - -task: - name: Build Doxygen Documentation - container: - image: seladb/ubuntu1804:latest - env: - - GITHUB_EMAIL: ENCRYPTED[ae4956ec74c9f329f7787cdfe3a6b5842870659275d0a9b513a0f6e64cd9c71cd2eb64219a9dc695f446fbd93c48fb04] - - GITHUB_TOKEN: ENCRYPTED[ab88249da2005c70f25f5910b08e907139f73bc0efb31a19b33f832e9e3bffe3cfc8e81932f21d7734c7aceca2a77188] - get_code_script: - - git clone https://github.com/PcapPlusPlus/pcapplusplus.github.io.git - configure_script: - - cmake -DPCAPPP_BUILD_EXAMPLES=OFF -DPCAPPP_BUILD_TESTS=OFF -B build -S . - build_script: - - cmake --build build -j 2 - build_documentation_script: - - cd pcapplusplus.github.io/static/api-docs/next/doxygen - - doxygen Doxyfile-ci - upload_documentation_script: | - if [ "$CIRRUS_BRANCH" == "master" -a "$CIRRUS_REPO_OWNER" == "seladb" ]; then - find pcapplusplus.github.io/static/api-docs/next/ -maxdepth 1 -type f -exec rm {} \; - rm -rf pcapplusplus.github.io/static/api-docs/next/search/ - mv pcapplusplus.github.io/static/api-docs/next/html/* pcapplusplus.github.io/static/api-docs/next/ - cd pcapplusplus.github.io/static/api-docs/next/ - git config user.name "seladb" - git config user.email "${GITHUB_EMAIL}" - git add . - git commit -m "Update API documentation for commit ${CIRRUS_CHANGE_IN_REPO}" - git push --quiet "https://${GITHUB_TOKEN}@github.com/PcapPlusPlus/pcapplusplus.github.io" master - fi +#task: +# name: Test FreeBSD +# freebsd_instance: +# matrix: +# image_family: freebsd-13-3 +# image_family: freebsd-14-0 +# install_script: +# - pkg install -y bash cmake git gmake gsed libpcap tcpreplay +# configure_script: +# # Ensure user have access to network devices instead of giving super-user right +# - chmod a+rw /dev/bpf* +# - cmake -S . -B Dist +# build_script: +# - cmake --build Dist -j 2 +# test_pcapplusplus_script: +# - ifconfig vtnet0 promisc +# - python -m ensurepip +# - python -m pip install -r ci/run_tests/requirements.txt +# - python ci/run_tests/run_tests.py --interface vtnet0 +# test_examples_script: +# - cd Tests/ExamplesTest +# - python -m ensurepip +# - python -m pip install -r requirements.txt +# - python -m pytest --interface vtnet0 --root-path=../../Dist/examples_bin +# +#task: +# name: Build Doxygen Documentation +# container: +# image: seladb/ubuntu1804:latest +# env: +# - GITHUB_EMAIL: ENCRYPTED[ae4956ec74c9f329f7787cdfe3a6b5842870659275d0a9b513a0f6e64cd9c71cd2eb64219a9dc695f446fbd93c48fb04] +# - GITHUB_TOKEN: ENCRYPTED[ab88249da2005c70f25f5910b08e907139f73bc0efb31a19b33f832e9e3bffe3cfc8e81932f21d7734c7aceca2a77188] +# get_code_script: +# - git clone https://github.com/PcapPlusPlus/pcapplusplus.github.io.git +# configure_script: +# - cmake -DPCAPPP_BUILD_EXAMPLES=OFF -DPCAPPP_BUILD_TESTS=OFF -B build -S . +# build_script: +# - cmake --build build -j 2 +# build_documentation_script: +# - cd pcapplusplus.github.io/static/api-docs/next/doxygen +# - doxygen Doxyfile-ci +# upload_documentation_script: | +# if [ "$CIRRUS_BRANCH" == "master" -a "$CIRRUS_REPO_OWNER" == "seladb" ]; then +# find pcapplusplus.github.io/static/api-docs/next/ -maxdepth 1 -type f -exec rm {} \; +# rm -rf pcapplusplus.github.io/static/api-docs/next/search/ +# mv pcapplusplus.github.io/static/api-docs/next/html/* pcapplusplus.github.io/static/api-docs/next/ +# cd pcapplusplus.github.io/static/api-docs/next/ +# git config user.name "seladb" +# git config user.email "${GITHUB_EMAIL}" +# git add . +# git commit -m "Update API documentation for commit ${CIRRUS_CHANGE_IN_REPO}" +# git push --quiet "https://${GITHUB_TOKEN}@github.com/PcapPlusPlus/pcapplusplus.github.io" master +# fi