Build DPI from source when running GitHub actions#14
Conversation
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
left a comment
There was a problem hiding this comment.
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-devupdate-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 installNotes (non-blocking)
.gitignore — two minor issues:
.swpmatches only a file literally named.swp. Vim swap files follow the pattern*.filename.swp. Change to*.swp..projectis 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
left a comment
There was a problem hiding this comment.
great work, thanks
good to go
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.