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

CI: Consistent linking with XTF #961

Merged
merged 5 commits into from
Sep 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 1 addition & 11 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,23 +91,13 @@ jobs:
/build/usr/lib/libvmi*
/build/usr/include/libvmi/*
key: drakvuf-bundle-${{ env.DRAKVUF_COMMIT }}-${{ matrix.distro }}-${{ matrix.version }}
- if: ${{ steps.cache-drakvuf-bundle.outputs.cache-hit != 'true' }}
name: Build Xen Test Framework
working-directory: /opt
run: |
apt install -y make pkg-config gcc libglib2.0-dev
git clone https://xenbits.xen.org/git-http/xtf.git
cd xtf
git checkout bf1c4eb6cb52785cf539eb83752dfcecfe66c5d1
make -j4
- name: Build draksetup tools
run: |
apt install -y libjson-c-dev
apt install -y make pkg-config gcc libglib2.0-dev libjson-c-dev
cp -v /build/usr/lib/libvmi* /usr/lib/
mkdir /usr/include/libvmi
cp -v /build/usr/include/libvmi/* /usr/include/libvmi/
make -C ./drakrun/drakrun/tools
cp /opt/xtf/tests/example/test-hvm64-example ./drakrun/drakrun/tools/
- uses: actions/upload-artifact@v4
with:
name: drakvuf-bundle-debs-${{ matrix.distro }}-${{ matrix.version }}
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@
[submodule "drakrun/drakrun/lib/postprocessing/capa_plugin/capa-rules"]
path = drakrun/drakrun/data/capa-rules
url = https://github.com/mandiant/capa-rules/
[submodule "drakrun/drakrun/tools/xtf"]
path = drakrun/drakrun/tools/xtf
url = https://github.com/andyhhp/xtf.git
6 changes: 5 additions & 1 deletion drakrun/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ PYTHON_SOURCE_FILES := $( wildcard *.py ) drakrun/data pyproject.toml MANIFEST.i
.PHONY: all
all: dist/*.whl

dist/*.whl: $(PYTHON_SOURCE_FILES) drakrun/web/frontend/build drakrun/tools/get-explorer-pid drakrun/tools/test-altp2m
dist/*.whl: $(PYTHON_SOURCE_FILES) drakrun/web/frontend/build drakrun/tools/get-explorer-pid drakrun/tools/test-altp2m drakrun/tools/test-hvm64-example
rm -f dist/*.whl
ifndef DIST
DRAKRUN_VERSION_TAG=$(shell git rev-parse --short HEAD) python3 setup.py bdist_wheel
Expand All @@ -24,6 +24,10 @@ drakrun/tools/get-explorer-pid: drakrun/tools/get-explorer-pid.c
drakrun/tools/test-altp2m: drakrun/tools/test-altp2m.c
gcc $< -o $@ -lvmi `pkg-config --cflags --libs glib-2.0`

drakrun/tools/test-hvm64-example: drakrun/tools/xtf
$(MAKE) -C drakrun/tools/xtf
cp drakrun/tools/xtf/tests/example/test-hvm64-example drakrun/tools/test-hvm64-example

.PHONY: clean
clean:
rm -rf dist drakvuf_sandbox.egg-info build
Expand Down
3 changes: 3 additions & 0 deletions drakrun/drakrun/tools/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,6 @@ get-explorer-pid: get-explorer-pid.c
test-altp2m: test-altp2m.c
gcc $< -o $@ -lvmi `pkg-config --cflags --libs glib-2.0`

test-hvm64-example: xtf
$(MAKE) -C xtf
cp xtf/tests/example/test-hvm64-example .
1 change: 1 addition & 0 deletions drakrun/drakrun/tools/xtf
Submodule xtf added at bf1c4e
Loading