Skip to content

Build DPI from source when running GitHub actions#14

Merged
nhnghia merged 3 commits into
Montimage:mainfrom
montimage-projects:main
Apr 10, 2026
Merged

Build DPI from source when running GitHub actions#14
nhnghia merged 3 commits into
Montimage:mainfrom
montimage-projects:main

Conversation

@nhnghia

@nhnghia nhnghia commented Apr 10, 2026

Copy link
Copy Markdown
Contributor

The GitHub actions was fixed on a version 1.7.7 of MMT-DPI. This prevents using new features from new DPI version in MMT-Security. This pr allows building DPI from its latest source code. Even compiling DPI from its source might require more time, thus GitHub actions will run longer.

nhnghia added 2 commits April 10, 2026 12:38
The CI/CD was fixed on a version 1.7.7 of MMT-DPI. This prevents using
new features from new DPI version in MMT-Security. This commit builds
DPI from its latest source code. This build might require more time.

@luongnv89 luongnv89 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

Critical Bugs in .github/workflows/c-cpp.yml

Bug 1 — apt-get update-y (malformed command)

Line 30 of the new step:

sudo apt-get update-y && install -y libxml2-dev libpcap-dev

update-y is not a valid apt-get operation. The -y flag must be space-separated:

E: Invalid operation update-y

This error is visible in the CI log for this PR run.

Bug 2 — Missing apt-get prefix on install

The same line uses bare install instead of sudo apt-get install. The POSIX /usr/bin/install utility (for copying files) is invoked instead of the package manager. The dev headers are never actually installed.

Why CI still passed: The ubuntu-latest runner image (Ubuntu 24.04) happens to have libxml2-dev and libpcap-dev pre-installed. If the runner image changes and drops those packages, the build will silently break.

Fix:

- name: build DPI from source
  run: |
     sudo apt-get update -y && sudo apt-get install -y libxml2-dev libpcap-dev
     git clone https://github.com/Montimage/mmt-dpi.git mmt-dpi
     cd mmt-dpi/sdk/ && make -j2 && sudo make install

Notes (non-blocking)

.gitignore — two minor issues:

  1. .swp matches only a file literally named .swp. Vim swap files follow the pattern *.filename.swp. Change to *.swp.
  2. .project is added again but already exists at line 11 of the original file — duplicate entry.

Workflow trigger scope (informational):
The PR changes branches: [ main, "*" ] to branches: [ main ], silently removing CI coverage for all non-main branches. This may be intentional, but worth confirming.

@luongnv-montimage luongnv-montimage left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

great work, thanks
good to go

@nhnghia nhnghia merged commit 941f6c1 into Montimage:main Apr 10, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants