-
Notifications
You must be signed in to change notification settings - Fork 681
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support ubuntu 24 in CI #1486
support ubuntu 24 in CI #1486
Changes from all commits
1ee855f
f3edb1a
ed212f4
ed73da0
65dc067
800d192
4600133
8054c90
a7603f0
ab07076
2868ccf
ce005bd
7d3d143
4a7f697
4f4147f
e39de2b
5f80c36
8541ce1
2241be8
84245b7
6d31da5
a5f2dac
7b18e8b
5ea9c4f
9963098
bd3ce12
a853f08
10b4866
5828da4
04a2216
167664d
4f3dc32
2b4ac4e
f3ed6b2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,6 +32,7 @@ jobs: | |
apk update && apk add cppcheck python3-dev | ||
python3 -m pip install cmake-format clang-format==18.1.6 | ||
|
||
# TODO: investigate how to run pre-commit with `venv` | ||
- uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1 | ||
tigercosmos marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
- name: CMake format | ||
|
@@ -52,29 +53,24 @@ jobs: | |
container: seladb/${{ matrix.image }} | ||
strategy: | ||
matrix: | ||
include: | ||
include: # Check the images at https://github.com/seladb/PcapPlusPlus-DockerImages | ||
- image: ubuntu2404 | ||
config-zstd: OFF | ||
- image: ubuntu2204 | ||
python: python3 | ||
config-zstd: OFF | ||
- image: ubuntu2204-icpx | ||
python: python3 | ||
config-zstd: OFF | ||
additional-flags: -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx | ||
additional-gcov-flags: --gcov-executable "llvm-cov gcov" | ||
- image: ubuntu2004 | ||
python: python3 | ||
config-zstd: OFF | ||
- image: rhel94 | ||
python: python3 | ||
config-zstd: OFF | ||
- image: ubuntu2004-zstd | ||
python: python3 | ||
config-zstd: ON | ||
- image: fedora39 | ||
python: python3 | ||
config-zstd: OFF | ||
- image: alpine317 | ||
python: python3 | ||
config-zstd: OFF | ||
|
||
steps: | ||
|
@@ -109,18 +105,23 @@ jobs: | |
- name: Build PcapPlusPlus | ||
run: cmake --build "$BUILD_DIR" -j | ||
|
||
- name: Prepare environment for tests | ||
run: | | ||
python3 -m venv ./venv | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: Maybe move this line to it's own step? It looks weird to me that the venv is created inside the 'Test PCPP' step but the following steps also depend on it. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sure. Moved it to a step. |
||
. ./venv/bin/activate | ||
python3 -m pip install -r ci/run_tests/requirements.txt | ||
|
||
- name: Test PcapPlusPlus | ||
run: | | ||
${{ matrix.python }} -m pip install -U pip | ||
${{ matrix.python }} -m pip install -r ci/run_tests/requirements.txt | ||
${{ matrix.python }} ci/run_tests/run_tests.py --interface eth0 ${{ matrix.test-flags }} | ||
. ./venv/bin/activate | ||
python3 ci/run_tests/run_tests.py --interface eth0 ${{ matrix.test-flags }} | ||
|
||
- name: Test Examples | ||
run: | | ||
. ./venv/bin/activate | ||
cd Tests/ExamplesTest | ||
${{ matrix.python }} -m pip install -U pip | ||
${{ matrix.python }} -m pip install -r requirements.txt | ||
${{ matrix.python }} -m pytest --interface eth0 --root-path=../../Dist/examples_bin | ||
python3 -m pip install -r requirements.txt | ||
python3 -m pytest --interface eth0 --root-path=../../Dist/examples_bin | ||
|
||
- name: Check installation | ||
run: | | ||
|
@@ -138,7 +139,8 @@ jobs: | |
|
||
- name: Create Cobertura Report | ||
run: | | ||
${{ matrix.python }} -m pip install gcovr | ||
. ./venv/bin/activate | ||
python3 -m pip install gcovr | ||
gcovr -v -r . ${{ matrix.additional-gcov-flags }} $GCOVR_FLAGS -o coverage.xml | ||
|
||
- name: Upload Coverage Results | ||
|
@@ -343,19 +345,23 @@ jobs: | |
- name: Check architecture | ||
run: lipo $BUILD_DIR/Pcap++/libPcap++.a -verify_arch ${{ matrix.arch }} | ||
|
||
- name: Prepare environment for tests | ||
run: | | ||
python -m venv ./venv | ||
. ./venv/bin/activate | ||
python -m pip install -r ci/run_tests/requirements.txt | ||
|
||
- name: Test PcapPlusPlus | ||
# We can't run cross compiled binaries | ||
if: ${{ matrix.host-arch == matrix.arch }} | ||
run: | | ||
python -m pip install -U pip | ||
python -m pip install -r ci/run_tests/requirements.txt | ||
. ./venv/bin/activate | ||
python ci/run_tests/run_tests.py --interface en0 | ||
|
||
- name: Test Examples | ||
if: ${{ matrix.host-arch == matrix.arch }} | ||
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 | ||
|
||
|
@@ -605,7 +611,6 @@ jobs: | |
|
||
echo "Testing PcapPlusPlus examples" | ||
cd Tests/ExamplesTest | ||
python3 -m ensurepip | ||
python3 -m pip install -r requirements.txt | ||
python3 -m pytest --interface "$interface_name" --root-path=../../Dist/examples_bin | ||
|
||
|
@@ -709,10 +714,15 @@ jobs: | |
- name: Build PcapPlusPlus | ||
run: cmake --build $BUILD_DIR -j | ||
|
||
- name: Test PcapPlusPlus | ||
- name: Prepare environment for tests | ||
run: | | ||
python -m pip install -U pip | ||
python -m venv ./venv | ||
. ./venv/bin/activate | ||
python -m pip install -r ci/run_tests/requirements.txt | ||
|
||
- name: Test PcapPlusPlus | ||
run: | | ||
. ./venv/bin/activate | ||
python ci/run_tests/run_tests.py --interface eth0 --use-sudo --pcap-test-args="-t xdp" | ||
|
||
- name: Create Cobertura Report | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not related with this PR directly but, it is possible to use pre-commit.ci but we should remove cppcheck and clang-format from pre-commit since they require pre-installed binaries.