Skip to content
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

Merged
merged 34 commits into from
Aug 19, 2024
Merged

support ubuntu 24 in CI #1486

merged 34 commits into from
Aug 19, 2024

Conversation

tigercosmos
Copy link
Collaborator

@tigercosmos tigercosmos commented Jul 6, 2024

  • use venv for pip installation
  • add Ubuntu 24.04 in the CI

@seladb
Copy link
Owner

seladb commented Jul 6, 2024

@tigercosmos we need to install venv on all Linux containers to make it work. In Ubuntu the package is python3-venv I think, we need to figure out what the package name in the other distros

@tigercosmos
Copy link
Collaborator Author

@tigercosmos we need to install venv on all Linux containers to make it work. In Ubuntu the package is python3-venv I think, we need to figure out what the package name in the other distros

I see, let me figure out.

@tigercosmos tigercosmos added the CI label Jul 6, 2024
@tigercosmos tigercosmos added this to the Augest 2024 Release milestone Jul 7, 2024
@tigercosmos
Copy link
Collaborator Author

blocking by #1384 due to:

  DEPRECATION: netifaces is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559

Copy link

codecov bot commented Aug 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.91%. Comparing base (c845b40) to head (f3ed6b2).
Report is 2 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #1486      +/-   ##
==========================================
- Coverage   82.91%   82.91%   -0.01%     
==========================================
  Files         273      273              
  Lines       46272    46272              
  Branches     9441     9259     -182     
==========================================
- Hits        38368    38366       -2     
- Misses       7082     7102      +20     
+ Partials      822      804      -18     
Flag Coverage Δ
fedora39 74.56% <ø> (ø)
macos-12 80.88% <ø> (ø)
macos-13 80.30% <ø> (ø)
macos-14 80.22% <ø> (-0.02%) ⬇️
mingw32 71.43% <ø> (-0.04%) ⬇️
mingw64 71.43% <ø> (-0.04%) ⬇️
npcap 84.86% <ø> (-0.04%) ⬇️
rhel94 74.33% <ø> (+0.03%) ⬆️
ubuntu2004 57.91% <ø> (ø)
ubuntu2004-zstd 58.01% <ø> (ø)
ubuntu2204 74.26% <ø> (-0.01%) ⬇️
ubuntu2204-icpx 58.40% <ø> (ø)
ubuntu2404 74.53% <ø> (?)
unittest 82.91% <ø> (-0.01%) ⬇️
windows-2019 84.91% <ø> (-0.02%) ⬇️
windows-2022 84.90% <ø> (-0.03%) ⬇️
winpcap 84.88% <ø> (ø)
xdp 49.27% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@tigercosmos tigercosmos marked this pull request as ready for review August 16, 2024 06:41
@tigercosmos
Copy link
Collaborator Author

@seladb ready for review.

@tigercosmos tigercosmos requested a review from seladb August 16, 2024 17:05
@@ -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`
Copy link
Collaborator

@egecetin egecetin Aug 17, 2024

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.

${{ 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 }}
python3 -m venv ./venv
Copy link
Collaborator

Choose a reason for hiding this comment

The 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.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure. Moved it to a step.

Comment on lines 346 to 358
if: ${{ matrix.host-arch == matrix.arch }}
run: |
python -m pip install -U pip
python -m venv ./venv
source ./venv/bin/activate
python -m pip install -r ci/run_tests/requirements.txt
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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does the first step use 'venv' and the second doesn't?

Copy link
Owner

@seladb seladb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix @Dimi1010 's comments, otherwise LGTM

@tigercosmos tigercosmos merged commit 9d175ca into seladb:dev Aug 19, 2024
67 checks passed
@tigercosmos tigercosmos deleted the ubuntu24 branch August 19, 2024 04:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants