-
Notifications
You must be signed in to change notification settings - Fork 685
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
1 changed file
with
77 additions
and
3 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -215,11 +215,11 @@ jobs: | |
- name: Test Tutorials | ||
run: cd build_examples/tutorials_bin && ./Tutorial-HelloWorld | ||
|
||
macos: | ||
macos-x86: | ||
runs-on: ${{ matrix.os-version }} | ||
strategy: | ||
matrix: | ||
os-version: [macos-11, macos-12] | ||
os-version: [macos-12, macos-13] | ||
arch: [x86_64, arm64] | ||
# Handle ZSTD build by Cirrus CI | ||
# config-zstd: [ON, OFF] | ||
|
@@ -235,7 +235,8 @@ jobs: | |
|
||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.8.x" | ||
# support version: https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json | ||
python-version: "3.12" | ||
|
||
- name: Configure PcapPlusPlus | ||
# Ensure user have access to network devices instead of giving super-user right | ||
|
@@ -297,6 +298,79 @@ jobs: | |
fail_ci_if_error: false | ||
verbose: true | ||
|
||
macos-m1: | ||
runs-on: ${{ matrix.os-version }} | ||
strategy: | ||
matrix: | ||
os-version: [macos-14] | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- uses: actions/setup-python@v5 | ||
with: | ||
# support version: https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json | ||
python-version: "3.12" | ||
|
||
- name: Configure PcapPlusPlus | ||
# Ensure user have access to network devices instead of giving super-user right | ||
# Seems macos-14 has more strict file permission | ||
run: | | ||
sudo chmod a+rw /dev/bpf* | ||
sudo chmod a+rw /usr/local | ||
cmake -DPCAPPP_BUILD_COVERAGE=ON -S . -B "$BUILD_DIR" | ||
- name: Build PcapPlusPlus | ||
run: cmake --build "$BUILD_DIR" -j | ||
|
||
- name: Check architecture | ||
run: lipo $BUILD_DIR/Pcap++/libPcap++.a -verify_arch arm64 | ||
|
||
- name: Install Tcpreplay | ||
run: brew install tcpreplay | ||
|
||
- name: Test PcapPlusPlus | ||
run: | | ||
python -m pip install -U pip | ||
python -m pip install -r ci/run_tests/requirements.txt | ||
python ci/run_tests/run_tests.py --interface en0 | ||
- name: Test Examples | ||
run: | | ||
cd Tests/ExamplesTest | ||
python -m pip install -U pip | ||
python -m pip install -r requirements.txt | ||
python -m pytest --interface en0 --use-sudo --root-path=../../Dist/examples_bin | ||
- name: Check installation | ||
run: | | ||
cmake -DPCAPPP_BUILD_COVERAGE=OFF -S . -B "$BUILD_DIR" | ||
cmake --build "$BUILD_DIR" -j | ||
cmake --install "$BUILD_DIR" | ||
- name: Build Tutorials | ||
run: | | ||
mkdir -p build_examples | ||
cmake -DPCAPPP_BUILD_TUTORIALS=ON -S Examples -B build_examples | ||
cmake --build build_examples -j | ||
- name: Test Tutorials | ||
run: cd build_examples/tutorials_bin && ./Tutorial-HelloWorld | ||
|
||
- name: Create Cobertura Report | ||
run: | | ||
python3 -m pip install gcovr | ||
gcovr -v -r . $GCOVR_FLAGS -o coverage.xml | ||
- name: Upload Coverage Results | ||
uses: codecov/[email protected] | ||
with: | ||
files: ./coverage.xml | ||
flags: ${{ matrix.os-version }},unittest | ||
fail_ci_if_error: false | ||
verbose: true | ||
|
||
mingw-w64: | ||
runs-on: windows-latest | ||
strategy: | ||
|