Skip to content

Commit

Permalink
Use prebuilt QEMU for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
gsingh93 committed Apr 8, 2024
1 parent 4ac0691 commit 824b181
Showing 1 changed file with 23 additions and 3 deletions.
26 changes: 23 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ jobs:
ARCH: ${{ matrix.arch }}
ARTIFACTS_URL: https://github.com/gsingh93/linux-exploit-dev-env/releases/download/2024.04.07-ebc24a8
HEADERS_URL: https://github.com/gsingh93/linux-exploit-dev-env/releases/download/linux-headers-2024.04.07-ebc24a8
QEMU_RELEASE_URL: https://github.com/gsingh93/linux-exploit-dev-env/releases/download/qemu-8.2.2-b9c6d93043ef9e667666c2fd671edcd972fcbccc
steps:

- name: Clone Linux Exploit Dev Environment
Expand Down Expand Up @@ -86,8 +87,27 @@ jobs:
- run: ls -lR ${{ env.LINUX_OUT }}/modules_install

- name: Install testing dependencies
run: sudo apt update && sudo apt install -y qemu-system-x86 qemu-system-arm
- name: Download QEMU prebuilts
shell: bash
run: |
set -x
if [ $ARCH == x86_64 ]; then
QEMU_BIN=qemu-system-x86_64
elif [ $ARCH == arm64 ]; then
QEMU_BIN=qemu-system-aarch64
fi
wget --no-verbose ${QEMU_RELEASE_URL}/${QEMU_BIN}
# wget --no-verbose ${QEMU_RELEASE_URL}/bios-256k.bin
# wget --no-verbose ${QEMU_RELEASE_URL}/efi-virtio.rom
chmod +x $QEMU_BIN
echo "QEMU_BIN=$PWD/$QEMU_BIN" >> $GITHUB_ENV
- name: Install QEMU dependencies
run: sudo apt update && sudo apt install -y libfdt1 qemu-system-x86 qemu-system-arm

- name: Test art-kt
shell: bash
Expand All @@ -108,6 +128,6 @@ jobs:
echo "${ART_KT_DIR}/art-kernel-toolkit.ko:" > $MODULES_DIR/modules.dep
# LINUX_OUT, ROOTFS, and QEMU_KERNEL_IMAGE are set in the environment
make art-kt_test | tee test.log
make art-kt_test QEMU_BIN=$QEMU_BIN | tee test.log
grep "All tests passed" test.log || exit 1

0 comments on commit 824b181

Please sign in to comment.